Exemple #1
0
 def get_cells(self):
     """Return list of all cells (list    of Box)."""
     return [
         Box.from_npbox(box_tup)
         for box_tup in self.cell_to_class_id.keys()
     ]
Exemple #2
0
 def test_from_npbox(self):
     npbox = np.array([self.ymin, self.xmin, self.ymax, self.xmax])
     output_box = Box.from_npbox(npbox)
     self.assertEqual(output_box, self.box)
 def get_boxes(self):
     """Return list of Boxes."""
     return [Box.from_npbox(npbox) for npbox in self.boxlist.get()]