YOLO Detection on Grayscale Images

29 visualizaciones (últimos 30 días)
Kev el 3 de Nov. de 2020
Comentada: Kev el 10 de Nov. de 2020
I am trying to detect objects in the grayscale images, but I get the following error.
"The input image channel size (1) must be the same as the network's input channel size (3)."
Per documentation, it says the network accpets single channel as well, but what could be the reason for the error?
  2 comentarios
Sunil Patidar
Sunil Patidar el 6 de Nov. de 2020
Which MATLAB are you using?
Kev el 6 de Nov. de 2020
MATLAB 2020a, and same issue was observed on 2020b.

Iniciar sesión para comentar.

Respuesta aceptada

Sunil Patidar
Sunil Patidar el 10 de Nov. de 2020
Hi Kev,
It seems to be an issue with the 'trainYOLOV2ObjectDetector' function not being able to accept images that are of size [M x N x 1]. As a workaround you might need to duplicate your grayscale image across all three channels, and use a network that accepts [M x N x 3] sized matrices.
  1 comentario
Kev el 10 de Nov. de 2020
It works after converting single channel grayscale into 3 channel grayscale.

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by