Document Type : Research Article
Authors
1
Corresponding Author, Researcher, Forests and Rangelands Research Department, Chaharmahal and Bakhtiari Agricultural and Natural Resources Research and Education Center, Agricultural Research, Education and Extension Organization (AREEO), Shahrekord, Iran
2
B.S. Student, Department of Computer Engineering, National Mohajer Skills University, Isfahan. Iran
3
Assistant Prof., Forests and Rangelands Research Department, Chaharmahal and Bakhtiari Agricultural and Natural Resources Research and Education Center, Agricultural Research, Education and Extension Organization (AREEO), Shahrekord, Iran
4
Expert, General Department of Natural Resources and Watershed Management of Chaharmahal and Bakhtiari Province, Natural Resources and Watershed Management Organization of Iran, Shahrekord, Iran
Abstract
Background and Objective: Oak galls are abnormal growth structures resulting from complex interactions between plants and gall-inducing agents such as insects, serving as key ecological indicators for assessing forest ecosystem health and biodiversity. The Zagros forests, as one of Iran’s most important ecosystems, host dominant oak species and a wide diversity of galls, which, in addition to their ecological roles, have medicinal and industrial applications. However, high morphological diversity, phenotypic similarity among species, and complex environmental conditions pose challenges for manual identification of galls. This study aims to evaluate the YOLOv8n algorithm and develop a deep learning based intelligent system for the automatic identification of 47 oak gall species in the Zagros forests, facilitating access to this knowledge for non-specialist users.
Methodology: A dataset comprising 8,452 images of 47 oak gall species was collected from field sources and public platforms such as iNaturalist. Following preprocessing steps including standard resizing, removal of low-quality images, and data augmentation techniques such as rotation and brightness adjustment the data were converted to the YOLOv8 format and split into 70% training, 20% validation, and 10% testing sets. The YOLOv8n model was trained using transfer learning with pre-trained weights in the Google Colab environment on a Tesla T4 GPU. To prevent overfitting, a dropout rate of 0.3 and early stopping were applied over 50 epochs. Post-training, a graphical user interface (GUI) was developed using Gradio and publicly deployed via Hugging Face Spaces.
Results: The trained model achieved an average precision of 0.83, recall of 0.82, mAP@50 of 0.86, and mAP@50:95 of 0.61. Species such as Cynips quercusfolii (precision: 0.944) and Andricus tomentosus (precision: 0.940) showed the highest performance, whereas low-sample species like Andricus malpighii (precision: 0.583) and Neuroterus numismalis (mAP@50:95 = 0.39) performed poorly due to data imbalance. The confusion matrix highlighted misclassifications among morphologically similar species. The developed system is capable of detecting oak galls in field images with complex backgrounds in less than 6 milliseconds. The designed GUI enables easy use by foresters, rangers, and enthusiasts, serving as an operational tool for biodiversity monitoring and sustainable forest management. Additionally, the created local database can serve as a reference for future research on gall ecology and climate change effects.
Conclusion: This study demonstrates that lightweight deep learning models such as YOLOv8n can achieve reliable performance even under complex environmental conditions and with imbalanced datasets. The proposed system is not only technically effective but also represents a key step toward integrating artificial intelligence with natural resource conservation in Iran. This approach enhances local capacity for ecosystem monitoring and facilitates broader community participation in biodiversity protection. Furthermore, the developed system can serve as a sustainable digital infrastructure for long-term, citizen-generated data collection and support a distributed monitoring framework across the Zagros forests. Future studies are recommended to employ active learning, high-quality synthetic data generation (e.g., via Diffusion Models or GANs) to target low-sample species, and to evaluate and optimize system performance for real-world field conditions and deployment on mobile or edge devices to increase its applicability in sustainable natural resource management.
Keywords
Main Subjects