Skip to content

Instantly share code, notes, and snippets.

@masouduut94
Created July 10, 2020 07:44
Show Gist options
  • Save masouduut94/d8b76368d2523c52aa6fb4affa5790fa to your computer and use it in GitHub Desktop.
Save masouduut94/d8b76368d2523c52aa6fb4affa5790fa to your computer and use it in GitHub Desktop.
def set_top_k(self, value):
self.top_k_labels = value
def frame_exists(self, frame_id: int):
return frame_id in self.frames.keys()
def add_frame(self, frame_id: int):
# Use this function to add frames with index.
if not self.frame_exists(frame_id):
self.frames[frame_id] = Frame(frame_id)
else:
raise ValueError("Frame id: {} already exists".format(frame_id))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment