提交 13501bfb 编写于 作者: S sunyanfang01

fix the bug

上级 9efb0100
...@@ -76,7 +76,7 @@ class EasyDataCls(ImageNet): ...@@ -76,7 +76,7 @@ class EasyDataCls(ImageNet):
raise IOError( raise IOError(
'The image file {} is not exist!'.format(img_file)) 'The image file {} is not exist!'.format(img_file))
with open(json_file, mode='r', \ with open(json_file, mode='r', \
encoding=get_encoding(label_list)) as j: encoding=get_encoding(json_file)) as j:
json_info = json.load(j) json_info = json.load(j)
label = json_info['labels'][0]['name'] label = json_info['labels'][0]['name']
self.file_list.append([img_file, self.labels.index(label)]) self.file_list.append([img_file, self.labels.index(label)])
......
...@@ -96,7 +96,7 @@ class EasyDataDet(VOCDetection): ...@@ -96,7 +96,7 @@ class EasyDataDet(VOCDetection):
raise IOError( raise IOError(
'The image file {} is not exist!'.format(img_file)) 'The image file {} is not exist!'.format(img_file))
with open(json_file, mode='r', \ with open(json_file, mode='r', \
encoding=get_encoding(label_list)) as j: encoding=get_encoding(json_file)) as j:
json_info = json.load(j) json_info = json.load(j)
im_id = np.array([ct]) im_id = np.array([ct])
im = cv2.imread(img_file) im = cv2.imread(img_file)
......
...@@ -79,7 +79,7 @@ class EasyDataSeg(Dataset): ...@@ -79,7 +79,7 @@ class EasyDataSeg(Dataset):
raise IOError( raise IOError(
'The image file {} is not exist!'.format(img_file)) 'The image file {} is not exist!'.format(img_file))
with open(json_file, mode='r', \ with open(json_file, mode='r', \
encoding=get_encoding(label_list)) as j: encoding=get_encoding(json_file)) as j:
json_info = json.load(j) json_info = json.load(j)
im = cv2.imread(img_file) im = cv2.imread(img_file)
im_w = im.shape[1] im_w = im.shape[1]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册