Logo PTI Logo FedCSIS

Position Papers of the 21st Conference on Computer Science and Intelligence Systems

Annals of Computer Science and Information Systems, Volume 48

Browser-Deployed Lightweight YOLO for Banana Ripeness Classification on Commodity Edge Devices

, , ,

DOI: http://dx.doi.org/10.15439/2026F5575

Citation: Sumetee Jirapattarasakul, , ,

Full text

Abstract. Automated banana ripeness inspection is increasingly important for agricultural sorting at small and medium scale. Existing solutions either rely on cloud computer-vision services, which raise concerns of cost, latency, and data privacy, or on dedicated edge accelerators (e.g. Raspberry Pi or Jetson devices) which carry a non-trivial hardware barrier. The goal of this study is to determine whether a modern lightweight image classifier can be deployed and run entirely inside a web browser, on the consumer hardware that producers already own, while retaining sufficient accuracy for practical quality grading. We collected a longitudinal dataset of 24 unique banana fruits imaged over three days under controlled storage conditions, and trained a YOLOv8n-cls classifier (You Only Look Once, version 8, nano classification variant; 1.44M parameters, 5.52MB after export to the Open Neural Network Exchange, ONNX, format) under three class schemes (4-class fine-grained, 3-class quality grading, 2-class industrial binary). We report results under three evaluation protocols including a Leave-One-Day-Out (LODO) cross-validation that controls for fruit-identity leakage. Under this leakage-controlled protocol the classifier achieves 0.818 ± 0.045 accuracy for 3-class quality grading, while on-device inference through onnxruntime-web runs at 17.8 ± 0.4ms latency (56frames per second) on a consumer laptop CPU. Beyond the accuracy numbers, we quantify the magnitude of banana-identity leakage in random cross validation (a 20\% accuracy gap for the binary task), highlighting a methodological pitfall in small longitudinal fruit datasets.

References

  1. J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, “You only look once: Unified, real-time object detection,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016, pp. 779–788.
  2. G. Jocher, A. Chaurasia, and J. Qiu, “Ultralytics YOLOv8,” https://github. com/ultralytics/ultralytics, 2023, software, version 8.x.
  3. K. G. Liakos, P. Busato, D. Moshou, S. Pearson, and D. Bochtis, “Machine learning in agriculture: A review,” Sensors, vol. 18, no. 8, p. 2674, 2018.
  4. Microsoft, “ONNX Runtime Web,” https://onnxruntime.ai/docs/tutorials/ web/, 2024.
  5. F. M. A. Mazen and A. A. Nashat, “Ripeness classification of bananas using an artificial neural network,” Arabian Journal for Science and Engineering, vol. 44, no. 8, pp. 6901–6910, 2019.
  6. I. A. Sabilla, C. S. Wahyuni, C. Fatichah, and D. Herumurti, “Determining banana types and ripeness from image using machine learning methods,” in International Conference on Artificial Intelligence and Information Technology, 2019.
  7. D. Smilkov, N. Thorat, Y. Assogba, A. Yuan, N. Kreeger, P. Yu, K. Zhang, S. Cai, E. Nielsen, D. Soergel, S. Bileschi, M. Terry, C. Nicholson, S. N. Gupta, S. Sirajuddin, D. Sculley, R. Monga, G. Corrado, F. B. Viegas, and M. Wattenberg, “TensorFlow.js: Machine learning for the web and beyond,” Proceedings of Machine Learning and Systems, vol. 1, pp. 309– 321, 2019.