Hello, I have encountered this problem as well. It's sort of hilarious because it's a simple problem and I banged my head against the table as well for like 10 hours. When you are doing transfer learning(the technique of using pre trained weights) your images need to be the same size as the ones which the network was trained on, which includes the color channels. This leaves you with two solutions:
- train your own detector, just take their architecture
- Turn your images from greyscale into rgb by using the following bit of code(i used this for SSD object detection, but based on your error it seems to be the same issue). The rgb2gray is here:https://www.mathworks.com/matlabcentral/answers/377407-how-to-convert-grayscale-to-rgb
map = hsv(256); % Or whatever colormap you want.
rgbImage = ind2rgb(im, map); % im is a grayscale or indexed image.
You will need to play around with the value in hsv and tune it to your needs.
Hope this helps
RC