How to asign class name to detection result?
2 ビュー (過去 30 日間)
古いコメントを表示
Hello guys, after running YOLOv4 detector which I made with help of example on MathWorks page, I run detector on test image and it shows the labels also the score for each label but doesn’t show the name of the predicted class… how to add the class name for each label in results?
0 件のコメント
回答 (1 件)
Walter Roberson
2023 年 5 月 24 日
Second output of max() can tell you the index of the most probable class. Then you can use the index to index the class names.
classnames = ["Ruby"; "Zattar"; "Swing"; "BobbleHead"];
classvals = rand(10, length(classnames)) %except for you classvals would be output from classification
[~, classidx] = max(classvals, [], 2);
detected_class = classnames(classidx)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image Data Workflows についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!