Skip to content

Instantly share code, notes, and snippets.

@masouduut94
Created July 10, 2020 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masouduut94/9a4c478b5c1f2a220f68f23fc160532b to your computer and use it in GitHub Desktop.
Save masouduut94/9a4c478b5c1f2a220f68f23fc160532b to your computer and use it in GitHub Desktop.
def output(self):
output = {'video_details': self.video_details}
result = list(self.frames.values())
# Every bbox in each frame has to have `top_k_labels` number of labels otherwise error raises.
for frame in result:
for bbox in frame.bboxes:
if not bbox.labels_full(self.top_k_labels):
raise ValueError(
"labels in frame_id: {}, bbox_id: {} is not fulled before outputting.".format(frame.frame_id,
bbox.bbox_id))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment