Fine-Tuned YOLOv12 for Robust Cassava Leaf Disease Detection Under Occlusion and Complex Background Conditions
Junita Amalia, Dolok Butar-butar, Ira Silalahi, Sefanya SinagaCassava is a major food commodity in Indonesia, and its production is threatened by various leaf diseases that can reduce yields by up to 95%. Manual identification by farmers is often subjective and time-consuming, while conventional deep learning models frequently suffer a significant drop in accuracy under field conditions with complex backgrounds and occlusion. This study proposes a fine-tuned YOLOv12-based approach for cassava leaf disease detection under challenging field conditions. The dataset was built from two public Kaggle repositories, the main one containing 21,397 images across five classes. A whole-leaf bounding-box annotation strategy was adopted to provide stronger morphological context for detecting disease symptoms under occluded and visually complex conditions. Hyperparameters were optimized by Bayesian optimization with the tree-structured Parzen estimator (TPE) in the Optuna framework. The fine-tuned YOLOv12m model achieved a mean average precision (mAP) of 0.808 at an intersection over union (IoU) threshold of 0.5 (mAP50) and of 0.600 over IoU thresholds from 0.5 to 0.95 (mAP50-95), outperforming the YOLOv12s baseline. Although the computational load increased from 21.5 to 67.8 giga floating-point operations (GFLOPs), the model was considerably better at distinguishing disease features from field background noise. These findings indicate that the proposed approach improves detection performance and resilience for cassava leaf disease detection in complex field environments.