How can I improve my image classification CNN?
7 次查看(过去 30 天)
显示 更早的评论
My dataset is about 750 daisies and 1000 dandelions. They're input as 512x512 color images. I preprocess them by scaling them down to 256x256, making them grayscale, and running an edge detector. I split them into 70% training images and 30% verification images, then run them through a patternnet NN with layer options
layers = [
imageInputLayer([256 256 1])
convolution2dLayer(3,8,'Padding','same')
batchNormalizationLayer
reluLayer
maxPooling2dLayer(2,'Stride',2)
convolution2dLayer(3,16,'Padding','same')
batchNormalizationLayer
reluLayer
maxPooling2dLayer(2,'Stride',2)
convolution2dLayer(3,32,'Padding','same')
batchNormalizationLayer
reluLayer
fullyConnectedLayer(2)
softmaxLayer
classificationLayer];
and training options
options = trainingOptions('adam', ...
'ValidationData', imgValidation, ...
'Plots', 'training-progress');
where imgValidation is the 30% of images I split for validation.
The plot of the training looks like this:
So I believe it is overfitting, but I'm not entirely sure how to fix that.
I think it's likely that there is room for improvement in the layer definitions. I took them with minor changes from this example https://www.mathworks.com/help/deeplearning/ug/create-simple-deep-learning-network-for-classification.html .
Thanks for taking a look at this. Any help is appreciated!
0 个评论
采纳的回答
Divya Gaddipati
2021-3-8
There are a lot of examples in the documentation that you can refer to for the task of Image classification using deep learning. Here are a few to get started:
2) The most common method used is Transfer Learning. You can refer to this example to understand more on transfer learning, and this page which provides the list of the available pretrained models.
3) You can also use the Deep Network Designer that provides all these pretrained models. Refer to this link to understand more.
4) Additionally, you can also refer to the documentation page that explains some of the tips and tricks while training a deep learning network.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Deep Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!