I have a problem with my detector , i get [bbox, score, label] empty.

1 回表示 (過去 30 日間)
abdullah al-dulaimi
abdullah al-dulaimi 2022 年 7 月 17 日
回答済み: Shuba Nandini 2023 年 9 月 1 日
%% detection
pp=alexnet;
pp1=pp.Layers;
pp=pp.Layers(1:19);
ppp=[pp
fullyConnectedLayer(2)
softmaxLayer()
classificationLayer()];
options = trainingOptions('sgdm', ...
'MiniBatchSize', 10, ...
'InitialLearnRate', 1e-3, ...
'MaxEpochs', 1, ...
'CheckpointPath', tempdir);
train1 =trainFastRCNNObjectDetector(gTruth, ppp, options, ...
'NegativeOverlapRange', [0 0.1], ...
'PositiveOverlapRange', [0.5 1], ...
'SmallestImageDimension', 300);
img = imread('image (825).JPG');
[bbox, score, label] = detect(train1, img);
imshow(insertObjectAnnotation(img, 'rectangle', bbox, label));

回答 (1 件)

Shuba Nandini
Shuba Nandini 2023 年 9 月 1 日
Hello, 
It is my understanding that you want to train the trainFastRCNNObjectDetector” with ‘alexnet’ as the backbone network.
As per the documentation, “trainFastRCNNObjectDetector” function offers a functionality to automatically transform the backbone classification network, into a Fast R-CNN network by adding an ROI max pooling layer, classification layer and regression layer.
The above functionality can be achieved, by specifying the required classification network name for the “network” argument. 
Please refer to the following link, for further information, 
Hope this helps!
Regards,
Shuba Nandini

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by