arXiv:2608.28161cs.CVAug 2026

Manuscript Offprint

arXiv:2608.28161

Empowering Local Agriculture: A Deep Learning-Powered Web System for Identifying Bangladeshi Mango Varieties

Monowar Islam, Safaruzzaman Shovo

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Monowar Islam 1^{1} ID, Safaruzzaman Shovo 1^{1} ID

1^{1}Faridpur Engineering College, University of Dhaka, Bangladesh

Email: dew.shishir5000@gmail.com; shovo.3052@fec.edu

Abstract—Bangladesh grows some of the tastiest mangoes in the world, but telling different varieties apart just by looking at them isn't easy - even for farmers who've worked with mangoes for years. Varieties like Amrapali, Bari-4, Bari-7, Fazlee, Harivanga, Kanchon Langra, Katimon, Langra, Mollika, and Nilambori each have their own unique qualities, but misidentification happens all the time. We wanted to build something practical that could help farmers, traders, and everyday buyers identify mango varieties instantly from a simple photo. So we created a deep learning system that does exactly that, and put it online so anyone can use it for free. First, we collected over 2000 high-quality mango photos (3024×4032 pixels) from local markets and farms across Bangladesh. We grouped Bari-4 and Bari-7 together as "Bari" since they're closely related, giving us nine distinct variety classes. After splitting the data (70% for training, 15% for validation, 15% for testing), we applied some smart augmentation tricks - flipping images, rotating them slightly, adjusting colors - to help our models learn better. We tested three different pre-trained networks: ResNet18, ResNet50, and EfficientNetB0, fine-tuning each one on our mango dataset. Once we found the best model, we built a simple web interface using Streamlit and made it live at mangoclassifier.streamlit.app. EfficientNetB0 turned out to be the clear winner. It correctly identified mango varieties 98.01% of the time on our validation set and 97.36% on the test set - way better than ResNet18 (86.47%) and ResNet50 (78.55%). Looking at individual varieties, our model performed impressively well, with F1-scores ranging from 0.93 to 0.99. The combined Bari class scored an F1 of 0.97. Best of all, EfficientNetB0 is surprisingly lightweight - only about 4 million parameters - so it runs quickly even on modest hardware. The web app is live and lets anyone upload a mango photo and get an instant prediction. What started as a simple idea - can a computer learn to recognize mango varieties? - turned into a working tool that people can actually use. Our system is accurate, fast, and freely available online. Whether you're a farmer checking your harvest, a seller labeling your products, or just someone curious about what kind of mango you're about to eat, this tool can help. We're already thinking about next steps: gathering more photos, adding new varieties, and maybe building a mobile app so it works even better in rural areas with limited internet.

Index Terms—agricultural automation, deep learning, EfficientNet, mango variety classification, transfer learning, web-based system

I. INTRODUCTION

Mango (Mangifera indica L.) is the most economically significant fruit crop of Bangladesh, often referred to as the “king of fruits.” The country ranks seventh in global mango production, with an annual harvest exceeding 1.5 million metric tonnes grown across approximately 93,000 hectares of orchards [1]. Mango contributes substantially to rural livelihoods, post-harvest enterprises, and export revenue. Bangladesh cultivates a remarkably diverse array of mango varieties—over 200 named cultivars—each distinguished by unique organoleptic properties, skin colour, shape, and market value. Among these, varieties such as Langra, Fazlee, Amrapali, Harivanga, and the BARI-released hybrids (BARI-4 and BARI-7) hold particular commercial prominence.

Despite this diversity, the post-harvest supply chain operates with limited varietal traceability. Mango identification at wholesale markets, collection points, and retail outlets still depends overwhelmingly on the subjective judgment of experienced handlers. This manual approach suffers from several well-documented shortcomings: inconsistency across graders, difficulty in distinguishing visually similar cultivars, and a growing shortage of skilled labour as younger generations migrate away from agriculture. For export-oriented consignments, incorrect variety labelling can lead to contract rejection, reputational damage, and financial loss. An objective, rapid, and accessible variety identification tool therefore addresses a real and pressing need within the sector.

Recent advances in computer vision, driven by deep convolutional neural networks (CNNs), have demonstrated remarkable success in fine-grained visual categorisation tasks. Several studies have applied CNN-based methods to fruit classification [2]–[4] and, more specifically, to mango variety recognition [5]–[7]. These works, however, predominantly use datasets of limited geographic scope (Indian, Thai, or Brazilian cultivars) or images acquired under highly controlled conditions. The Bangladeshi mango landscape, with its own set of cultivars and challenging real-world imaging conditions (uneven lighting, mixed backgrounds, varying stages of ripeness), has received minimal attention. Moreover, the majority of published systems stop at model evaluation on a static test set and do not offer a deployable tool accessible to non-technical end-users.

The present work is motivated by three observations: (i) the commercial importance of reliable mango variety identification in Bangladesh, (ii) the absence of a dedicated Bangladeshi mango image dataset, and (iii) the gap between accurate laboratory models and field-deployable solutions. We set out to construct a representative dataset of nine popular Bangladeshi mango varieties, rigorously compare several modern CNN architectures under consistent training protocols, and embed the best-performing model into a lightweight web application that can be used by anyone with a smartphone and an internet connection.

The major contributions of this work are:

• Development of a web-based mango variety recognition system accessible via standard browsers.

• Construction of a 2,013-image Bangladeshi mango dataset spanning nine commercially important cultivars collected from real-world sources.

• Systematic comparison of ResNet18, ResNet50, and EfficientNetB0 under transfer learning with identical augmentation and training regimens.

• Achievement of 97.36% test accuracy with EfficientNetB0, establishing a strong performance benchmark for Bangladeshi mango classification.

• Public deployment of the final model through a Streamlit application at mangoclassifier.streamlit.app, providing real-time predictions with class probabilities.