Kaynağa Gözat

./paddlex/tools/x2coco.py

sunyanfang01 5 yıl önce
ebeveyn
işleme
f28504f66f
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      paddlex/tools/x2coco.py

+ 1 - 1
paddlex/tools/x2coco.py

@@ -100,7 +100,7 @@ class LabelMe2COCO(X2COCO):
         image["height"] = json_info["imageHeight"]
         image["width"] = json_info["imageWidth"]
         image["id"] = image_id + 1
-        image["file_name"] = json_info["imagePath"].split("/")[-1]
+        image["file_name"] = osp.split(json_info["imagePath"])[-1]
         return image
     
     def generate_polygon_anns_field(self, height, width,