my medical PNG images for test have 3 channels as given below :
import cv2
from google.colab.patches import cv2_imshow
img= cv2.imread("a.png")
print('Image Dimensions :', img.shape)
img= cv2.imread("ax2.png")
print('Image Dimensions :', img.shape)
---------------------> results : <--------------------------------
Image Dimensions : (625, 698, 3)
Image Dimensions : (426, 535, 3)
As it is known, my test images have 3 channels, but I got an error as follows, which says that the images have 4 channels
RuntimeError: Given groups=1, weight of size [3, 3, 1, 1], expected input[1, 4, 268, 300] to have 3 channels, but got 4 channels instead
What is the problem and how can I fix it?
thanks!