make sure all images are RGB
parent
1816241d10
commit
72b453b9d1
|
@ -97,11 +97,8 @@ class EvalTestReader(object):
|
||||||
if img is None:
|
if img is None:
|
||||||
logger.info("{} does not exist!".format(img_path))
|
logger.info("{} does not exist!".format(img_path))
|
||||||
continue
|
continue
|
||||||
if len(list(img.shape)) == 2 or img.shape[2] == 1:
|
elif len(list(img.shape)) == 2 or img.shape[2] == 1:
|
||||||
img = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR)
|
img = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR)
|
||||||
if img is None:
|
|
||||||
logger.info("load image error:" + img_path)
|
|
||||||
continue
|
|
||||||
outs = process_function(img)
|
outs = process_function(img)
|
||||||
outs.append(img_path)
|
outs.append(img_path)
|
||||||
batch_outs.append(outs)
|
batch_outs.append(outs)
|
||||||
|
|
|
@ -104,7 +104,7 @@ class DBProcessTrain(object):
|
||||||
if imgvalue is None:
|
if imgvalue is None:
|
||||||
logger.info("{} does not exist!".format(img_path))
|
logger.info("{} does not exist!".format(img_path))
|
||||||
return None
|
return None
|
||||||
if len(list(imgvalue.shape)) == 2 or imgvalue.shape[2] == 1:
|
elif len(list(imgvalue.shape)) == 2 or imgvalue.shape[2] == 1:
|
||||||
imgvalue = cv2.cvtColor(imgvalue, cv2.COLOR_GRAY2BGR)
|
imgvalue = cv2.cvtColor(imgvalue, cv2.COLOR_GRAY2BGR)
|
||||||
data = self.make_data_dict(imgvalue, gt_label)
|
data = self.make_data_dict(imgvalue, gt_label)
|
||||||
data = AugmentData(data)
|
data = AugmentData(data)
|
||||||
|
|
Loading…
Reference in New Issue