简体   繁体   中英

Python CNN image classification model fails to classify individual images

I am very new to machine learning. Looking at other work, I trained the following model https://www.kaggle.com/code/konstansan/cat-and-flower-image-classifier , which shows very high accuracy (98 - 99%) based on calculations for the testing set. To run the notebook, one needs a Kaggle account.

However, most often the model fails to classify accurately individual images from the testing set. I have 2 categories, 10 000 images per category in the training set, 2000 per category in the validation set, and 50 per category in the testing set. The images in the 3 sets are not too different in terms of size, contents, etc.

I then trained a similar model which had about 85% accuracy but still fails on individual images.

Could someone help? Thank you.

Sounds like model accuracy is good on training set and not really working on testing set right??, It might be because of any of the below reasons: bcz of algorithm bcz of hyper parameter bcz of data overfit bcz of data are might not be good

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM