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.
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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.
0 Commenti
Risposte (1)
Mark Fajet
il 6 Lug 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
0 Commenti
Vedere anche
Categorie
Scopri di più su Image Data Workflows in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!