Development Of a YOLOV4-Based Orange Fruit Detection Model for Orange Counting Using the Coco Dataset - I Gusti Ngurah Surya Ardika Dinataputra; Kadek Yota Ernanda Aryanto; Anak Agung Gede Yudhi Paramartha; I Made Gede Sunarya (Information System Study Program, Faculty of Engineering and Vocational, Undiksha, 2026)
Orange counting during harvest season is important because pricing decisions depend on estimated yield, and miscalculation can disadvantage both farmers and traders. This study developed an orange fruit detection model using YOLOv4 and training data derived from the Microsoft COCO dataset. The problem context was established through interviews with Siam orange farmers in Belantih, Kintamani, Bangli, where counting errors were reported to reduce expected income. For model development, two training configurations were compared: a one-class model trained only on orange images and a two-class model trained on orange and apple images. Field testing images were collected in an orchard in Penikit, Badung, using the same Siam orange type targeted in the study. Evaluation was divided into three subsets: 30 orange-only images for one-class mAP evaluation, 60 mixed orange-apple images for two-class mAP evaluation, and 20 orange images for final manual counting validation. At IoU 0.50, the one-clas model achieved 85.78% mAP, whereas the two-class model achieved 33.52%. Manual counting on 20 images yielded 82% accuracy for the one-class model and 55% for the two-class model. These results show that a focused one-class formulation is more suitable for orchard-side orange counting under the constraints of this study.