Created
July 10, 2020 08:19
-
-
Save masouduut94/b7a097a01bd0f7fa5fc83642364ccd03 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 find_bbox(self, frame_id: int, bbox_id: int): | |
if not self.bbox_exists(frame_id, bbox_id): | |
raise ValueError("frame with id: {} does not contain bbox with id: {}".format(frame_id, bbox_id)) | |
bboxes = {bbox.bbox_id: bbox for bbox in self.frames[frame_id].bboxes} | |
return bboxes.get(bbox_id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment