Using a pretrained Neural Network.
Mostrar comentarios más antiguos
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 comentario
Laura Hann
el 19 de Feb. de 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) + "%");
Respuestas (0)
Categorías
Más información sobre Object Detection en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!