Proposal for the handling of B&W images
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 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.
Hello!
Thank you for appeciacion of our model and interest in our research!
Please feel free to create a pull request.
What's your impression of the performance of LaMa in B&W domain btw?
Hi! Could you please point to the places we use plt.imread? I do no see any in our main code