File Exchange

image thumbnail

Neural Network Toolbox(TM) Model for GoogLeNet Network

Pretrained GoogLeNet network model for image classification

91 Downloads

Updated

GoogLeNet is a pretrained model that has been trained on a subset of the ImageNet database which is used in the ImageNet Large-Scale Visual Recognition Challenge (ILSVRC). The model is trained on more than a million images, has 144 layers, and can classify images into 1000 object categories (e.g. keyboard, mouse, pencil, and many animals).

Opening the googlenet.mlpkginstall file from your operating system or from within MATLAB will initiate the installation process for the release you have.
This mlpkginstall file is functional for R2017b and beyond.
Usage Example:
% Access the trained model
net = googlenet;
% See details of the architecture
net.Layers
% Read the image to classify
I = imread('peppers.png');
% Adjust size of the image
sz = net.Layers(1).InputSize
I = I(1:sz(1),1:sz(2),1:sz(3));
% Classify the image using GoogLeNet
label = classify(net, I)
% Show the image and the classification results
figure
imshow(I)
text(10,20,char(label),'Color','white')

Comments and Ratings (13)

xiao

xiao (view profile)

Hey Shounak Mitra, thank you! I have solved it. The key is to create a copy of googlenet (with data augmentation) with DAGNetwork function.

Shounak Mitra

Hey Xiao,
That's true, you would have to follow some instructions outlined at https://www.mathworks.com/help/nnet/ref/nnet.cnn.layergraph.html?s_tid=doc_ta

For your reference, you can also refer to https://www.mathworks.com/help/nnet/ref/imagedataaugmenter.html?s_tid=srchtitle to know more about the imageDataAugmenter

you cannot manipulate the layers like that. Have you tried going through this

xiao

xiao (view profile)

I try to change the inputImageLayer for data augmentation, but occured the error: You cannot set the read-only property 'Layers' of DAGNetwork.

xiao

xiao (view profile)

thank you, good tutorial. I have a question. How to implement data augmentation for googlenet?

Shounak Mitra

Kuan, unfortunately, you cannot. you ought to have R2017b version. But you can use another model - AlexNet (https://www.mathworks.com/matlabcentral/fileexchange/59133-neural-network-toolbox-tm--model-for-alexnet-network) with the 17a version.

KUAN-YU CHOU

Hi, can I use it in R2017a version?

Thank you, such a nice tool.

cui

cui (view profile)

nice!

Shounak Mitra

Shounak Mitra

Hi,

Are you using the R2017b version?

Hello, I try to download it and I get an error message:

The support package is not compatible with your version of MATLAB or operating system

Updates

The piece of text 'This is for 17b GR' doesn't look appropriate for 'Other Requirements'

MATLAB Release
MATLAB 9.3 (R2017b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video