/Fruit-Classification-Project

Exploration into CNN classification using the Keras API and fruit-360 dataset from Kaggle

Primary LanguageJupyter Notebook

Fruit-Classification-Project

Exploration into CNN classification using the Keras API and fruit-360 dataset from Kaggle In this project using the Tensorflow Keras API I create a series of CNN models and evaluate the best one on the Fruit-360 dataset from Kaggle which contains 131 fruits and vegetables to classify. In addition I implement the 3 best models into pytorch framework.

Ultimately the best model was a transfer learning model based on pretrained weights from ResNet50

Link to model Files: https://drive.google.com/file/d/1NQjai2o9rIqRwpoV6iCJ8sOamJs0_K1e/view?usp=sharing

Custom CNN Model

This model has 4 convolutional layers and 2 fully connected layers. The fully connected layers implement dropout as a method of regularization.

Confusion Matrix as well as score on dataset:

Alt text

Loss and Accuracy Per Epoch:

Alt text

Test Image Batch:

Alt text

Green means Passed, Red for Fail

Transfer Learning

Transfer Learning is done on ResNet50 pretrained on Imagenet. The features computed by ResNet is average pooled and passed into two fully connected layer where softmax layer outputs predictions.

Confusion Matrix as well as score on dataset:

Alt text

Loss and Accuracy Per Epoch:

Alt text

Test Image Batch:

Alt text

Green means Passed, Red for Fail