ValueError: Error when checking input: expected input_1 to have 4 dimensions, but got array with shape (1, 512, 512)
解决方案:
test_img = cv2.cvtColor(test_img, cv2.COLOR_GRAY2BGR)
出现问题原因:
彩色图和灰度图之间得通道数问题
ValueError: Error when checking input: expected input_1 to have 4 dimensions, but got array with shape (1, 512, 512)
解决方案:
test_img = cv2.cvtColor(test_img, cv2.COLOR_GRAY2BGR)
出现问题原因:
彩色图和灰度图之间得通道数问题