Wang Heng, Zhang Shuai, Zhang Cong, Liu Zheng, Huang Qiuxian, Ma Xinyi, Jiang Yiming
School of Mathematics and Computer, Wuhan Polytechnic University, Wuhan, 430048, China.
School of Electrical and Electronic Engineering, Wuhan Polytechnic University, Wuhan, 430048, China.
Sci Rep. 2025 Jan 8;15(1):1282. doi: 10.1038/s41598-024-84328-w.
The rapid changes in the global environment have led to an unprecedented decline in biodiversity, with over 28% of species facing extinction. This includes snakes, which are key to ecological balance. Detecting snakes is challenging due to their camouflage and elusive nature, causing data loss and feature extraction difficulties in ecological monitoring. To address these challenges, we propose an enhanced snake detection model, Snake-DETR, based on RT-DETR, specifically designed for snake detection in complex natural environments. First, we designed the Enhanced Generalized Efficient Layer Aggregation Network Based on Context Anchor Attention, which enhances the feature extraction capability for occluded snakes by aggregating critical layer information and strengthening context-dependent feature extraction. Additionally, we introduced the Enhanced Feature Extraction Backbone Network Based on Context Anchor Attention, which manages input information using multiple Enhanced Generalized Efficient Layer Aggregation Networks to retain essential spatial and semantic information. Subsequently, a lightweight Group-Shuffle Convolution is used to optimize the encoder, which reduces dependency on large-scale training data, thereby making it suitable for deployment on edge devices. Finally, we incorporated the Powerful-IoU loss function to improve regression path accuracy. Experimental results on a custom dataset covering 27 snake species demonstrate that Snake-DETR achieves a good balance between model efficiency and detection performance, meeting the requirements for fine-grained snake object detection. Compared to other state-of-the-art models, Snake-DETR achieved an accuracy of 97.66%, a recall rate of 93.92%, mAP@0.5 of 95.23%, and mAP@0.5:0.95 of 72.15%, all outperforming other algorithms in the comparative tests. Furthermore, the computational load and parameter count of the model are reduced by 47.2 and 52.2%, respectively, compared to the benchmark model. Additionally, the real-time processing capability is 43.5 frames per second, meeting the demand for real-time processing. Snake-DETR demonstrates excellent performance in complex environments and is suitable for wild snake fauna monitoring and edge device deployment, providing key technical support for ecological research.
全球环境的迅速变化导致生物多样性空前下降,超过28%的物种面临灭绝。这其中包括蛇类,它们对生态平衡至关重要。由于蛇类具有伪装和难以捉摸的特性,检测蛇类具有挑战性,这导致在生态监测中出现数据丢失和特征提取困难的问题。为应对这些挑战,我们基于RT-DETR提出了一种增强型蛇类检测模型Snake-DETR,专门用于在复杂自然环境中检测蛇类。首先,我们设计了基于上下文锚点注意力的增强型广义高效层聚合网络,通过聚合关键层信息并加强上下文相关特征提取,增强了对被遮挡蛇类的特征提取能力。此外,我们引入了基于上下文锚点注意力的增强型特征提取骨干网络,它使用多个增强型广义高效层聚合网络来管理输入信息,以保留基本的空间和语义信息。随后,使用轻量级的分组混洗卷积来优化编码器,这减少了对大规模训练数据的依赖,从而使其适合在边缘设备上部署。最后,我们纳入了强大的IoU损失函数来提高回归路径的准确性。在一个涵盖27种蛇类的自定义数据集上的实验结果表明,Snake-DETR在模型效率和检测性能之间实现了良好的平衡,满足了细粒度蛇类目标检测的要求。与其他现有最先进模型相比,Snake-DETR的准确率达到97.66%,召回率为93.92%,mAP@0.5为95.23%,mAP@0.5:0.95为72.15%,在对比测试中均优于其他算法。此外,与基准模型相比,该模型的计算负载和参数数量分别减少了47.2%和52.2%。另外,实时处理能力为每秒43.5帧,满足实时处理需求。Snake-DETR在复杂环境中表现出卓越性能,适用于野生蛇类动物监测和边缘设备部署,为生态研究提供关键技术支持。