Using a pretrained Neural Network.
Afficher commentaires plus anciens
Hello! I was going to use a pretrained network to detect objects but I am not having any luck, This is the code I am trying to use:
%load detector
net = googlenet;
% Read a test image.
I = imread(imagename);
% Run the detector.
[bboxes,scores,labels] = detect(net,I);
% Annotate detections in the image.
I = insertObjectAnnotation(I,'rectangle',bboxes,cellstr(labels));
figure
imshow(I)
I feel like this should be easy. When I searched for the answer I found how to train it.
Thanks for your help!
1 commentaire
Laura Hann
le 19 Fév 2019
What error are you getting?
This example seems to be what you're looking for:
If it's not working you problably don't have the toolbox installed.
[label,scores] = classify(net,I);
figure
imshow(I)
title(string(label) + ", " + num2str(100*scores(classNames == label),3) + "%");
Réponses (0)
Catégories
En savoir plus sur Object Detection dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!