SolenopsisDetector: development of an automatic detection system for fire ants using computer vision and
Song-Quan Ong1, Abdul Hafiz Ab Majid2, Wei-Jun Li3
1Institute for Tropical Biology and Conservation (ITBC), Universiti Malaysia Sabah, Kota Kinabalu, Sabah, Malaysia.
Abstract:
Fire ants (Solenopsis spp. Westwood) pose a major ecological and economic threat, mainly due to the invasive potential of certain species. Current identification methods are highly dependent on taxonomic expertise, which can slow down decision-making. The development of an automated detection system could therefore support the identification process. We present SolenopsisDetector (SolenopD), an automated system for identifying Solenopsis ants using computer vision and deep learning. Following taxonomic practice, which emphasizes diagnostic body segments (head, thorax, abdomen), we evaluated 2 classification strategies: the use of whole-body images or segment-based images. To localize and crop out the target ants/segments, we first trained and compared 3 detection algorithms (YOLOv5, YOLOv8, and YOLOv11) to localize ants and their body segments. We then tested 3 classification models (ResNet, MobileNet, and InceptionV3) to categorize the ants into 4 classes. A total of 8,300 images were used to develop SolenopD. Among the detection models, whole-body detection achieved 0.931 mAP, whereas segment-based detection achieved 0.788 mAP, representing an average improvement of 18.15% using YOLOv8 and YOLOv11. However, for classification, segment-based images-especially thorax and abdomen-provided higher accuracy than head or whole-body images, with InceptionV3 performing best. To further validate our approach, we used Grad-CAM to visualize the features used in the classification. The highlighted regions corresponded to the taxonomically relevant segments and emphasized the biological interpretability of the system. In summary, SolenopD integrates YOLOv11 for precise localization of ants and body segments, followed by InceptionV3 for accurate classification of Solenopsis spp.

