How can I improve my image classification CNN?
Show older comments
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!
Accepted Answer
More Answers (0)
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!