0% found this document useful (0 votes)
30 views7 pages

Automated Mango Classification Using Convolutional Neural Networks (CNN)

This paper presents a system developed for the automated classification of different mango varieties using Convolutional Neural Networks (CNNs). The model was trained on an image dataset containing labeled mango varieties, which was augmented to enhance robustness. The CNN architecture comprises convolutional layers, pooling layers, and fully connected layers, optimized using TensorFlow. The system achieved satisfactory accuracy on both training and validation datasets.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views7 pages

Automated Mango Classification Using Convolutional Neural Networks (CNN)

This paper presents a system developed for the automated classification of different mango varieties using Convolutional Neural Networks (CNNs). The model was trained on an image dataset containing labeled mango varieties, which was augmented to enhance robustness. The CNN architecture comprises convolutional layers, pooling layers, and fully connected layers, optimized using TensorFlow. The system achieved satisfactory accuracy on both training and validation datasets.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Volume 9, Issue 9, September– 2024 International Journal of Innovative Science and Research Technology

ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24SEP163

Automated Mango Classification Using


Convolutional Neural Networks (CNN)
Mohammad Bilal M1 Dr. Shivandappa2
Department of Biotechnology Department of Biotechnology
RV College of Engineering RV College of Engineering
Bangalore, India Bangalore, India

Sanju H K3 Dr.Narendra Kumar S4


Department of Biotechnology Department of Biotechnology
RV College of Engineering RV College of Engineering
Bangalore, India Bangalore, India

Vignesh Kumar Kaipa5


Department of Biotechnology
RV College of Engineering
Bangalore, India

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

IJISRT24SEP163 www.ijisrt.com 269


Volume 9, Issue 9, September– 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24SEP163

Fig 1 A Typical CNN Model

II. METHODS  Model Construction


The CNN model is built using TensorFlow's Keras API.
 Data Preparation The architecture includes convolutional layers followed by
We use TensorFlow's image_dataset_from_directory dense layers.
method to load and preprocess images from a specified
directory. Data augmentation techniques are applied to enhance
the training dataset.

 Model Compilation and Training


The model is compiled with the Adam optimizer and
SparseCategoricalCrossentropy loss function. Training is
performed over 10 epochs.

IJISRT24SEP163 www.ijisrt.com 270


Volume 9, Issue 9, September– 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24SEP163

 Evaluation and Visualization


Post-training, we evaluate the model and visualize
performance metrics such as loss and accuracy.

 Prediction and Confusion Matrix  Image Classification


We use the trained model to predict and visualize results To classify new images, we preprocess and use the trained
from validation data. The confusion matrix is plotted to model for prediction.
evaluate classification performance.

IJISRT24SEP163 www.ijisrt.com 271


Volume 9, Issue 9, September– 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24SEP163

 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:

 The The confusion matrix provides an overview of the


model's performance across all classes.
 The diagonal values (e.g., 1.00 for Chaunsa (White), 0.94
for Anwar Ratool) represent the correct predictions,
showing that the model performs well in some categories.
 However, there are instances of confusion between similar
mango varieties, as seen with "Fajri" and "Chaunsa
(White)," which indicates areas where the model could
improve.

Fig.2. Graph Depicting the Epochs vs Cross Entropy Loss

III. RESULTS AND DISCUSSION

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.

IJISRT24SEP163 www.ijisrt.com 272


Volume 9, Issue 9, September– 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24SEP163

Fig 4 Prediction Results

Fig 5 Confusion Matrix

IJISRT24SEP163 www.ijisrt.com 273


Volume 9, Issue 9, September– 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24SEP163

 Visualization and Interpretation:

 The model's performance was insightfully visualized


thanks to the confusion matrix and random guesses. In
example, the confusion matrix demonstrated how
accurately the model distinguished between various
classes, which made it easier to pinpoint any particular
areas where the model might be falling short.

ACKNOWLEDGMENT

My profound thanks goes out to everyone who helped to


make this review paper on "Automated Mango Classification
Using Convolutional Neural Networks (CNN)" a success.

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.

IJISRT24SEP163 www.ijisrt.com 274


Volume 9, Issue 9, September– 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24SEP163

[6]. Rahat, M. et al. (2021). Deep CNN-Based Mango Insect


Classification. In: Uddin, M.S., Bansal, J.C. (eds)
Computer Vision and Machine Learning in Agriculture.
Algorithms for Intelligent Systems. Springer,
Singapore. https://doi.org/10.1007/978-981-33-6424-
0_5
[7]. S. Naik, B. Patel, Thermal imaging with fuzzy classifier
for maturity and size based non-destructive mango
(Mangifera indica L.) grading, in 2017 International
Conference on Emerging Trends & Innovation in ICT
(ICEI). IEEE Feb 2017, pp. 15–20
[8]. I. Sa, Z. Ge, F. Dayoub, B. Upcroft, T. Perez, C.
McCool, Deepfruits: a fruit detection system using deep
neural networks. Sensors 16(8), 1222 (2016)
[9]. H. Chen, J. Xu, G. Xiao, Q. Wu, S. Zhang, Fast auto-
clean CNN model for online prediction of food
materials. J Parallel Distrib Comput 117, 218–227
(2018)
[10]. A.K. Mortensen, M. Dyrmann, H. Karstoft, R.N.
Jørgensen, R. Gislum, Semantic segmentation of mixed
crops using deep convolutional neural network, in
CIGR-AgEng Conference, 26–29 June 2016, Aarhus,
Denmark. Abstracts and Full papers. Organising
Committee, CIGR 2016, pp. 1–6

IJISRT24SEP163 www.ijisrt.com 275

You might also like