Created
October 20, 2022 23:05
-
-
Save victormurcia/4f3f0a9e27d2116763b45dc691c46fd5 to your computer and use it in GitHub Desktop.
Find first frame that contains detections
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Find first frame that contains detections | |
| def findFrameSpacing(bb_dict): | |
| """ | |
| Args: | |
| bb_dict: (dict) dictionary from json file | |
| Returns: | |
| spacing: (int) Spacing between frames in json | |
| """ | |
| frame0 = bb_dict['frames'][0]['frame_index'] | |
| frame1 = bb_dict['frames'][1]['frame_index'] | |
| spacing = abs(frame1 - frame0) | |
| print('The frame spacing is ', spacing) | |
| return(spacing) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment