From 508b5f7f9859599f1b8715c48f593c90df83e730 Mon Sep 17 00:00:00 2001 From: duohappy Date: Wed, 10 Mar 2021 17:45:21 +0800 Subject: [PATCH] delete redundant code (#2318) I read `x2coco.py`, and I think `getbbox` function is redundant. --- tools/x2coco.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tools/x2coco.py b/tools/x2coco.py index caf0132a5..ee29c1235 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'] -- GitLab