Automated Mango Classification Using Convolutional Neural Networks (CNN)
Automated Mango Classification Using Convolutional Neural Networks (CNN)
Abstract:- This paper presents a system developed for the can discriminate between many classes with a high degree of
automated classification of different mango varieties using accuracy because of their ability to automatically learn and
Convolutional Neural Networks (CNNs). The model was extract features from images. Its capacity to distinguish
trained on an image dataset containing labeled mango between several mango kinds or stages of ripeness based on
varieties, which was augmented to enhance robustness. minute variations in texture, colour, and shape makes it
The CNN architecture comprises convolutional layers, particularly useful in agricultural applications.
pooling layers, and fully connected layers, optimized using
TensorFlow. The system achieved satisfactory accuracy on The system is made to withstand the difficulties that come
both training and validation datasets. Evaluation was with classifying images from real-world sources, like changing
conducted using confusion matrices and training curves. illumination, multiple viewpoints, and a variety of
The proposed system can classify mango images in real- backgrounds. In order to do this, data augmentation techniques
time, providing predictions with confidence scores. The are applied to the CNN model to strengthen its generalization
results demonstrate the potential of deep learning in and resilience.
automating fruit classification tasks, offering significant
benefits for agricultural and retail sectors by improving A thorough description of the CNN model's development,
efficiency and accuracy. use, and assessment is provided in this article. The architecture
of the model is specifically designed for the goal of classifying
Keywords:- Mango Classification, Convolutional Neural mangos. It consists of numerous convolutional layers followed
Networks, Deep Learning, Image Processing, Tensorflow. by ReLU activation functions and MaxPooling layers. To
ensure the model's efficacy for practical applications, its
I. INTRODUCTION performance is thoroughly assessed using crucial metrics like
confusion matrices, accuracy, and loss. Furthermore, the
Mango variety and quality categorization is an important system has an intuitive user interface that permits real-time
responsibility in the retail and agricultural industries, as it image categorization. This feature lets users submit new
directly affects market value, customer happiness, and images of mangoes and get predictions right away.
operational efficiency. This procedure has historically relied on
manual examination, which is time-consuming, labour- The goal of this project is to assist the retail and
intensive, and prone to human error. There is a growing need agricultural industries by automating the categorization process
for dependable, scalable solutions that can expedite the for mangos. This scalable solution will significantly improve
categorization process and guarantee consistency in quality the accuracy and efficiency of mango sorting and quality
control as the need for automation in agriculture grows. control. The study demonstrates the potential of CNNs to
transform agricultural automation in the following sections,
Convolutional Neural Networks (CNNs), one of the most which cover the preparation of the dataset, model design,
recent developments in deep learning, have shown impressive training procedure, methods for evaluation, and the system's
results in picture classification tasks, which makes them a actual implementation.
prime contender for automating mango categorization. CNNs
Validation Results
The second image compares predicted results against the
true labels for several mangoes. The model correctly
identified most mangoes, but there are some
misclassifications.
For example, it correctly identified "Sindhri" and "Langra"
with high accuracy but misclassified "Chaunsa (White)" as
"Fajri" and another "Chaunsa (White)" as "Chaunsa
(Black)."
Confusion Matrix:
A. Results
Model Performance
Over the course of ten epochs, the CNN model was trained,
and accuracy and loss were tracked to ensure optimal
training results. A training accuracy of roughly 85% and a
validation accuracy of roughly 65% were attained by the
finished model.
Training loss steadily dropped, suggesting that the model
was picking up new information efficiently. However, the
validation loss plateaued, indicating that more epochs
might not produce appreciable gains or that early
termination might be taken into consideration in Fig 3 Graph depicting the Epochs vs Accuracy
subsequent iterations to avoid overfitting.
ACKNOWLEDGMENT
Fig 6 Prediction for a New Image Firstly, and foremost, I would want to express my sincere
gratitude to my mentor/supervisor Dr. Shivandappa, whose
B. Discussion wise counsel, perceptive criticism, and unwavering support
were indispensable during the research and writing phases. The
Model Accuracy: caliber of this work has been much improved by your
knowledge and assistance.
In certain mango varieties, the model exhibits strong
classification performance with high confidence. But the I also like to thank R.V. College of Engineering for
confusion matrix shows that some variations are difficult granting me access to the materials and equipment I needed to
for the model to work with, especially those that have little do this study. A setting that was favorable for research,
differences. computational resources, and data availability were all
This could be because these mangoes' visual characteristics important in the creation of this study.
are identical, requiring additional model optimization or
the addition of more varied samples to the collection. REFERENCES
Prediction Confidence and Real-World Application: [1]. Bhargava A., Bansal A. Fruits and vegetables quality
evaluation using computer vision: A review. J. King
Most of the model's predictions had confidence ratings Saud Univ.-Comput. Inf. Sci. 2021;33:243–257. doi:
above 90%, indicating a typically high level of prediction 10.1016/j.jksuci.2018.06.002. - DOI
confidence. This high degree of confidence indicates that [2]. Nithya, R., Santhi, B., Manikandan, R., Rahimi, M., &
the model can be trusted in practical applications, like Gandomi, A. H. (2022). Computer Vision System for
agricultural automated mango sorting systems. Mango Fruit Defect Detection Using Deep
Convolutional Neural Network. Foods (Basel,
Limitations and Future Research: Switzerland), 11(21), 3483. https://doi.org/10.3390/
foods11213483
Due to much lower sample numbers, there may be [3]. Hu, Z., Bhattacharya, S., & Butte, A. J. (2022).
problems with class imbalance with some mango kinds. To Application of Machine Learning for Cytometry Data.
solve this, future study may include gathering more data or Frontiers in immunology, 12, 787574.
utilizing methods such as SMOTE (Synthetic Minority https://doi.org/10.3389/fimmu.2021.787574
Over-sampling Technique). [4]. Naik, S., Desai, P. (2022). Mango (Mangifera indica L.)
Classification Using Convolutional Neural Network
IV. CONCLUSION and Linear Classifiers. In: Poonia, R.C., Singh, V.,
Singh Jat, D., Diván, M.J., Khan, M.S. (eds)
Effective Multi-Class Classification: Proceedings of Third International Conference on
Sustainable Computing. Advances in Intelligent
Both the training and validation stages of the CNN model's Systems and Computing, vol 1404. Springer,
training saw good accuracy in the classification of the Singapore. https://doi.org/10.1007/978-981-16-4538-
dataset that was provided. This demonstrates how well the 9_17
model generalizes to new data. [5]. Rizwan Iqbal, H. M., & Hakim, A. (2022).
Effectiveness of Data Augmentation: Classification and Grading of Harvested Mangoes
Using Convolutional Neural Network. International
By imitating real-world fluctuations in the photos, the use Journal of Fruit Science, 22(1), 95–109.
of data augmentation techniques such as random flipping, https://doi.org/10.1080/15538362.2021.2023069
rotation, zoom, brightness, and contrast alterations
favorably contributed to the resilience of the model.