Abstract:
Mango is one of the most important fruit crops in Sri Lanka, playing a vital role in both the agricultural sector and rural livelihoods. Despite its economic value, mango cultivation faces persistent challenges due to pest infestations, which significantly reduce yield and fruit quality. Early detection of pests is critical to minimize damage, but manual inspection methods are labor-intensive, time-consuming, and often impractical for largescale farms. With advancements in artificial intelligence, automated detection methods provide a promising alternative to improve pest management efficiency and accuracy. This study introduces a machine learning-based approach for the automated detection of pests on mango leaves, aiming to support farmers and agricultural professionals with a practical tool for timely intervention. The research utilizes ten classes from the Mango Pest Classification dataset, which contains real-world images of healthy and pest-affected mango leaves captured under diverse environmental conditions, thereby reflecting realistic field scenarios. To prepare the data for classification, three feature extraction techniques were applied: Histogram of oriented Gradients (HOG) to capture shape and edge information, Bag of Features (BoF) to model local descriptors, and Wavelet transforms to analyze texture and frequency components. These extracted features were then used to train and evaluate three machine learning classifiers: Support Vector Machines (SVM), Random Forest, and Logistic Regression. The experimental results showed that the Random Forest
classifier, when trained on a combined feature set of HOG and Wavelet descriptors, achieved the highest accuracy of 81% on the test data. This performance outperformed other feature-classifier combinations, highlighting the robustness of Random Forest for pest classification tasks. The findings emphasize the potential of machine learning to enhance pest monitoring in mango cultivation. By reducing reliance on manual inspection and enabling timely pest detection, the proposed approach can contribute to improved
yield, higher fruit quality, and more sustainable mango farming practices in Sri Lanka.