Пример #1
0
 def add_bounding_box_right(self, position, size):
     x1 = position[0] + int(size[0] * 0.85)
     y1 = position[1] + int(size[1] * 0.73)
     x2 = position[0] + int(size[0] * 0.99)
     y2 = position[1] + int(size[1] * 0.99)
     bounding_box = BoundingBox(x1, y1, x2, y2)
     bounding_box.label = self.file_name
     self.bounding_boxes_on_image.bounding_boxes.append(bounding_box)
Пример #2
0
 def add_bounding_box_left(self, position, size):
     x1 = position[0] + int(size[0] * 0.01)
     y1 = position[1] + int(size[1] * 0.01)
     x2 = position[0] + int(size[0] * 0.15)
     y2 = position[1] + int(size[1] * 0.27)
     bounding_box = BoundingBox(x1, y1, x2, y2)
     bounding_box.label = self.file_name
     self.bounding_boxes_on_image.bounding_boxes.append(bounding_box)