This study aims to aid cacao bean sorting by employing YOLOv4 alongside a counting function in the development of an object detection algorithm which shall objectively categorize each bean into specific defects and classify each batch’s grade.
For the longest time, cacao bean sorting has been a manual and subjective process that is incredibly time consuming where every bean is checked for defects. Given that this process is visual in nature, it is imperative that human error exacerbates its high subjectivity to the senses. Provided that the presence of computer vision and deep learning techniques is prominent in recent smart agriculture studies, this issue may be addressed as these provide an objective way to quantify the cacao beans’ defects and classify each bean batch. This study aims to aid this process by employing YOLOv4 alongside a counting function in the development of an object detection algorithm which shall objectively categorize each bean into specific defects and classify each batch’s grade. Upon the completion of the training, a robust detector was developed with a precision of 0.7267, a recall of 0.8134, and a mean average precision (mAP) of 88.2922% while operating at 14.8 frames per second. Given its high mAP value and the execution time, this suggests that the model can operate with relatively high precision at a practical inference time.