Skip to content

Instantly share code, notes, and snippets.

@victormurcia
Created October 20, 2022 23:04
Show Gist options
  • Select an option

  • Save victormurcia/d09aa03a100c219b0a519677cc67bbdb to your computer and use it in GitHub Desktop.

Select an option

Save victormurcia/d09aa03a100c219b0a519677cc67bbdb to your computer and use it in GitHub Desktop.
Find first frame that contains detections
#Find first frame that contains detections
def findFirstFrame(bb_dict):
"""
Args:
bb_dict: (dict) dictionary from json file
Returns:
firstFrame: (int) First frame to process in video
"""
firstFrame = bb_dict['frames'][0]['frame_index']
print('These is the first frame to process in video ', firstFrame)
return(firstFrame)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment