Hello, I have a problem with Generate saliency maps with untrained model.
I load the 5 images like the notebook of C3_W4_Lab2_CatsDogs-CAM.
And when I use my function do_salience with for example the first image ‘cat1.jpg’ I get this error:
error: OpenCV(4.8.0) /io/opencv/modules/imgproc/src/color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function ‘cvtColor’
I dont know where is the problem, because the image is not empty.
When I check outside the function I can see the image perfectaly using this code:
img= cv2.imread(‘cat1.jpg’)
img_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
plt.imshow(img_rgb, cmap=‘gray’)
plt.title(‘Gato 1’)
plt.show()
Wish someone can help me.