A small object detection method based on weighted score label assignment
By introducing a label allocation method (WSLA) with weighted scores, combining CDS and SSS scores, the problems of information loss and IoU tendency toward large targets in small target detection are solved, and the accuracy and efficiency of small target detection are improved.
Patent Information
- Application Number
- CN202311121368.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-01
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2043-09-01
AI Technical Summary
The existing small-object detection methods have severe information loss during feature extraction, low resolution and are susceptible to noise interference. The IoU score tends to be large targets, resulting in a degradation of small-object detection performance. The existing tag allocation strategy is difficult to meet the end-to-end design and high computing costs.
Weighted score-based label allocation method (WSLA), introduce center distance score (CDS) and shape size score (SSS), combined with IoU score, assign positive and negative labels to the sample box through weighted calculations, improving the diversity and quality of small target samples.
It effectively alleviates the problem of unfairness of IoU scores for small goals, improves the model's detection performance for small goals, improves the scale diversity and quality of training samples, and achieves significant performance improvements.
Smart Images

Figure CN117115412B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to a small target detection method based on weighted score label allocation. Background Art
[0002] In recent years, with the advancement of computer performance and the development of big data, visual information has rapidly increased. Multimedia data, including still and dynamic images, video files, and audio files, is rapidly disseminating across various social media platforms. Object detection, one of the most fundamental problems in computer vision, has been widely applied in fields such as target tracking, behavior understanding, human-computer interaction, and face recognition. It has attracted extensive attention and research from scholars since the early 21st century. Humans primarily receive information from the outside world through vision, so technologies based on visual information are a promising research area for artificial intelligence. Among these, face recognition, video surveillance, object detection, internet image content review, and biometric recognition are currently hot topics. These technologies are also widely used in healthcare, elderly care, transportation, urban operations, and security, for example in medical image diagnosis, posture estimation, station security, autonomous driving, vehicle speed detection, and video surveillance behavior analysis.
[0003] Small object detection is an extremely important research area in computer vision and machine learning, integrating cutting-edge knowledge from multiple fields such as image processing, pattern recognition, artificial intelligence, and automatic control. Small objects in an image typically occupy only a small number of pixels, and the task of small object detection requires algorithms to locate and classify these tiny objects as accurately and quickly as possible. With the development of smart devices and smart cities, people are able to use more hardware facilities such as self-driving cars and drones to perceive their surroundings. Small object detection has also begun to be widely used in these fields, such as detecting traffic signs in autonomous driving, detecting vehicles and important facilities in remote sensing images, and detecting trapped people and helping to identify potential rescuers during disaster relief.
[0004] Object detection technology is becoming increasingly mature, and general-purpose object detectors are widely used in various real-world scenarios, including daily life, urban management, and industrial manufacturing. However, most detectors still fail to achieve satisfactory results when detecting small objects. In real-world applications, it remains a challenge for general-purpose detectors to consistently detect objects of all scales, especially small objects. Consequently, the task of small object detection has recently attracted increasing attention.
[0005] Existing deep learning-based small object detection methods far outperform earlier feature extraction-based methods. They extract features from images using convolutional neural networks (CNNs) and feed them into a detection head for classification and regression, enabling more accurate detection of small objects. Despite significant breakthroughs in detection performance, deep learning-based methods still face three major challenges due to limitations in small object features. First, feature extraction often requires a series of downsampling processes, which continuously reduces the spatial resolution of the image and inevitably results in a loss of image information. This information loss is critical for small objects, as it means that a small portion of the features present in the small object are likely lost during the downsampling process, rendering the detection head unable to detect them. Second, small objects typically have low resolution. When image quality is poor, objects are often blurry and easily interfered with by background or noise, further complicating feature extraction. Finally, the common paradigm for object detection and regression is based on the Intersection over Union (IoU) between the bounding box and the object. For small objects, even slight perturbations of the bounding box that matches them can result in significant changes in the IoU, significantly limiting the network's ability to learn small objects.
[0006] To address the aforementioned issues, numerous methods have been proposed for small object detection. These methods can be categorized based on their strategies, including data augmentation, scale-awareness, feature fusion, super-resolution, contextual information modeling, and others. While these methods improve small object detection performance from various perspectives, they often require numerous complex operations, resulting in additional computational costs. Furthermore, some methods are difficult to design in an end-to-end manner, making them difficult to meet the needs of real-world scenarios. Some methods even overly focus on small objects, hindering the ability to detect larger objects.
[0007] Recently, many works have noticed the impact of label assignment on detector performance, and some label assignment schemes for small targets have been proposed. Ming et al. (Qi Ming, Zhiqiang Zhou, Lingjuan Miao, Hongwei Zhang, and Linhao Li. 2021. Dynamic anchor learrning for arbitrary-oriented object detection. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 35. 2355-2363.) adopted a dynamic learning method and used the posterior information of sample box regression to help assign labels, which effectively improved the accuracy of the detector. Xu et al. (Chang Xu, Jinwang Wang, Wen Yang, Huai Yu, Lei Yu, and Gui-Song Xia. 2022. RFLA: Gaussian receptive field based label assignment for tiny object detection. In Proceedings of the European Conference on Computer Vision. Springer, 526-543.) proposed a label assignment strategy based on Gaussian receptive field, which is inspiring for small target detection tasks. Since label assignment is part of the target detection algorithm, changing the assignment strategy is a common improvement for all detection paradigms and introduces almost no additional computation. Label assignment scores the rough priors, and this score is used as the basis for whether they can become positive samples and is compared with the set threshold. Priors with scores higher than the positive sample threshold are classified as positive samples, and those below the negative sample threshold are classified as negative samples. The selection of positive and negative samples is crucial for model training. Providing the model with enough small target samples is beneficial to improving small target detection performance. However, if Figure 1 As shown in the figure, it is found that the original label assignment is almost all based on the IoU score strategy, and the IoU score is biased towards large targets in many cases. When the target has a certain size, the IoU of the sample box matching them is usually large, while small targets rarely have a relatively large IoU. This results in the positive samples in the label assignment process almost all corresponding to medium or large-sized targets. Figure 1 The positive samples that use the IoU method for label assignment are all concentrated on larger objects. The model trained using these samples correspondingly lacks the ability to detect small objects, resulting in a decrease in small object detection performance. Summary of the Invention
[0008] The purpose of this invention is to provide a small target detection method based on weighted score label allocation. The weighted score effectively alleviates the problem that the IoU score is unfair to small targets. On the one hand, it improves the scale diversity of training samples, and on the other hand, it takes into account the quality of training samples and improves the detection performance of the model.
[0009] The present invention provides a small target detection method based on weighted score label assignment, comprising the following steps:
[0010] Step 1: Preprocess the image to be detected, and feed the preprocessed image to be detected and its corresponding image-level label into the neural network;
[0011] Step 2: The neural network extracts and fuses features from the image and selects sample frames based on the features.
[0012] Step 3: Use the weighted score-based label assignment method WSLA to assign positive and negative labels to the sample frame;
[0013] In step 4, the model is trained based on the positive and negative samples assigned by WSLA. During the training process, the model outputs the probability value of each category corresponding to the image to be detected. During the testing process, the model outputs the coordinates, category, and score of the predicted box of the image to be detected.
[0014] In step 1, the preprocessing may first normalize the image, then scale the image to 256×256, and finally randomly crop it to 224×224.
[0015] In step 2, the feature extraction is performed using the backbone feature extraction network (ResNet50, ResNet101), and the feature fusion is performed using the feature pyramid network (FPN);
[0016] In step 3, the weighted score-based label allocation method WSLA includes the following steps:
[0017] Step a1: For each sample box, calculate the IoU score (Intersection over Union) between it and all real boxes according to the following formula:
[0018]
[0019] Among them, A represents the area occupied by the sample box, B is a vector with the same dimension as the number of true boxes, and each element in the vector represents the area occupied by the corresponding true box;
[0020] In step a2, for each sample frame, the center distance score (CDS) between it and all true frames is calculated according to the following formula:
[0021] d=||(x g ,y g ), (x p ,y p )||2
[0022]
[0023] Among them, (x g ,y g ) represents the horizontal and vertical coordinates of the center points of all real boxes, (x p ,y p ) represents the horizontal and vertical coordinates of the center point of the sample frame, represents the maximum and minimum normalization operation, Represents the normalization conversion function, which is used to convert the score to the same value as S IoI On the same distribution, its specific form is:
[0024]
[0025] In step a3, for each sample box, calculate its shape size score (SSS) compared with all true boxes according to the following formula:
[0026]
[0027]
[0028] Among them, (w g , h g ) represents the width and height of all real boxes, (w p , h p ) represents the width and height of the sample frame, represents the normalized transfer function, which has the same form as the function used to calculate CDS in step a2;
[0029] Step a4, the IoU score (S IoU ), center distance score (S d ), shape size score (S s ) are weighted, and each sample frame will get a weighted score S for each real frame:
[0030]
[0031] w=1+α+β
[0032] Among them, α and β are hyperparameters, S={S1,S2,...,S k ,...,S n}, S k The weighted score corresponding to the sample frame and the real frame of the k-th target, n is the total number of real frames;
[0033] Step a5: Compare the positive and negative sample thresholds with the weighted score S according to the pre-set thresholds. k If all elements of S are lower than the negative sample threshold, the sample frame is classified as a negative sample; otherwise, the sample frame is classified as an ignored sample.
[0034] In step 4, the training method is consistent with the selected detector, but the samples used for training are the samples after WSLA allocation in step 3.
[0035] Compared with the prior art, the present invention has the following outstanding advantages:
[0036] 1. This paper finds that the general IoU score tends to assign positive samples to large-sized objects. To address this problem, a simple and effective weighted score-based label assignment method (WSLA) is proposed to effectively improve the size diversity of training samples and improve the quality of samples.
[0037] 2. The present invention designs the center distance score (CDS) and shape size score (SSS). These two scores evaluate the quality of the sample frame from different perspectives and are fair to targets of various scales.
[0038] 3. Extensive experiments on the DOTA and HRSC2016 datasets show that the proposed WSLA achieves significant and consistent performance improvements compared with other competitive methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 Schematic diagram of the network structure of the neural network of the present invention.
[0040] Figure 2 It is a schematic flow diagram of the present invention. DETAILED DESCRIPTION
[0041] The following embodiments will be combined with the accompanying drawings to illustrate the technical solutions and beneficial effects of the present invention in detail.
[0042] A small target detection method based on weighted score label assignment can reasonably increase the number of small target positive samples in the training samples, thereby improving the detection performance of small targets. It includes the model training phase and the model testing phase:
[0043] Model training phase: Step 1: First, preprocess the image to be detected, and then send the preprocessed image to be detected and its corresponding category into the neural network; Step 2: The neural network extracts and fuses features of the image, filters the sample frame according to the features, and sends the sample frame to the weighted score label assignment module; Step 3: The weighted score label is assigned to the sample frame and positive and negative labels are assigned according to the weighted score; Step 4: The model is trained based on the positive and negative samples of the label assignment, and during the training process, the probability value of each category corresponding to the target to be detected in the image is output.
[0044] Model testing phase: During the testing process, the coordinates, category, and score of the predicted box of the image to be detected are output. The label assignment process occurs before model training, and the algorithm assigns positive and negative labels to the training samples based on the score of the sample box. The weighted score introduces two completely decoupled scores based on the original IoU score: the center distance score is used to measure the degree of proximity between the sample box and the true box in position, and the shape size score is used to measure the similarity between the sample box and the true box in shape and size. By weighting these three scores, the problem of the IoU score being tilted towards large objects can be effectively alleviated, enabling the model to better detect small targets while also ensuring the quality of the sample frame. Experiments on the DOTA and HRSC2016 datasets show that the present invention achieves significant and consistent performance improvements.
[0045] The weighted score designed in this paper builds on the existing Intersection over Union (IoU) score by introducing two completely decoupled scores: the IoU score, a common score used in general label assignment, quantitatively evaluates the similarity of two boxes by calculating the ratio of the overlapping area of the sample box and the ground-truth box to the total area; the CDS score, which uses the center distance between the two boxes as an evaluation metric and explicitly scores the proximity of the object to the detection box. This score is independent of object size and is fair across scales; and the SSS score, which evaluates the width and height of the box and is completely decoupled from the CDS, considers shape similarity while also constraining the size of positive samples. WSLA assigns different weights to these three scores, alleviating the size-based unfairness of the IoU score and increasing the number of positive samples matching small objects while ensuring the quality of these boxes.
[0046] like Figure 2 As shown, the present invention mainly includes four parts: input, feature extraction, WSLA label allocation, and detection head.
[0047] The embodiment of the present invention specifically includes the following steps:
[0048] Step 1: In the input part, the preprocessed image to be detected and its corresponding candidate box are sent to the neural network; in the preprocessing of the image, the image is first standardized, then scaled to 256×256, and finally randomly cropped to 224×224.
[0049] Step 2: In the feature extraction part, the image is sent to the backbone feature extraction network (ResNet50, ResNet101) for feature extraction, and then passes through the feature pyramid network (FPN) for feature fusion. The sample frame is selected according to the features and sent to WSLA;
[0050] Step 3, in the WSLA label allocation part, the WSLA includes the following steps:
[0051] Step a1: For each sample box, calculate the IoU score (Intersection over Union) between it and all real boxes according to the following formula:
[0052]
[0053] Among them, A represents the area occupied by the sample box, B is a vector with the same dimension as the number of true boxes, and each element in the vector represents the area occupied by the corresponding true box;
[0054] Step a2: For each sample box, calculate the center distance score (Center Distance Score, CDS) between it and all real boxes according to the following formula:
[0055] d=||(x g ,y g ), (x p ,y p )||2
[0056]
[0057] Among them, (x g ,y g ) represents the horizontal and vertical coordinates of the center points of all real boxes, (x p ,y p ) represents the horizontal and vertical coordinates of the center point of the sample frame, represents the maximum and minimum normalization operation, Represents the normalization conversion function, which is used to convert the score to the same value as S IoI On the same distribution, its specific form is:
[0058]
[0059] In step a3, for each sample box, calculate its shape size score (SSS) compared with all true boxes according to the following formula:
[0060]
[0061]
[0062] Among them, (w g , h g ) represents the width and height of all real boxes, (w p , h p ) represents the width and height of the sample frame, represents the normalized transfer function, which has the same form as the function used to calculate CDS in step a2;
[0063] Step a4, the IoU score (S IoU ), center distance score (S d ), shape size score (S s ) are weighted, and each sample frame will get a weighted score S for each real frame:
[0064]
[0065] w=1+α+β
[0066] Among them, α and β are hyperparameters, S={S1,S2,...,S k ,...,S n}, S k The weighted score corresponding to the sample frame and the real frame of the k-th target, n is the total number of real frames;
[0067] Step a5: Compare the positive and negative sample thresholds with the weighted score S according to the pre-set thresholds. k If all elements of S are lower than the negative sample threshold, the sample frame is classified as a negative sample; otherwise, the sample frame is classified as an ignored sample.
[0068] Step 4: In the detection head, the model is trained based on positive and negative samples. During the training process, the model outputs the probability value of each category corresponding to the image to be detected. During the testing process, the model outputs the coordinates, category, and score of the predicted box of the image to be detected.
[0069] The effects of the present invention are further illustrated by the following simulation experiments.
[0070] 1) Simulation conditions: This paper was developed on the Ubuntu platform, and the developed deep learning framework is based on Pytorch. The main language used in this paper is Python.
[0071] 2) Simulation content:
[0072] Take two small target datasets commonly used in the field of remote sensing images, DOTA and HRSC2016, train the network according to the above steps and test it using the test set. Table 1 and Table 2 respectively show the detection results of the present invention and other methods on the two datasets. It can be found that the present invention consistently improves the performance of the baseline algorithm, and compared with other methods, the present invention achieves the best results. Among them, Oriented R-CNNw / WSLA is the result of the present invention, PL, BD, BR, etc. represent the detection performance of the algorithm for 15 different detection targets in the DOTA dataset, such as airplanes, baseball fields, bridges, etc. The evaluation index mAP 50 The average detection performance of the algorithm for various targets is shown in Figure 2. This method achieved 76.80% / 76.84% (ResNet50 / ResNet101) detection performance on the DOTA dataset and 90.54% / 90.65% (ResNet50 / ResNet101) detection performance on the HRSC2016 dataset, significantly higher than other methods, demonstrating its superior performance in small target detection.
[0073] Table 1 Comparison with the latest technical methods on the DOTA dataset
[0074]
[0075] Table 2 Comparison with the latest technical methods on the HRSC2016 dataset
[0076]
[0077] Extensive experiments on the DOTA and HRSC2016 datasets demonstrate that the proposed WSLA not only achieves significant and consistent performance improvements over the baseline methods, but also achieves state-of-the-art detection results compared to other competitive methods.
[0078] The above embodiments are only for illustrating the technical idea of the present invention and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the present invention.
[0079] References:
[0080] [1]Zhiming Chen,Kean Chen,WeiyaoLin,John See,HuiYu,YanKe,andCongYang.2020.Piouloss:Towardsaccurateoriented object detection incomplexenvironments.In Proceedings of the European Conference on ComputerVision.Springer,195-211.
[0081] [2]Jian Ding,Nan Xue,Yang Long,Gui-Song Xia,and QikaiLu.2019.Learning roitransformer for oriented object detection in aerialimages.In Proceedings of theIEEE / CVF Conference on Computer Vision andPattern Recognition.2849-2858.
[0082] [3]Zonghao Guo,Chang Liu,Xiaosong Zhang,Jianbin Jiao,Xiangyang Ji,andQixiang Ye.2021.Beyond bounding-box:Convex-hull feature adaptationfororiented and densely packed object detection.In Proceedings of the IEEE / CVFConference on Computer Vision and Pattern Recognition.8792-8801.
[0083] [4]Jiaming Han,Jian Ding,Jie Li,and Gui-Song Xia.2021.Align deepfeatures fororiented object detection.IEEE Transactions on Geoscience andRemote Sensing 60(2021),1-11.
[0084] [5]Jiaming Han,Jian Ding,Nan Xue,and Gui-Song Xia.2021.Redet:Arotation-equivariant detector for aerial object detection.In Proceedings ofthe IEEE / CVFConference on Computer Vision and Pattern Recognition.2786-2795.
[0085] [6]Yingying Jiang,Xiangyu Zhu,Xiaobing Wang,Shuli Yang,Wei Li,HuaWang,Pei Fu,and Zhenbo Luo.2017.R2CNN:Rotatioual region CNN fororientationrobust scene text detection.arXiv preprint arXiv:1706.09579(2017).
[0086] [7]Chengzheng Li,Chunyan Xu,Zhen Cui,Dan Wang,Tong Zhang,and JianYang.2019.Feature-attentioned obj ect detection in remote sensing imagery.In2019IEEE internatioual conference on image processing(ICIP).IEEE,3886-3890.
[0087] [8]Wentong Li,Yijie Chen,Kaixuan Hu,and Jianke Zhu.2022.Orientedreppointsfor aerial object detection.In Proceedings of the IEEE / CVFConference on ComputerVision and Pattern Recognition.1829-1838.
[0088] [9]Minghui Liao,Zhen Zhu,Baoguang Shi,Gui-song Xia,and XiangBai.2018.Rotation-sensitive regression for oriented scene text detection.InProceedings ofthe IEEE / CVF Conference on Computer Vision and PatternRecognition.5909-5918.
[0089]
[10] Tsung-Yi Lin,Priya Goyal,Ross Girshick,Kaiming He,and Piotr Dollár.2017.Focal loss for dense object detection.In Proceedings of the IEEE / CVFInternatioualConference on Computer Vision.2980-2988.
[0090]
[11] Qi Ming,Zhiqiang Zhou,Lingjuan Miao,Hongwei Zhang,and LinhaoLi.2021.Dynamic anchor leaming for arbitrary-oriented object detection.InProceedingsof the AAAI Conference on Artificial Intelligence,Vol.35.2355-2363.
[0091]
[12] Xingjia Pan,Yuqiang Ren,Kekai Sheng,Weiming Dong,Haolei Yuan,XiaoweiGuo,Chongyang Ma,and Changsheng Xu.2020.Dynamic refinement networkfororiented and densely packed object detection.In Proceedings of the IEEE / CVFConference on Computer Vision and Pattern Recognition.11207-11216.
[0092]
[13] Wen Qian,Xue Yang,Silong Peng,Junchi Yan,and YueGuo.2021.Learningmodulated loss for rotated object detection.In Proceedingsof the AAAI conferenceon artificial intelligence,Vol.35.2458-2466.
[0093]
[14] Shaoqing Ren,Kaiming He,Ross Girshick,and Jian Sun.2015.Faster r-cnn:Towards real-time object detection with region proposal networks.Advancesinneuralinformation processing systems 28(2015).
[0094]
[15] Jinwang Wang,Jian Ding,Haowen Guo,Wensheng Cheng,Ting Pan,andWenYang.201 9.Mask OBB:A semantic attention-based mask oriented boundingboxrepresentation for multi-category object detection in aerialimages.RemoteSensing 11,24(2019),2930.
[0095]
[16] Haoran Wei,Yue Zhang,Zhonghan Chang,Hao Li,Hongqi Wang,and XianSun.2020.Oriented objects as pairs of middle lines.ISPRS Journal ofPhotogrammetryand Remote Sensing 169(2020),268-279.
[0096]
[17] XingxingXie,Gong Cheng,Jiabao Wang,Xiwen Yao,and JunweiHan.2021.Oriented R-CNN for object detection.In Proceedings of the IEEE / CVFInternatioualConference on Computer Vision.3520-3529.
[0097]
[18] Yongchao Xu,Mingtao Fu,Qimeng Wang,Yukang Wang,Kai Chen,Gui-SongXia,and Xiang Bai.2020.Gliding vertex on the horizontal bounding boxformulti-oriented object detection.IEEE transactioUs on pattern analysis andmachineintelligence 43,4(2020),1452-1459.
[0098]
[19] Feng Yang,Wentong Li,Haiwei Hu,Wanyi Li,and Peng Wang.2020.Multi-scalefeature integrated attention-based rotation network for object detectionin VHRaerialimages.Sensors 20,6(2020),1686.
[0099]
[20] Xue Yang,Liping Hou,Yue Zhou,Wentao Wang,and JunchiYan.2021.Denselabel encoding for boundary discontiuuity free rotationdetection.In Proceedingsof the IEEE / CVF Conference on Computer Vision andPattern Recognition.15819-15829.
[0100]
[21] Xue Yang and Junchi Yan.2020.Arbitrary-oriented object detectionwith circularsmooth label.In Proceedings of the Europeau Conference onComputer Vision.Springer,677-694.
[0101]
[22] Xue Yang,JunchiYan,ZimingFeng,andTaoHe.2021.R3det:Refined single-stagedetector with feature refinement for rotating object.In Proceedings ofthe AAAIconference on artificial intelligence,Vol.35.3163-3171.
[0102]
[23] Xue Yang,Jirui Yang,Junchi Yan,Yue Zhang,Tengfei Zhang,Zhi Guo,Xian Sun,and Kun Fu.2019.Scrdet:Towards more robust detection for small,clutteredand rotated objects.InProceedings of the IEEE / CVF InternatioualConference onComputer Vision.8232-8241.
[0103]
[24] Gongjie Zhang,Shijian Lu,and Wei Zhang.2019.CAD-Net:A context-awaredetection network for objects in remote sensing imagery.IEEETransactions onGeosciennce and Remote Sensing 57,12(2019),10015-10024.
[0104]
[25] Xingyi Zhou,Dequan Wang,and Philipp 2019.Objects aspoints.arXiv preprint arXiv:1904.07850(2019).
[0105]
[26] Chang Xu,Jinwang Wang,Wen Yang,Huai Yu,Lei Yu,and Gui-SongXia.2022.RFLA:Gaussian receptive field based label assignment for tiny object detection。
Claims
1. A small target detection method based on weighted score label assignment, characterized by The steps include: Step 1: Preprocess the image to be detected, and feed the preprocessed image to be detected and its corresponding image-level label into the neural network; Step 2: The neural network extracts and fuses features from the image and selects sample frames based on the features. Step 3: Use the weighted score-based label assignment method WSLA to assign positive and negative labels to the sample frame; The weighted score-based label allocation method WSLA includes the following steps: Step a1: For each sample frame, calculate its IoU score S with all real frames according to the following formula: IoU : Among them, A represents the area occupied by the sample box, B is a vector with the same dimension as the number of true boxes, and each element in the vector represents the area occupied by the corresponding true box; Step a2: For each sample frame, calculate the center distance score S between it and all real frames according to the following formula: d : d=||(x g ,y g ),(x p ,y p )||2 Among them, (x g ,y g ) represents the horizontal and vertical coordinates of the center points of all real boxes, (x p ,y p ) represents the horizontal and vertical coordinates of the center point of the sample frame, represents the maximum and minimum normalization operation, Represents the normalization conversion function, which is used to convert the score to the same value as S IoU On the same distribution, its specific form is: Step a3: For each sample frame, calculate its shape and size score S compared with all real frames according to the following formula: s : Among them, (w g ,h g ) represents the width and height of all real boxes, (w p ,h p ) represents the width and height of the sample frame, represents the normalized conversion function, which is consistent with the function used to calculate the center distance score in step a2; Step a4, the IoU score S obtained for each sample frame IoU , center distance score S d , shape and size score S s Weighted, each sample box will get a weighted score S for each real box: w=1+α+β Among them, α and β are hyperparameters, S={S1,S2,…,S k ,…,S n }, S k The weighted score corresponding to the sample frame and the real frame of the k-th target, n is the total number of real frames; Step a5: Compare the positive and negative sample thresholds with the weighted score S according to the pre-set thresholds; if S k If all elements of S are lower than the negative sample threshold, the sample frame is classified as a negative sample; otherwise, the sample frame is classified as an ignored sample. In step 4, the model is trained based on the positive and negative samples assigned by WSLA. During the training process, the model outputs the probability value of each category corresponding to the image to be detected. During the testing process, the model outputs the coordinates, category, and score of the predicted box of the image to be detected.
2. A small target detection method based on weighted score label assignment as claimed in claim 1, characterized in that In step 1, the preprocessing is to first standardize the image, then scale the image to 256×256 size, and finally randomly crop it to 224×224 size.
3. A small target detection method based on weighted score label assignment as claimed in claim 1, characterized in that In step 2, the feature extraction is performed using the backbone feature extraction networks ResNet50 and ResNet101, and the feature fusion is performed using the feature pyramid network FPN.
Citation Information
Patent Citations
Optimization method of target detection model
CN115759240A
Weak supervision target positioning method based on adaptive domain learning
CN116433982A