How to do inference on gray scale images? #3182
Unanswered
vinayakarannil
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Currently, I am uncertain what you mean by 'L' mode in detectron2. What do you mean by "you are able to train in grayscale but cannot perform inference in grayscale"? If detectron2 is able to support grayscale training, then it should also mean that you should be able to support grayscale inference too. Have you checked your dimension in your inference? Pytorch requires that the tensor dimension is at least four dimension: [BxCXHxW] where B = batch size, C = number of channel, H = height in pixels, W = width in pixels. If it's grayscale then C dimension is equal to 1 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have trained the model using 'L' mode, but inference does not support gray scale mode. How would i do inference on my test data? I can run in BGR or RGB mode. But since training was done on gray scled images, the accuracy might be impacted if i change the color mode in inference right?
Beta Was this translation helpful? Give feedback.
All reactions