yolov3 detect image

5 vues (au cours des 30 derniers jours)
sam ho
sam ho le 14 Nov 2020
I am useing the yolov3 detect sample
i want to detect my image but have some problem
it seems not match the yolov3Detect Xtest type
please helpe me
aaaa=imread('vehicleImage.jpg');
% Convert to dlarray.
aaaa=single(aaaa);
XTest = dlarray(aaaa, 'SSCB');
executionEnvironment = "auto";
[bboxes, scores, labels] = yolov3Detect(net, XTest, networkOutputs, anchorBoxes, anchorBoxMasks, confidenceThreshold, overlapThreshold, classNames);
clear yolov3Detect
if ~isempty(scores{1})
I = insertObjectAnnotation(aaaa, 'rectangle', bboxes{1}, scores{1});
end
figure('Name','detect')
imshow(I)

Réponses (1)

Isee You
Isee You le 10 Mai 2021
i = imread(fullFileName);
confidenceThreshold = 0.7;
overlapThreshold = 0.5;
i=imresize(i,networkInputSize(1:2));
i=im2single(i);
XTest = dlarray(i,'SSCB');
if (executionEnvironment == "auto" && canUseGPU) || executionEnvironment == "gpu"
XTest = gpuArray(XTest);
end
[bboxes, scores, labels] = yolov3Detect(net, XTest, networkOutputs, anchorBoxes,anchorBoxMasks, confidenceThreshold, overlapThreshold, classNames);

Community Treasure Hunt

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

Start Hunting!

Translated by