Cant use more than one class, strcmp issue?

조회 수: 5 (최근 30일)
Conner Carriere
Conner Carriere 2022년 11월 22일
댓글: Conner Carriere 2022년 11월 22일
I am trying to implement more labels into my YoloV4 CNN, but I am getting this error message.
I am not really sure what is going on, I have tried to go into the problem areas and find something out, but no luck. not really sure what the gTruthClassNames is, but I think thats my problem. I would attach my code but it is to large (any way around that)
Could this also be caused by not using one of the class names not being used, is there a way around this?
Here is my class names
className = {'Front-Windscreen-Damage'...
,'Headlight-Damage'...
,'Major-Rear-Bumper-Dent'...
,'Rear-windscreen-Damage'...
,'RunningBoard-Dent'...
,'Sidemirror-Damage'...
,'Signlight-Damage'...
,'Taillight-Damage'...
,'bonnet-dent'...
,'doorouter-dent'...
,'fender-dent'...
,'front-bumper-dent'...
,'medium-Bodypanel-Dent'...
,'pillar-dent'...
,'quaterpanel-dent'...
,'rear-bumper-dent'...
,'roof-dent'} ;
These are the imputs, Ill share a link to my workspace below, it goes to my google drive as it is over 5mb. (Not sure if sharing like this is allowed, remove is not)...
[detector,info] = trainYOLOv4ObjectDetector(augmentedTrainingData,detector,options);
Thanks everyone!

답변 (1개)

Voss
Voss 2022년 11월 22일
This error happens because the inputs to strcmp are incompatible sizes.
Example 1: both inputs the same size (works):
a = {'baba', 'booey'};
b = {'barbara', 'booey'};
strcmp(a,b) % works
ans = 1×2 logical array
0 1
Example 2: one input a scalar, one non-scalar (works):
a = {'baba'};
b = {'barbara', 'booey'};
strcmp(a,b) % works
ans = 1×2 logical array
0 0
Example 3: non-scalar inputs of different sizes (error):
a = {'baba', 'booey', 'mountain'};
b = {'barbara', 'booey'};
strcmp(a,b) % error
Error using strcmp
Inputs must be the same size or either one can be a scalar.
This means that, in your case, gTruthClassNames and detectorClassNames are non-scalars with different sizes. I'm not able to say why that is or what you should do about it though.
  댓글 수: 1
Conner Carriere
Conner Carriere 2022년 11월 22일
Ok, so since mine will not be scalars, I have to pull those two values out and find a way to make them the same size.

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

카테고리

Help CenterFile Exchange에서 Recognition, Object Detection, and Semantic Segmentation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by