Browse Source

Update x2voc.py

如果有数据没有标注 转换会出错
nqzhang 5 years ago
parent
commit
b2692864da
1 changed files with 1 additions and 1 deletions
  1. 1 1
      paddlex/tools/x2voc.py

+ 1 - 1
paddlex/tools/x2voc.py

@@ -67,7 +67,7 @@ class LabelMe2VOC(X2VOC):
             img_name_part = osp.splitext(img_name)[0]
             json_file = osp.join(json_dir, img_name_part + ".json")
             if not osp.exists(json_file):
-                os.remove(os.remove(osp.join(image_dir, img_name)))
+                os.remove(osp.join(image_dir, img_name))
                 continue
             xml_doc = minidom.Document() 
             root = xml_doc.createElement("annotation")