YOLO Detection on Grayscale Images

조회 수: 35 (최근 30일)
Kev
Kev 2020년 11월 3일
댓글: Kev 2020년 11월 10일
Hi,
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?
Thanks!
  댓글 수: 2
Sunil Patidar
Sunil Patidar 2020년 11월 6일
Hi,
Which MATLAB are you using?
Kev
Kev 2020년 11월 6일
MATLAB 2020a, and same issue was observed on 2020b.

댓글을 달려면 로그인하십시오.

채택된 답변

Sunil Patidar
Sunil Patidar 2020년 11월 10일
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
Kev
Kev 2020년 11월 10일
It works after converting single channel grayscale into 3 channel grayscale.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by