Created
July 10, 2020 08:21
-
-
Save masouduut94/8da56aec32718af02d1996ea4aeaa23c to your computer and use it in GitHub Desktop.
This file contains 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
def add_label_to_bbox(self, frame_id: int, bbox_id: int, category: str, confidence: float): | |
bbox = self.find_bbox(frame_id, bbox_id) | |
if not bbox.labels_full(self.top_k_labels): | |
bbox.add_label(category, confidence) | |
else: | |
raise ValueError("labels in frame_id: {}, bbox_id: {} is fulled".format(frame_id, bbox_id)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment