diff --git a/tools/x2coco.py b/tools/x2coco.py index caf0132a5e05865825dda6bfd0bbf3c3d4160e2e..ee29c12353885bbb1a93a5015d05ec70e79e5d1a 100644 --- a/tools/x2coco.py +++ b/tools/x2coco.py @@ -43,14 +43,8 @@ class MyEncoder(json.JSONEncoder): return obj.tolist() else: return super(MyEncoder, self).default(obj) - - -def getbbox(self, points): - polygons = points - mask = self.polygons_to_mask([self.height, self.width], polygons) - return self.mask2box(mask) - - + + def images_labelme(data, num): image = {} image['height'] = data['imageHeight']