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
I am using it with Black and White images (i.e. gray) which only have 2 channels.
Your code reads images using matplot lib, which will only read the 2 channels of an BnW image.
It will be better to read images using openCV, which adds the extra channel.
So replacing everything that reads the image like this:
img = plt.imread(fname)[:,:,:3] #this won't work in BnW
by using:
img = cv2.imread(fname) #this adds the extra channel and converts to np array on the fly
I can make the changes in your code and crete a pull request if you want.
Cheers, Lucia.
The text was updated successfully, but these errors were encountered:
Hello!
Thank you for this fantastic model.
I am using it with Black and White images (i.e. gray) which only have 2 channels.
Your code reads images using matplot lib, which will only read the 2 channels of an BnW image.
It will be better to read images using openCV, which adds the extra channel.
So replacing everything that reads the image like this:
img = plt.imread(fname)[:,:,:3]
#this won't work in BnWby using:
img = cv2.imread(fname) #this adds the extra channel and converts to np array on the fly
I can make the changes in your code and crete a pull request if you want.
Cheers, Lucia.
The text was updated successfully, but these errors were encountered: