贊助廠商

娛樂城推薦

首頁

刊登資訊

  • 刊登者:匿名
  • 時間:2021-06-02 03:10:05

尚未解答MATLAB-關於insertObjectAnnotation出現錯誤

MATLAB-關於insertObjectAnnotation出現錯誤

不好意想要請教各位
我目前正在學習使用Faster-RCNN來做目標檢測
整體訓練過程問題不大
但是在使用insertObjectAnnotation時
如果沒有檢測到目標
程式會直接強制停止
Command Windows上會顯示
Erroe using insertObjectAnnotation
LABEL to be nonempty
由於程式是循環檢測
本來就會出現沒有物體的狀況
想請教該如何讓程式跳過出現錯誤的那一幀
直接進入下一幀的循環呢?

附上程式碼
for i=1:6000
img=imread(['E:\碩士課程\影像資料\2\測試\frame
(',int2str(i),').jpg']);
[bbox,score,label]=detect(detector,img);
index = find(score>0.55);
bbox = bbox(index,:);
score = score(index,:);
label = label(index,:);
img=insertObjectAnnotation(img,'Rectangle',bbox,score);
detectedImg=insertShape(img,'Rectangle',bbox);
figure(1);
imshow(detectedImg);
end

目前有看到似乎可以利用try?或者是continue忽略接續
但是不清楚該如何使用
還請各位指導,謝謝!

--

0個答案 MATLAB-關於insertObjectAnnotation出現錯誤

其他問題

友站連結