This project explores the development and deployment of a robust deep learning ensemble model for accurate fruit classification, aimed at enhancing both curiosity-driven identification and smart agricultural automation. Traditional methods often rely on individual CNN models, which struggle in complex classification scenarios. To address this, two ensemble models were developed—one leveraging transfer learning with attention mechanisms. The models integrated AlexNet, ResNet-50, and EfficientNet-B7 using a weighted approach. The attention-enhanced ensemble showed significant improvements in performance, with enhanced interpretability via CAM, SHAP, and LIME visualizations. Real-time deployment using ONNX Runtime and web-based prediction achieved high-speed and privacy-preserving inference.
The proposed ensemble model combining attention and transfer learning substantially improves fruit classification performance. Real-time deployment in various environments—from images to live camera feeds—demonstrates the practicality and efficiency of the system. Interpretability techniques reveal the model’s decision pathways, offering transparency critical for real-world adoption in agriculture and health-related applications.
Although the attention-enhanced model outperforms others, it shows limitations with ambiguous fruit types like cherry vs. black cherry. Performance degradation may occur with underrepresented fruit classes or in poor lighting conditions.
Future directions include expanding the dataset to include more rare fruits, integrating multilingual fruit information systems, and embedding the model into lightweight edge devices for offline use in rural areas. Incorporating federated learning can enhance generalizability across regions.