浏览代码

Merge pull request #411 from nqzhang/patch-1

Update x2voc.py
Jason 5 年之前
父节点
当前提交
d8ee6d335f
共有 1 个文件被更改,包括 1 次插入1 次删除
  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]
             img_name_part = osp.splitext(img_name)[0]
             json_file = osp.join(json_dir, img_name_part + ".json")
             json_file = osp.join(json_dir, img_name_part + ".json")
             if not osp.exists(json_file):
             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
                 continue
             xml_doc = minidom.Document() 
             xml_doc = minidom.Document() 
             root = xml_doc.createElement("annotation") 
             root = xml_doc.createElement("annotation")