イメージラベラーを利用して目,口,歯を検出した時に文を表示する方法
Show older comments
やりたい事は,目と口を認識したらhello worldと表示.ただし,歯があった場合動作しないプログラムの作成をしたいです.
イメージラベラーを利用して口と目と歯の認識は出来るようになったのですが,その認識した事を
どのような条件文として書いたらいいのかが分かりません.
このプログラムで学習させています.
pos_ins = emt10;
pos_dir = fullfile('C:\Users\tsu-p\Desktop\face');
addpath(pos_dir);
options = trainingOptions('sgdm', ...
'MiniBatchSize', 32, ...
'InitialLearnRate', 1e-6, ...
'MaxEpochs', 10);
moutheyercnn10 = trainRCNNObjectDetector(pos_ins, alexnet, options, 'NegativeOverlapRange', [0 0.3]);
このプログラムで画像の中の口と目と歯を認識して表示するプログラムです.
Imgfilename = strcat('C:\Users\tsu-p\Desktop\face\face8.jpg');
img = imread(Imgfilename);
[bboxes,score,label] = detect(moutheyercnn10,img,'MiniBatchSize',32);
detectedImg = insertObjectAnnotation(img, 'Rectangle', bboxes, cellstr(label));
figure
imshow(detectedImg);
分かる方がいらっしゃったら教えていただきたいです.
1 Comment
Atsushi Ueno
on 10 May 2021
>イメージラベラーを利用して口と目と歯の認識は出来るようになった
detectedImg = insertObjectAnnotation(img, 'Rectangle', bboxes, cellstr(label));
「オブジェクト認識枠(bboxes)に認識オブジェクト名(label)を表示させてimshowで図示する事ができた」
と言う事ですね
>その認識した事をどのような条件文として書いたらいいのか
は「認識オブジェクト名(label)に『目』『口』『歯』が含まれているか否かを判定する」
と言い換える事が出来ます
Accepted Answer
More Answers (0)
Categories
Find more on 深層学習を使用したオブジェクトの検出 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!