|
@@ -159,7 +159,7 @@ class JingLing2Seg(X2Seg):
|
|
|
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
|
|
|
with open(json_file, mode="r", \
|
|
with open(json_file, mode="r", \
|
|
|
encoding=get_encoding(json_file)) as j:
|
|
encoding=get_encoding(json_file)) as j:
|
|
@@ -212,7 +212,7 @@ class LabelMe2Seg(X2Seg):
|
|
|
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
|
|
|
with open(json_file, mode="r", \
|
|
with open(json_file, mode="r", \
|
|
|
encoding=get_encoding(json_file)) as j:
|
|
encoding=get_encoding(json_file)) as j:
|
|
@@ -298,7 +298,7 @@ class EasyData2Seg(X2Seg):
|
|
|
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
|
|
|
img_file = osp.join(image_dir, img_name)
|
|
img_file = osp.join(image_dir, img_name)
|
|
|
img = np.asarray(PIL.Image.open(img_file))
|
|
img = np.asarray(PIL.Image.open(img_file))
|