| The deep learning method represented by convolution neural network is one of the most popular and effective methods in the field of target detection.As an important branch of computer vision,object detection is widely used in pedestrian recognition,industrial fault detection,automatic driving and many other hot fields.Target detection realized by computer can greatly improve work efficiency and reduce labor costs.At the same time,target detection is a prerequisite for many highlevel tasks in the field of computer vision,such as instance segmentation,panoramic segmentation,and matting.The current target detection methods are changing with each passing day,mainly composed of YOLO series,Fast-rcnn and its derivatives.FCOS Detector is a typical representative of the anchor-free target detection method in the first stage,which has the characteristics of accurate recognition and small memory consumption.This article is based on FCOS Detector to improve.However,no matter what type of neural network is,it has the characteristics of slow convergence and weak generalization ability,and there is much room for improvement.The main work of this paper is as follows:A new weight allocation strategy is proposed.This is a Soft Label Assignment method.In the traditional target detection methods,the hard label assignment method is often used,that is,for each anchor,each anchor is divided into positive samples or negative samples according to its relative position with the target box.The method used in this paper no longer divides the positive and negative samples,but considers that each anchor in target box has the attributes of both positive and negative samples.According to the dynamic indicators in the training process,such as the coordinates predicted by each anchor and the IOU of the gt box,the classification score,the training stage,the relative position of the anchor and the gt box,the weight of positive and negative samples is designed to dynamically allocate the attention calculated in the training process.A measure function is designed to measure the similarity of feature space,and the cosine similarity is no longer used as the criterion to judge the distance between feature vectors.A spatial contrast loss function is proposed.By continuously reducing the loss,it can be required that the feature representation extracted by convolution neural network between images obtained by different data enhancement methods of the same image and between images with the same category of objects to be detected have the maximum feature similarity,so as to improve the generalization ability of the extracted features.The spatial pooling structure is introduced to improve the decoupling head in the FCOS structure,fuse multi-scale features,improve the feature extraction ability of the classification head,and propose a feature extraction method based on the self-attention mechanism.The two structures are used together with the spatial contrast loss described above,which can effectively extract the spatial information and context information of the image to be detected.Based on the above design,we implemented a target detection model based on the FCOS architecture.In order to verify the effectiveness of the methods proposed in this paper,detailed comparative experiments have been conducted from several perspectives.The effectiveness of the weight allocation strategy proposed in this paper is verified by horizontal comparative experiments conducted on COCO datasets.The experimental results show that the weight allocation strategy proposed in this paper improves by 1.9%,2.4%,and 2.2% compared to Mu Su,ATSS,Auto Assign,and other methods on the most important m AP indicators,respectively.The longitudinal comparison experiment conducted on VOC datasets shows that adding a weight allocation strategy increases the baseline m AP index by 1.2%,adding SPP modules for feature integration,increasing the m AP index by 0.5% compared to the previous step,and increasing the spatial comparison loss based on the self attention mechanism,increasing by 3.2% compared to the previous step m AP index.Experimental results show that the proposed method has achieved experimental improvements in model accuracy,convergence speed,and feature generalization。... |