Image recognition is a major field within machine learning and computer vision. Thanks to technological advances, the image classification process has become easier and can be applied across various sectors, ranging from security systems to healthcare services. This project focuses on fruit image classification to understand the application of deep learning models in distinguishing different types of fruits.
In the retail and food industries, the ability to automatically recognize fruits greatly helps optimize processes such as sorting, packing, and quality control of fruits. Automation reduces human errors, increases productivity, and lowers operational and labor costs for companies.
- Develop an image classification model capable of identifying various fruit types with high accuracy.
- Save the model in multiple formats compatible with different platforms and devices.
- Apply deep learning to improve image classification accuracy.
- Search for a dataset
- Split the dataset into 80% training set and 20% test set
- Use a Sequential model with Conv2D and pooling layers
- Plot model accuracy and loss graphs
- Save the model in SavedModel, TF-Lite, and TFJS formats
- Implement callbacks
- Perform inference using one of the models (TF-Lite, TFJS, or SavedModel with TensorFlow Serving).
Dataset is obtained from Kaggle’s Fruits Dataset, which contains 5 folders:
- fruits-360_100x100
- fruits-360_3-body-problem
- fruits-360_dataset_meta
- fruits-360_multi
- fruits-360_original-size
For this project, only the fruits-360_100x100 folder is used. This dataset contains 207 classes.
-
Recommended to run on Google Colab
- Upload the file [Deep Learning]_Submission_Klasifikasi_Gambar_Atifa_Fiorenza.ipynb to Google Colab
- Adjust or customize the existing code as needed
- Run run all on the project
-
If running locally
- Make sure you are connected to the internet to install required modules (libraries)
- Open cmd or PowerShell as administrator
pip install -r requirements.txt
- Open File
[Deep Learning]_Submission_Klasifikasi_Gambar_Atifa_Fiorenza.ipynbtp Google Colab - Adjust or customize the existing code as needed
- Do run all in project
- Based on experiments, the results are:
- Model : Sequential
- Train Accuracy : 96%
- Test Accuracy : 98%
- The model is able to predict fruit images inputted through inference.
- Further experiments using other pretrained models in this project (e.g., VGG, ResNet, etc.)
- Conduct additional experiments using the original and multi datasets
