DOI: 10.18178/joaat.13.1.18-22
YOLOX-Based Fruit Localization and Multi-Class External Defect Detection for Taiwanese Irwin Mangoes
2. Department of Plant Industry, National Pingtung University of Science and Technology, Pingtung 91201, Taiwan
3. Bachelor of Program in Scientific Agriculture, National Pingtung University of Science and Technology, Pingtung, 91201, Taiwan
Email: kuodung@tari.gov.tw (K.D.C.); edmondwjh9166@gmail.com (J.H.W.); justinliang@mail.npust.edu.tw (Y.S.L.); csiefly@mail.npust.edu.tw (C.Y.C.)
*Corresponding author
Manuscript received August 19, 2026; accepted October 2, 2026; published November 24, 2026.
Abstract—Taiwanese Irwin mango (Mangifera indica L.) is one of Taiwan’s most important export fruit crops, and its external appearance is a critical factor affecting market grading and commercial value. Conventional quality inspection mainly relies on manual visual assessment, which is labor-intensive, time-consuming, and susceptible to subjective judgment, resulting in inconsistent grading outcomes. To improve the efficiency and consistency of mango quality inspection, this study developed an automatic multi-class external defect detection system based on the YOLOX deep learning object detection model.
A total of 1,500 RGB images of Taiwanese Irwin mangoes were collected under practical packing-house conditions. Each image contained multiple mango fruits with various appearance conditions. All images were manually annotated to establish a six-class object detection dataset, including Mango, Anthracnose, Black Spot, Mechanical Damage, Poor Coloring, and Sap Burn. The YOLOX object detection framework was adopted for model training with a maximum of 200 training epochs and a mini-batch size of 8. The proposed model was trained to simultaneously localize mango fruits and identify five common external defects.
Experimental results demonstrated that the proposed YOLOX model achieved excellent fruit localization performance, with a precision of 99.8%, a recall of 99.2%, and an F1-score of 99.5% for mango detection. For defect detection, the F1-scores of Anthracnose, Black Spot, Mechanical Damage, Poor Coloring, and Sap Burn were approximately 20.2%, 7.0%, 4.7%, 35.1%, and 24.5%, respectively. The confusion matrix analysis indicated that poor coloring and sap burn exhibited relatively higher detection performance among defect categories, whereas black spot and mechanical damage remained challenging due to their small lesion size and visual similarity to surrounding tissues.
The proposed approach demonstrates the feasibility of applying deep learning-based object detection for automatic mango quality inspection. The developed system can simultaneously perform fruit localization and multi-class external defect detection, providing a practical foundation for intelligent fruit grading, automated sorting systems, and smart agricultural applications.
Keywords—Taiwanese Irwin mango, deep learning, object detection, external defect detection, smart agriculture
Cite: Kuo-Dung Chiou, Jun-Hong Wong, Yu-Shen Liang, and Chia-Ying Chang, " YOLOX-Based Fruit Localization and Multi-Class External Defect Detection for Taiwanese Irwin Mangoes," Journal of Advanced Agricultural Technologies, vol. 13, no. 1, pp. 18-22, 2026.
Copyright © 2026 by the authors. This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited (CC BY 4.0).