You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check your input image. It appears to have 4 channels rather than 3. The 4th is possibly an alpha channel. If that is the case just select the first 3 channels which should be the RGB channels.
I just run the inference with the image provided by this repo.
It seems that pillow.Image.open read image with 'RGBA' 4 channels, not 'RGB' 3 channels.
So I add 'convert('RGB')' as follows: img = ImageProcessing.normalise_image(np.array(Image.open(img_filepath).convert('RGB')), normaliser)
RuntimeError: Given groups=1, weight of size [16, 3, 3, 3], expected input[1, 4, 345, 514] to have 3 channels, but got 4 channels instead
The text was updated successfully, but these errors were encountered: