Using a pretrained Neural Network.

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

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) + "%");

댓글을 달려면 로그인하십시오.

답변 (0개)

질문:

2019년 2월 18일

댓글:

2019년 2월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by