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 件のコメント

Laura Hann
Laura Hann 2019 年 2 月 19 日
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