(self)
| 36 | return MetadataCatalog.get("coco_2017_train") |
| 37 | |
| 38 | def test_draw_dataset_dict(self): |
| 39 | img = np.random.rand(512, 512, 3) * 255 |
| 40 | dic = { |
| 41 | "annotations": [ |
| 42 | { |
| 43 | "bbox": [ |
| 44 | 368.9946492271106, |
| 45 | 330.891438763377, |
| 46 | 13.148537455410235, |
| 47 | 13.644708680142685, |
| 48 | ], |
| 49 | "bbox_mode": BoxMode.XYWH_ABS, |
| 50 | "category_id": 0, |
| 51 | "iscrowd": 1, |
| 52 | "segmentation": { |
| 53 | "counts": "_jh52m?2N2N2N2O100O10O001N1O2MceP2", |
| 54 | "size": [512, 512], |
| 55 | }, |
| 56 | } |
| 57 | ], |
| 58 | "height": 512, |
| 59 | "image_id": 1, |
| 60 | "width": 512, |
| 61 | } |
| 62 | v = Visualizer(img, self.metadata) |
| 63 | v.draw_dataset_dict(dic) |
| 64 | |
| 65 | def test_overlay_instances(self): |
| 66 | img, boxes, labels, polygons, masks = self._random_data() |
nothing calls this directly
no test coverage detected