How to label multiple objects in object detection with different names?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Banchon Sripanha
am 17 Dez. 2018
Kommentiert: Image Analyst
am 23 Apr. 2020
Hi there!
I've a problem with labelling my objects in an image.
Let's have a look at the image:
![TestFotoprobleem.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/199281/TestFotoprobleem.png)
This programme is detecting front/rear of the cars and a stop sign. I want the labels to say what they're looking at. For example: "Stop Sign Confidence: 1.0000", CarRear Confidence: 0.6446 and etc. As you may see, my programme adds the probability factors correctly. But there are still no strings/labelnames attached.
You can have a look at my code:
%%
% Read test image
testImage = imread('StopSignTest2.jpg');
% Detect stop signs
[bboxes,score,label] = detect(rcnn,testImage,'MiniBatchSize',128)
% Display detection results
label_str = cell(3,1);
conf_val = [score];
conf_lab = [label];
for ii=1:3
label_str{ii} = [ ' Confidence: ' num2str(conf_val(ii), '%0.4f')];
end
position = [bboxes];
outputImage = insertObjectAnnotation(testImage,'rectangle',position,label_str,...
'TextBoxOpacity',0.9,'FontSize',10);
figure
imshow(outputImage)
%%
I have NO clue in how to add strings in the label_str{ii} like the way I did with scores (num2str(conf_val(ii)).
Thanking you in advance!
2 Kommentare
Sarannya Udhayakumar
am 7 Apr. 2020
Bearbeitet: Sarannya Udhayakumar
am 7 Apr. 2020
hello... how to detect multiple objects in RCNN???
pls rply
Akzeptierte Antwort
Image Analyst
am 17 Dez. 2018
If insertObjectAnnotation() is not working, then use text().
1 Kommentar
Weitere Antworten (1)
Quoc-Bao Ta
am 25 Sep. 2019
Bearbeitet: Quoc-Bao Ta
am 25 Sep. 2019
Hello, How can i change the colors of bounding box?
0 Kommentare
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!