ドキュメンテーションの中の「Faster R-CNN 深層学習を使用したオブジェクトの検出」に示されたプログラムの実行中に発生するエラーについて
Mostrar comentarios más antiguos
標記のプログラムおいて、ネットワークをこのプログラムの中で学習させるために、変数 doTrainingAndEval を true に設定して実行させたとき、
% Annotate detections in the image.
I = insertObjectAnnotation(I, 'rectangle', bboxes, scores);
のステップが終了した段階で、以下のような表示が出力されます。
******************************
Faster R-CNN オブジェクト検出器の学習が終了しました。
エラー: insertObjectAnnotation
LABELは空以外にする必要があります。
エラー: insertObjectAnnotation
エラー: insertObjectAnnotation
エラー: insertObjectAnnotation
エラー: fasterRCNNtrue (line 〇〇〇)
I = insertObjectAnnotation(I, 'rectangle', bboxes, scores);
******************************
このようなエラーが生じないようにする対応についてお教え下さい。
Respuestas (1)
Tohru Kikawada
el 3 de Sept. de 2018
こちら の例を実行された際のエラーと仮定してお答えいたします。
ご提示のエラーは変数 socres が空になっているため発生しているようです。
下記のとおり、上流のコードで detect メソッドを使って車両を検出していますが、検出が正しくできていないようです。Faster R-CNNの学習モデル( detector )が正しく生成されているかご確認ください。
% Run the detector.
[bboxes, scores] = detect(detector, I);
9 comentarios
Ryousuke Imanishi
el 3 de Sept. de 2018
Tohru Kikawada
el 4 de Sept. de 2018
trainFasterRCNNObjectDetector の部分で下記のように学習の進捗は表示されていますか。また、お使いのMATLABのバージョンやToolboxの構成はどうなっていますでしょうか。
*************************************************************************
次のオブジェクト クラスに対する Faster R-CNN オブジェクト検出器の学習:
* vehicle
手順 1/4: 領域提案ネットワーク (RPN) の学習。
単一の CPU で学習中。
|========================================================================================|
| Epoch | Iteration | Time Elapsed | Mini-batch | Mini-batch | Base Learning |
| | | (hh:mm:ss) | Accuracy | RMSE | Rate |
|========================================================================================|
| 1 | 1 | 00:00:01 | 39.06% | 1.01 | 0.0010 |
| 1 | 50 | 00:00:35 | 58.98% | 1.06 | 0.0010 |
| 1 | 100 | 00:01:05 | 42.97% | 1.12 | 0.0010 |
| 1 | 150 | 00:01:34 | 94.92% | 0.80 | 0.0010 |
| 2 | 200 | 00:02:09 | 45.70% | 1.20 | 0.0010 |
| 2 | 250 | 00:02:43 | 75.78% | 1.18 | 0.0010 |
| 2 | 300 | 00:03:17 | 49.22% | 0.86 | 0.0010 |
| 2 | 350 | 00:03:47 | 92.97% | 0.82 | 0.0010 |
Ryousuke Imanishi
el 4 de Sept. de 2018
Editada: michio
el 4 de Sept. de 2018
Tohru Kikawada
el 5 de Sept. de 2018
ありがとうございます。手順やToolboxの構成に問題はなさそうです。
エラーが出た際の bboxes や socres の内容はどうなっていますでしょうか。
>> bboxes
>> scores
Ryousuke Imanishi
el 5 de Sept. de 2018
Editada: michio
el 5 de Sept. de 2018
Tohru Kikawada
el 6 de Sept. de 2018
detector が指定した画像から車両を検出できていないようですね。学習するGPUデバイスによって学習結果が変わってくることがあり得るため、複数の画像に対して下記のテストをお試しいただけますか。 どの画像に対しても何も検出されないということですと、画像の型(uint8/single/double)など他の部分に問題がありそうです。
% To quickly verify the training, run the detector on a test image.
images = cell(10,1);
for k = 1:10
% Read a test image.
I = imread(testData.imageFilename{k});
% Run the detector.
[bboxes,scores] = detect(detector,I);
% Annotate detections in the image.
if isempty(scores)
images{k} = I;
else
images{k} = insertObjectAnnotation(I,'rectangle',bboxes,scores);
end
end
figure, montage(images)

Ryousuke Imanishi
el 6 de Sept. de 2018
Tohru Kikawada
el 7 de Sept. de 2018
ご連絡ありがとうございます。実行環境に差異に依存するなんらかの不具合の可能性がございます。
もし保守サービス有効なアカデミックライセンスまたはコマーシャルライセンスをご使用中でしたら、弊社技術サポート窓口(下記)のご利用もどうぞご検討ください。
お手数ですがよろしくお願いいたします。
Ryousuke Imanishi
el 7 de Sept. de 2018
Categorías
Más información sobre 深層学習を使用したオブジェクトの検出 en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!