Cotton leaf disease classification using YOLO deep learning framework and indigenous dataset


  • Abdul Rahim Kolachi
  • Shoaib Rehman Soomro
  • Shadi Khan Baloch
  • Aamir Ali Patoli
  • Sohail Anwar



deep learning, cotton disease classification, real-time detection, yolo


Cotton is one of the economically significant agricultural products in the world and is among the key export resources in Pakistan. Despite the significant pest control techniques and mechanisms, the cotton crop is highly prone to bacterial and viral plant diseases that significantly reduce its yield. Early detection can enable the identification of infected field patches and plays an important role in controlling the spread of the disease. This paper presents the automated classification for bacterial blight and curl virus in cotton plants through the customized implementation of a state-of-the-art YOLO deep learning framework. The disease classification is performed on YOLOv5, and its performance is compared against YOLOv6 and YOLOv7. The transfer learning of the pre-trained model is facilitated through an indigenous image dataset collected from local agricultural fields in Sindh, Pakistan. Different augmentation techniques are employed to increase the size and diversity of the dataset. The employed model is evaluated for various performance metrics, such as precision, recall, F1-score, and confusion matrix. The results indicate 92% accuracy in disease classifications. The confusion matrix analysis indicates up to 100% true positive rates for curl virus, and an 88% true positive rate for detecting bacterial blight and healthy leaves. An inference time of 25 milliseconds indicates fast prediction suitable for on-field real-time applications and potential incorporation of the model in the point of care testing (PoCT) devices.