Web-Based Fruit Quality Detection Using Deep Learning with MobileNetV2 Architecture
Abstract
The modern agricultural industry and its supply chains rely heavily on accurate fruit quality sorting to reduce waste and maintain consumer satisfaction. Manual inspection presents various challenges, including subjectivity, worker fatigue, and slow processing times. This research develops an end-to-end, web-based deep learning system called "DeepFruit," designed to classify the condition of fruit as either fresh or rotten. The system utilizes Transfer Learning with the MobileNetV2 architecture—pre-trained on the ImageNet dataset—to achieve high efficiency with a low computational load.
A dataset of approximately 1.1 GB, containing images across six distinct categories (fresh and rotten conditions for apples, bananas, and oranges), was used for training. The model training followed a two-phase approach: first, the classification head was trained for 10 epochs, followed by fine-tuning the top 30 layers for 5 epochs using a conservative learning rate of 1 x 10⁻⁵. The trained model was containerized using Docker and served via a high-performance FastAPI backend hosted on Render, while a single-page application (SPA) built with React 18 and Vite was deployed on Vercel.
To minimize false positives, a strict confidence threshold of 0.60 was implemented. System evaluation confirms the successful integration of real-time edge processing via RESTful API requests, capable of generating precise classification probabilities. This implementation demonstrates that combining a lightweight deep learning architecture with scalable, cloud-native deployment provides an efficient blueprint for decentralized agricultural quality control pipelines.