Created
July 10, 2020 08:15
-
-
Save masouduut94/fb15dcea2792903c2eb3e22dde1921b6 to your computer and use it in GitHub Desktop.
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
def add_bbox(self, bbox_id: int, top: int, left: int, width: int, height: int): | |
bboxes_ids = [bbox.bbox_id for bbox in self.bboxes] | |
if bbox_id not in bboxes_ids: | |
self.bboxes.append(Bbox(bbox_id, top, left, width, height)) | |
else: | |
raise ValueError("Frame with id: {} already has a Bbox with id: {}".format(self.frame_id, bbox_id)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment