Hi, I am trying to modify the pretrained neural network alexnet, How can i modify in order to classify only 4 specific objects (cars, houses, trees, people), im trying to do classify images in a video frame, Thanks.

5 Ansichten (letzte 30 Tage)
Hi, I am trying to modify the pretrained neural network alexnet, How can i modify in order to classify only 4 specific objects (cars, houses, trees, people), im trying to do classify images in a video frame, Thanks.

Antworten (1)

Mark Fajet
Mark Fajet am 6 Jul. 2017
Hello. Because AlexNet was trained to classify images into 1000 different categories, it has a fully connected layer that will produce an output array of 1000 probabilities. This layer will need to be changed to only produce 4 outputs.
Here is a quick example of how to get the layers of AlexNet and change one layer:
net = alexnet
layers = net.layers
layers(23) = fullyConnectedLayer(4)
After this, you'll want to retrain the network on your new dataset. For a more detailed explanation and code example, check out this video

Kategorien

Mehr zu Image Data Workflows finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by