CNN seems to be too inaccurate to classify my images. Is there an alternative that I can explore?

조회 수: 37 (최근 30일)
Hi folks,
I've attached examples of 2 different classifications for images that I'm working with below. My CNN (and a retrained Alexnet) seem to be too inaccurate to classify the images reliably.
Is there an alternative image classification technique that you'd recommend I use?
Thanks in advance
Classification 1
Classification 2

채택된 답변

Daniel Vieira
Daniel Vieira 2020년 2월 21일
Alexnet is the simplest of the pretrained deep learning models, you might want to try others (resnet, inception, etc).
You might also not have enough images to get a good model, I don't know how many you have.
You might be experiencing overfitting, how went the training? A near 100% accuracy in training data with not that much in validation data would be a pretty strong indication of overfitting. You can avoid overfitting with image augmentation, dropout layers, etc.
Also, some problems have inherently ambiguous classes. A network to classify musical genders in song files might have a hard time in separating similar musical subgenders, for example. You might take some time to think if this is not your case. If it is, your network might not be "innacurate" at all, you problem is inherently difficult instead. The prediction class scores might give an idea of such ambiguities: 2 classes appearing with average-ish scores, indicating the image might belong to either.
  댓글 수: 2
Daniel Vieira
Daniel Vieira 2020년 2월 26일
99.6% seems rather accurate to me, does your application really need more...? Or is this only on the training data, and it's performing poorly on test data?
also, I noticed that, by your MaxEpochs, MiniBachSize and ValidationFrequency parameters, you only let your network make 2 validations, it is probably finishing training by number of Epochs instead of validation criteria, which is a bit pointless. I would let it make validations more often, like every 5 or 10 iterations, and increase MaxEpochs. Then also set a ValidationPatience value to 5 or 10 (default is infinite, which doesn't help at all).
Another thing that might help is setting learn rate decay parameters (LearnRateSchedule, LearnRateDropFactor and LearnRateDropPeriod). Setting these parameters makes learning slow down as it goes on, effectively "refining" your model as it nears the end of training.
you could also try other training optimizers, sgdm is only 1 of them. I feel adam tends to do a better job (but I admit this is just a feeling). Adam optimizer already has a built-in learn rate "modulation" feature, so it doesn't use the LearnRateSchedule, LearnRateDropFactor and LearnRateDropPeriod parameters.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)


Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기




Community Treasure Hunt

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

Start Hunting!

Translated by