Computer Vision Toolbox Feature Enhancement Request?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
1、The third input parameter "labels" in the "selectStrongestBboxMulticlass" function should accept multiple types, such as string array, character cell vector, not just categorical array and numerical array
% official example in "selectStrongestBboxMulticlass" function
detectorInria = peopleDetectorACF('inria-100x41');
detectorCaltech = peopleDetectorACF('caltech-50x21');
I = imread('visionteam1.jpg');
[bboxesInria,scoresInria] = detect(detectorInria,I,'SelectStrongest',false);
[bboxesCaltech,scoresCaltech] = detect(detectorCaltech,I,'SelectStrongest',false);
labelsInria = repelem("inria",numel(scoresInria),1);
labelsInria = categorical(labelsInria,{'inria','caltech'});
labelsCaltech = repelem("caltech",numel(scoresCaltech),1);
labelsCaltech = categorical(labelsCaltech,{'inria','caltech'});
allBBoxes = [bboxesInria;bboxesCaltech];
allScores = [scoresInria;scoresCaltech];
allLabels = string([labelsInria;labelsCaltech]);% if it is string array, don't support???
[bboxes,scores,labels] = selectStrongestBboxMulticlass(allBBoxes,allScores,allLabels,...
'RatioType','Min','OverlapThreshold',0.65);
annotations = string(labels) + ": " + string(scores);
I = insertObjectAnnotation(I,'rectangle',bboxes,cellstr(annotations));
imshow(I)
title('Detected People, Scores, and Labels')
2,The first input parameter "bboxA" in the "bboxresize" function should accept a type based on the supported float type, not the current positive integer type
bboxA = rand(1,4)
bboxB = bboxresize(bboxA,2)
Error using bboxresize>iParseInputs (line 115)
The value of 'bboxA' is invalid. Expected input number 1, bboxA, to be integer-valued.
Error in bboxresize (line 48)
params = iParseInputs(bboxA,scale);
0 Commenti
Risposta accettata
Jayanti
il 15 Mag 2025
Modificato: Jayanti
il 15 Mag 2025
Hi,
If your labels are in the form of a string array or a character cell array, you can convert them to a categorical vector before passing them to the “selectStrongestBboxMulticlass” function. For example, if you have a string array named “strArray”, you can use:
labels = categorical(strArray);
And regarding your second query, in MATLAB R2021a “bboxresize” function required integer-valued bounding boxes. However, starting from R2022a, MATLAB updated the behaviour of “bboxresize” to fully support spatial coordinates.
You can refer to below documentation link for more details:
Hope this will be helpful!
0 Commenti
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!