| The conservation and study of endangered species play a crucial role in ecological stability.However,obtaining images of rare species is extremely challenging and requires significant time and manpower.Few-shot learning-based object detection only requires a small amount of data for training new categories.But due to the scarcity of endangered species samples,there is limited effective information available in the support and query set for network training.Moreover,fine-grained and occluded targets in this field are easily overlooked,resulting in inaccurate output of the final object candidates.Additionally,the classification accuracy of the candidates is generally low,posing significant challenges in this field.This thesis proposes a new network called ACNet(Attention Contrastive Network)to address few-shot object detection related issues.ACNet is based on the Faster R-CNN framework and incorporates meta-learning mechanisms.The network training first undergoes pre-training on a large dataset and then fine-tuning on new categories.To address the problem of inaccurate localization of object candidates,this thesis introduces a feature processing module based on attention mechanism and a multi-scale pooling module.These modules maximize the utilization of information between the support and query sets with limited data.Furthermore,based on contrastive learning mechanisms and an attraction-repulsion mechanism,this thesis designs a contrastive loss function that effectively resolves the problem of inaccurate target classification in the candidate boxes.ACNet is experimentally validated on the PASCAL VOC dataset,COCO dataset,and a self-built dataset for endangered species.The results demonstrate excellent performance in various shot divisions.Additionally,this thesis designs an endangered species detection platform that deploys the proposed network algorithm.It can detect endangered animals in this field.The specific work includes:1.Designing a feature processing module based on attention mechanism,which extracts attention values and keys from the image features in the support and query sets.It compares the key attention in the two image sets and performs attention weighting and feature amplification on the important features in the query set images.2.Adding pooling modules of different sizes to the final pooling module of the network,which effectively detects targets of different scales in the images.Furthermore,a contrastive loss function is introduced in the loss function,which significantly increases inter-class differences and improves classification accuracy.3.Implementing an endangered species detection platform based on the ACNet algorithm.The thesis performs functional and non-functional requirements analysis on the platform,determines the platform’s architecture pattern,and designs the various modules for the browser,server,algorithm,and storage sides.It also provides a detailed design of the composition of the database tables and the functionality and corresponding interfaces of other modules. |