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 vues (au cours des 30 derniers jours)
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.

Réponses (1)

Mark Fajet
Mark Fajet le 6 Juil 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

Catégories

En savoir plus sur Image Data Workflows dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by