Small target detection model in unmanned aerial vehicle aerial photography scene
By improving the YOLOv8s model in drone aerial photography scenarios, using the SPD-Conv module, Dynamic Head and small object detection head, combined with the Shape-IoU loss function, the problem of low detection accuracy of small objects in drone aerial photography scenarios is solved, and higher detection accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202411604158.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-03-14
AI Technical Summary
In drone aerial photography scenarios, existing target detection algorithms are difficult to effectively detect small targets in complex environments, and are affected by scale changes, high-density target distribution and diversified background interference.
Improve the YOLOv8s model, enhance the information retention ability of the feature map by adding SPD-Conv modules to the P2, P3, P4, and P5 layers of the backbone feature network; introduce the Dynamic Head module to adaptively adjust feature extraction; and introduce a small object detection head into the detection head to improve the capture and recognition ability of small objects, and optimize the model using the Shape-IoU loss function.
The model's adaptability and detection accuracy for small targets in multiple angles and scenes is improved, and the detection performance at different viewing angles and lighting conditions is significantly improved, and it has strong generalization ability and robustness.
Smart Images

Figure CN119625251A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of aerial image detection and small target detection, and in particular to a small target detection model in a drone aerial photography scenario. Background Art
[0002] Due to their compactness, low cost and ease of operation, drones have been widely used in military and civilian fields, covering unmanned reconnaissance, intelligent transportation, power inspection and crop monitoring. Especially in unmanned reconnaissance missions, drones can effectively avoid the limitations of complex terrain on traditional reconnaissance tools. In intelligent transportation, the real-time monitoring capability of drones provides a strong guarantee for traffic management and safety. At the same time, in application scenarios such as power inspection and crop monitoring, drones can reduce labor costs and improve work efficiency. However, since aerial images often contain a variety of scene information, such as complex changes in scale, high-density distribution of small targets and diverse background interference, these factors have a great impact on the detection accuracy of existing target detection algorithms. Therefore, developing a target detection model that can adapt to complex environmental changes and take into account the accuracy of small target detection has become one of the key issues to be solved in the field of drone target detection.
[0003] The models used in the present invention and the invention of "UAV aerial photography small target detection method and electronic device based on improved YOLOv8s algorithm" are both YOLOv8s models, but the two have obvious differences in improvement methods. The differences between the two improvement methods and the advantages of the present invention are as follows:
[0004] Differences in methods: 1. In the backbone feature network of YOLOv8s, the improvement of the present invention is to add an SPD-Conv module under each of the P2, P3, P4, and P5 layers in the backbone feature network. This improvement aims to segment and rearrange the feature map, so that the spatial dimension of the feature map is converted into a depth dimension, and more information is retained by increasing the number of channels, thereby improving the adaptability of the model to small targets in multiple angles and multiple scenes, so that the model can still effectively detect small targets under different viewing angles; the method adopted by the comparative invention is to replace the first C2F module with the Swin TransFormer module in the backbone feature network to obtain a layer of global features; 2. In the detection head part of YOLOv8s, the present invention first introduces the Dynamic Head module, Dynamic The head applies the self-attention mechanism between different feature layers, so that the model can adaptively adjust the feature extraction at different scales; in this way, when processing small targets, the model can pay more attention to fine-grained local information and reduce the small target details lost in shallow features due to downsampling. The recognition accuracy of small targets such as pedestrians, bicycles, tricycles, motorcycles, etc. in drone aerial photography scenes is greatly improved, thereby effectively improving the overall detection accuracy of the improved model. Then, a small target detection head with a size of 160×160 is specially introduced from the YOLOv8 head, aiming to improve the capture and recognition capabilities of small targets in the image, thereby improving the overall detection accuracy of the model. The detection head is connected to the 160×160 small target detection head of the P2 layer in Backbone. 0×160 feature map for residual connection, so as to fuse the deeper global semantic information with the shallow feature information. The compared invention uses the C2F-DS layer in the feature enhancement network to build a small target detection head; 3. The loss function is different. The present invention adopts the Shape-IoU loss function, and the compared invention adopts the DFL positioning loss function and the NWD positioning loss function. Shape-IoU can adaptively adjust the loss calculation method according to the specific shape characteristics of the target, so that it pays more attention to the similarity between the predicted box and the real box, thereby reducing the impact of inaccurate target bounding box or occlusion. In this way, in such diverse small target detection, the use of this function can show better detection performance.
[0005] Compared with the invention, the advantages of the present invention are as follows: 1. The precision (P) and recall rate (R) of the present invention (SDSS-YOLOv8s) on the VisDrone2019-DET dataset are 61% and 49.4%, respectively, and the mAP50 and mAP50-95 are 52.9% and 32.8%, respectively. The mAP50 and mAP50-95 of the comparative invention (GSD-YOLOv8s) on the VisDrone2019-DET dataset are 43.5% and 26.3%, respectively. By comparison, it can be seen that the mAP50 and mAP50-95 of the present invention are 9.4% and 6.5% higher than those of the present invention, respectively. This shows that the present invention has higher accuracy in small target detection in aerial photography scenarios, has broad application prospects, and is particularly suitable for small target detection tasks in drone aerial photography that require high detection accuracy. 2. It can be seen from the visualization experimental results of the present invention and the comparative invention that the present invention exhibits excellent robustness and accuracy, has strong adaptability to lighting, and can continuously perform efficient target detection tasks under different lighting conditions. 3. It can be seen from the generalization experimental data of the present invention that the present invention (SDSS-YOLOv8) can not only perform small target detection tasks in aerial images taken by drones, but also performs well in small target detection in unmanned ship images. This shows that the model of the present invention has strong generalization ability, and despite changes in image environment and target distribution, it can maintain high detection performance in different scenarios. Summary of the invention
[0006] In order to solve the problems existing in drone aerial photography scenarios, an embodiment of the present invention provides a small target detection model in drone aerial photography scenarios.
[0007] The technical solution adopted by the invention to solve its technical problem is a small target detection model in a drone aerial photography scene, including the following steps:
[0008] The improved YOLOv8s model is trained using an aerial image dataset. The improved parts of the YOLOv8s model include a backbone feature network and a detection head. An SPD-Conv module is added to each of the P2, P3, P4, and P5 layers in the backbone feature network to ensure that the feature map retains all channel dimension information after each downsampling. The DynamicHead module is introduced into the head network to enhance the model's feature perception ability from three aspects: scale perception, spatial perception, and task perception. The head network also introduces a special small target detection head, so that the model can perform target detection at four different scales (160160, 8080, 4040, and 2020);
[0009] The Shape-IoU loss function is introduced to replace the original CIoU loss function, and the optimized improved YOLOv8s model is trained using the loss function in the aerial image dataset; the aerial images to be detected are input into the trained improved YOLOv8s network model for detection.
[0010] Furthermore, the SPD-Conv module ensures that the feature map retains all channel dimension information after each downsampling by: the SPD-Conv layer divides and rearranges the feature map, converts the spatial dimension of the feature map into a depth dimension, and retains more information by increasing the number of channels.
[0011] Furthermore, the steps of converting the spatial dimension of the feature map into the depth dimension of the SPD-Conv module are as follows:
[0012] Assume a feature of size S×S×W1 Figure X , according to the scale factor N, it is divided into any number of subsequence feature maps, the size of the subsequence feature map is:
[0013] F 0,0 =X[O::S:N,O::S:N],F 1,0 =X[1:S:N,O:S:N]...F N-1,0 =X[N-1::S:N,O:S:N]; F 0,1 =X[O:S:N,1:S:N],F 1,1 =X[1:S:N,1:S:N]...F N-1,1 =X[N-1:S:N,1:S:N]; ... F O,N-1 =X[O:S:N,N-1:S:N],F 1,N-1 ...F N-1,N-1 =X[N-1:5:N,N-1:5:N].
[0014] Then, these sub-feature maps are concatenated along the channel dimension to obtain a new feature map. The spatial dimension of this feature map is reduced by N times compared to the original feature map, while the channel dimension is increased by N. 2 times, the output size is (S / N,S / N,N 2 )’s characteristic diagram.
[0015] Furthermore, a Dynamic Head module is introduced into the head network to enhance the model's feature perception ability from three aspects: scale perception, space perception and task perception.
[0016] Furthermore, the calculation formulas of the three perceptions of the Dynamic Head module are as follows:
[0017]
[0018]
[0019] π C (F)·F=max(α 1 (F)·F c +β 1 (F),α 2 (F)·F c +β 2 (F)
[0020] where π c , π s and π L They are task perception module, space perception module and scale perception module respectively. f(.) is a linear function approximated by a 1×1 convolutional layer. is the Hard sigmoid function, K is the number of sparse sampling locations, and p k +Δp k is the spatial offset Δp obtained through self-learning k Perform position shift to focus on the discriminative area, Δm k is the position p k The self-learned importance scalar at ; both are learned from the input features at the median level of F.
[0021] Furthermore, the small object detection head is residually connected with the 160×160 feature map of the P2 layer in Backbone, thereby fusing the deeper global semantic information with the shallow feature information.
[0022] Furthermore, the main function of the Shape-IoU loss function is to adjust the loss of each sample according to the automatically calculated IoU value and perform weighted processing on the loss of each predicted sample; the specific operation mode of the Shape-IoU loss function is:
[0023] First, for each predicted box and its corresponding true box, the IoU value between them is calculated.
[0024] Secondly, a loss weight is assigned to each sample based on the calculated IoU value. If the IoU value is higher than the threshold, the loss weight of the sample is lower, indicating that the model predicts the sample more accurately; conversely, if the IoU value is lower than the threshold, the loss weight of the sample will be increased to force the model to learn more on these more difficult samples.
[0025] Then, the Shape-IoU loss function multiplies the loss values of different samples by the corresponding loss weights to calculate the weighted loss value.
[0026] Finally, backpropagation is performed using the weighted loss values to update the model parameters.
[0027] The calculation formula of the Shape-IoU loss function is as follows:
[0028]
[0028]
[0030]
[0031]
[0032]
[0033] L Shape-Iou =1-IoU+distance shape +0.5×Ω sahpe
[0034] Among them, scale is the scaling factor, which is related to the scale of the target in the dataset, ωω and hh are the weight coefficients in the horizontal and vertical directions, and their values are related to the shape of the Ground Truth box.
[0035] In addition, an embodiment of the present invention further provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the above-mentioned small target detection model based on a drone aerial photography scenario by executing the computer instructions.
[0036] In addition, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer instructions, and is characterized in that: when the computer instructions are executed by the computer, a small target detection model in a drone aerial photography scenario according to any one of claims 1-7 is implemented.
[0037] The technical solution provided by the embodiments of the present invention has the following beneficial effects: In the backbone feature network of YOLOv8s, the improvement of the present invention is to add an SPD-Conv module under each of the P2, P3, P4, and P5 layers in the backbone feature network. This improvement aims to segment and rearrange the feature map, so that the spatial dimension of the feature map is converted into a depth dimension, and more information is retained by increasing the number of channels, thereby improving the adaptability of the model to small targets in multiple angles and multiple scenes, so that the model can still effectively detect small targets under different viewing angles. The method adopted by the comparative invention is to replace the first C2f module with the SwinTransformer module in the backbone feature network to obtain a layer of global features. In the detection head part of YOLOv8s, the present invention first introduces the Dynamic Head module, Dynamic Head applies the self-attention mechanism between different feature layers, so that the model can adaptively adjust the feature extraction at different scales. In this way, when processing small targets, the model can pay more attention to fine-grained local information and reduce the small target details lost in shallow features due to downsampling. The recognition accuracy of small targets such as pedestrians, bicycles, tricycles, motorcycles, etc. in drone aerial photography scenes is greatly improved, thereby effectively improving the overall detection accuracy of the improved model. Then, a small target detection head with a size of 160×160 is specially introduced from the YOLOv8 head, aiming to improve the ability to capture and recognize small targets in the image, thereby improving the overall detection accuracy of the model. The detection head is residually connected with the 160×160 feature map of the P2 layer in the Backbone, thereby fusing the deeper global semantic information with the shallow feature information. The comparative invention uses the C2f-DS layer in the feature enhancement network to construct a small target detection head, and the loss function is different;The present invention adopts the Shape-IoU loss function, while the comparative invention adopts the DFL positioning loss function and the NWD positioning loss function. Shape-IoU can adaptively adjust the loss calculation method according to the specific shape characteristics of the target, so that it pays more attention to the similarity between the predicted box and the real box, thereby reducing the impact of inaccurate target bounding box or occlusion. In this way, in this diverse small target detection, the use of this function can show better detection performance, indicating that the present invention has higher accuracy in small target detection in aerial photography scenes and has broad application prospects, especially suitable for small target detection in drone aerial photography with high detection accuracy requirements. It can be seen from the visualization experimental results of the present invention and the comparative invention that the present invention exhibits excellent robustness and accuracy, has strong illumination adaptability, and can continuously perform efficient target detection tasks under different illumination conditions. It can be seen from the generalization experimental data of the present invention that the present invention (SDSS-YOLOv8) can not only perform small target detection tasks in aerial images taken by drones, but also perform well in small target detection in unmanned ship images, indicating that the model of the present invention has strong generalization ability. Although the image environment and target distribution vary, it can maintain high detection performance in different scenarios. ; BRIEF DESCRIPTION OF THE DRAWINGS The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0038] Figure 1 It is a structural schematic diagram of a small target detection model in a drone aerial photography scenario of the present invention;
[0039] Figure 2 is a schematic diagram of the SPD-Conv module (N=2);
[0040] Figure 3 This is a schematic diagram of the Dynamic Head module;
[0041] Figure 4 This is a schematic diagram of the detection effect of the target detection head;
[0042] Figure 5 This is a diagram of the symbolic meaning of the Shape-IoU loss function;
[0043] Figure 6 In order to verify the effectiveness of the improved YOLOv8s model and each improvement strategy of the present invention, an ablation experiment result diagram is performed based on YOLOv8s;
[0044] Figure 7 This is a comparison chart between the improved model of the present invention and other classic models, YOLO series models and other excellent YOLO-based improved models;
[0045] Figure 8-11 It is a visual comparison image of the detection results of the improved model of the present invention and the YOLOv8s model in different scenes and light conditions;
[0046] Fig.12 This is a specific comparison chart of the visualization effect during the day;
[0047] Fig.13 This is a specific comparison chart of the visualization effect at night;
[0048] Fig.14 It is a generalization experimental data diagram of the improved model of the present invention. DETAILED DESCRIPTION
[0049] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. The described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Under the premise of not departing from the design concept of the present invention, various modifications and improvements made by ordinary persons in the art to the technical solutions of the present invention should all fall within the protection scope of the present invention.
[0050] The embodiment of the present invention provides a small target detection model suitable for drone aerial photography scenes, which can accurately detect small targets in aerial images, such as trucks, motorcycles, pedestrians, etc. The detection method of the model mainly includes the following steps:
[0051] The VisDrone2019 dataset was selected for training the improved model. The dataset includes 6471 images for training and 548 images for verification, all of which were taken by drones equipped with cameras at different locations and altitudes. The dataset contains content related to the diversity of target categories (such as 10 predefined categories such as pedestrian, person, car, van, bus, truck, motor, bicycle, awning-tricycle and tricycle), the difference in the number of targets (from a small amount to a large amount), the diversity of target distribution (including sparse and dense distribution), and changes in lighting conditions (day and night).
[0052] like Figure 1As shown, the improved YOLOv8s model used in this application is obtained by improving the YOLOv8s model; the improved YOLOv8s model also includes a backbone feature network (Backbone), a feature enhancement network (Neck) and a detection head (Head); wherein in the backbone feature network, an SPD-Conv module is added under each of the P2, P3, P4, and P5 layers. The backbone feature network includes: a first convolutional layer, a second convolutional layer, a first SPD-Conv module, a first C2f module, a third convolutional layer, a second SPD-Conv module, a second C2f module, a fourth convolutional layer, a third SPD-Conv module, a third C2f module, a fifth convolutional layer, a fourth SPD-Conv module, a fourth C2f module, and an SPPF module.
[0053] The present application finds that the advantages of introducing the SPD-Conv module in the P2, P3, P4 and P5 layers are: the traditional standard convolution may cause the loss of detail information after multiple downsampling in the process of layer-by-layer filtering and feature extraction, such as Figure 2 The SPD-Conv module shown converts the spatial dimension into the depth dimension by segmenting and rearranging the feature map, and retains more information by increasing the number of channels; this processing method significantly improves the model's adaptability to small targets in multiple angles and multiple scenes, so that the model can still effectively detect small targets from different perspectives, thereby improving the accuracy and robustness of detection.
[0054] The Dynamic Head module is introduced into the optimized detection head in the improved YOLOv8s model.
[0055] The detection head of YOLOv8s adopts a static network structure and uses the same feature extraction path for all input images. However, the shape, size and distribution of objects in images are highly variable, and static structures are difficult to adaptively handle complex targets in different scenes. Therefore, the detection head of YOLOv8s has defects in capturing subtle differences, diverse features and scale changes in images. The Dynamic Head module can dynamically adjust the network structure according to the input features, so as to better adapt to different target distributions and improve the expressiveness of features, thereby improving the accuracy of target positioning and classification in complex scenes.
[0056] like Figure 3As shown in the figure, Dynamic Head introduces a self-attention mechanism on different feature dimensions, so that the detection head has the capabilities of scale-awareness, spatial-awareness, and task-awareness. Among them, a three-dimensional feature tensor is given on the detection layer, and the Dynamic Head module architecture diagram.
[0057] The attention function is converted into three serialized attentions (task perception module, space perception module and scale perception module), each of which focuses only on its own aspect. The formula is as follows:
[0058] α L (F) = π c (π s (π L (F)·F)·F)·F
[0059] where π c , π s , π L They are task perception module, space perception module and scale perception module respectively.
[0060] In DyHead Block, scale-aware attention is first introduced. This mechanism can dynamically fuse features of different scales based on their semantic importance. The calculation formula is as follows:
[0061]
[0062] where f(.) is a linear function approximated by a 1×1 convolutional layer, It is the Hard sigmoid function.
[0063] Then we add a spatial perception module. As the dimension of the image increases, we divide this module into two steps: first, we make the attention learning sparse by using deformable convolution (deconv), and then aggregate different levels of features at the same spatial position. The calculation formula is as follows:
[0064]
[0065] Where K is the number of sparsely sampled locations, represents the location shift by self-learned spatial offset to focus on discriminative regions, and is the self-learned importance scalar at the location. Both are learned from the input features at the median level of F.
[0066] In order to achieve associated learning and generalization to different object representation methods, a task-aware module is finally applied. This mechanism dynamically opens and closes feature channels to adapt to different task requirements, thereby enhancing task-specific feature representations. The calculation formula is as follows:
[0067] π C (F)·F=max((α 1 (F)·F c +β 1 (F),α 2 (F)·F c +β 2 (F)
[0068] Among them, F C represents the characteristic slice of the cth track, [α 1 , α 2 , β 1 , β 2 ] = θ(·) is a hyperfunction that is used to learn the activation threshold. First, global average pooling is performed on an L×S dimension to reduce the dimension, followed by two fully connected layers and a normalization layer, and finally a translated Sigmoid function is applied to normalize the output to the range [-1, 1].
[0069] like Figure 4 As shown in the figure, the present invention specifically introduces a small target detection head with a size of 160×160 from the YOLOv8s head, aiming to improve the ability to capture and identify small targets in the image, thereby improving the overall detection accuracy of the model. The detection head is residually connected with the 160×160 feature map of the P2 layer in the Backbone, thereby fusing the deeper global semantic information with the shallow feature information. Because the P2 layer has a higher resolution, it can better retain the detailed features of small targets. Combined with the 160×160 scale feature map, it can effectively enhance the expression ability of small target features. Therefore, this method improves the performance of small target detection by retaining more detailed information.
[0070] The optimized improved YOLOv8s model is trained using a loss function, where the loss function is a Shape-IoU function.
[0071] YOLOv8s uses the CIoU loss function for bounding box regression loss calculation. Although CIoU takes into account the overlap, center point distance, and aspect ratio of the target box, in small target detection, due to the small number of pixels of small targets, the overlap calculation may not be accurate enough, thus affecting the effectiveness of the loss value. The calculation formula is as follows:
[0072]
[0073] in, Used to calculate the aspect ratio, α is used as a balance parameter, Represents the Euclidean distance between the center point of the predicted box and the true box.
[0074] This paper introduces the Shape-IoU loss function to replace the original CIoU loss function. Shape-IoU focuses on the shape features of the target, attaches importance to the contour and edge information of the target, and can provide more accurate results when evaluating targets with obvious contours. The method adaptively adjusts the calculation method so that the model can effectively extract the features of different types of targets, thereby maintaining excellent detection performance. The meaning of the symbols in the formula derivation of the Shape-Iou loss function is as follows Figure 5 As shown, the calculation formula of Shape-IoU loss function is as follows:
[0075]
[0076]
[0077]
[0078]
[0079]
[0080] L Shape-Iou =1-IoU+distance shape +0.5×Ω sahpe
[0081] Among them, scale is the scaling factor, which is related to the scale of the target in the dataset, ωω and hh are the weight coefficients in the horizontal and vertical directions, and their values are related to the shape of the Ground Truth box.
[0082] In drone aerial photography scenes, objects such as pedestrians, vehicles, and motorcycles are easily misdetected or missed due to their small size and diverse shapes. Shape-IoU can adaptively adjust the loss calculation method according to the specific shape characteristics of the target, so that it pays more attention to the similarity between the predicted box and the real box, thereby reducing the impact of inaccurate or occluded target bounding boxes; thus, in this diverse small target detection, the use of this function can show better detection performance.
[0083] The original YOLOv8 model and the improved YOLOv8s model were tested. The test process is as follows:
[0084] The experimental platform used for experimental model training is a parallel cloud computing platform. The hardware configuration of the rented computing power is: host 32 cores 256G memory, NVIDIA RTX409024GB GPU, Linux system; the experimental platform for testing the algorithm is AMDReyzen97945HX CPU, NVIDIARTX40608GB GPU, and a laptop with 16G memory; development environment: pytorch2.2.1, python 3.10.13, cuda 11.8, epochs=150, batch=8, imgsz=640×640, workers=8, Momentum=0.937, Dataenhancement strategy=Mosaic, Optimizer=SGD, Initiallearningrate=0.01.
[0085] like Figure 6 As shown, in order to verify the effectiveness of the improved YOLOv8s model and each improvement strategy proposed in the present invention, the VisDrone2019-DET dataset was selected to carry out ablation experiments based on YOLOv8s.
[0086] Figure 6The experimental results in show that each improvement strategy improves the detection performance to varying degrees when applied to the baseline model. The improved YOLOv8s model (SDSS-YOLOv8s) obtained by optimizing the YOLOv8s model structure improves mAP50 by 12.9% and mAP50-95 by 9.3% compared to the original model. The algorithm complexity increases here because the four detection heads are replaced by Dynamic head, which introduces scale perception, spatial perception, and task perception capabilities, improves the model's detection performance in multi-scale and complex background scenes, and the model complexity increases. From the comparison of the results of experiments A and E, and experiments B and F, it can be seen that the mAP50 of the model using the Shape-IoU loss function is improved by 0.6%, because Shape-IoU pays more attention to the contour and boundary information of the target, which is especially important for small targets that occupy fewer pixels and are prone to positioning errors. In experiment G, when SPD-Conv and small target detection heads are used simultaneously, the model mAP50 reaches 45.1%, an increase of 5.3%. The use of the SPD-Conv module improves the model's capture of fine-grained information and feature learning efficiency. The addition of the small target detection head (SODH) further improves the ability to extract detailed features and reduces the missed detection rate of small targets. Experiment H, the final optimized model SDSS-YOLOv8s, improves mAP50 by 12.9% and mAP50-95 by 9.3% compared to the original model. The introduction of the Dynamic head greatly improves all aspects of the model. The algorithm complexity increases by 11.9M here because all four detection heads are replaced by the Dynamic head, which introduces scale perception, spatial perception, and task perception capabilities, improves the model's detection performance in multi-scale and complex background scenes, and the model complexity increases.
[0087] like Figure 7 The experimental results shown in the figure show that in order to verify the effectiveness of the improved model in this paper, the present invention compares its performance with other popular algorithms on the VisDrone2019 dataset; the compared algorithms include other classic algorithms, YOLO series algorithms and other excellent YOLO-based improved algorithms; these comparative experiments aim to comprehensively evaluate the advantages of the improved algorithms in different detection tasks, especially the performance improvement when dealing with small target detection tasks.
[0088] according to Figure 7 The experimental results show that SDSS-YOLOv8s has higher average detection accuracy than other classic algorithms. Compared with the Faster-RCNN algorithm, mAP50 is 19.6% higher, mAP50-90 is 16.9% higher, and the computational complexity is reduced by 85.5M. Compared with RetinaNet, mAP50 is 24.1% higher, and mAP50-90 is 21% higher.
[0089] according to Figure 7 The experimental results show that compared with the YOLO basic series, the improved model has the highest maP50 and mAP50-95. Compared with YOLOv8m (medium) and YOLOv8l (large), mAP50 is increased by 8.4% and 6.2% respectively, and the computational complexity of the model is reduced by 2.9M and 20.6M respectively. In contrast, the SDSS-YOLOv8s model used in this application has higher accuracy and less computational complexity, and is more suitable for deployment on mobile devices such as drones.
[0090] according to Figure 7 The experimental results show that compared with other excellent improved models UAV-YOLO, maP50 and mAP50-95 increased by 5.7% and 3.6% respectively, and compared with the large model of Drone-YOLO, maP50 and mAP50-95 increased by 1.6% and 0.9% respectively, and the computational complexity of the model was reduced by 53.2M; the above comparison results can prove that the algorithm proposed in this application has the best accuracy in small target detection, but the computational complexity of the model is relatively high. In general, SDSS-YOLOv8s has achieved a good balance between accuracy and complexity, and has a wide range of application prospects, especially for drone aerial photography small target detection tasks with high detection accuracy requirements.
[0091] like Figure 8-11 As shown, in order to intuitively demonstrate the detection effect of the SDSS-YOLOv8s method proposed in this application, this application conducted an inference experiment on SSDS-YOLOv8s and YOLOv8s; the experimental data selected four representative scenes, including traffic intersections, public facilities, market intersections and town roads, and the data set was visualized and analyzed in both daytime and nighttime environments.
[0092] pass Figure 8-11 It can be seen from the comparison results that SDSS-YOLOv8s has better detection performance than YOLOv8s in various scenes and under various lighting conditions; this application selects Fig.11 (A) and (C) in (urban road scene), Figure 8 (Traffic intersection scene) (b) and (d) respectively compare the specific effects in daytime environment and nighttime environment. Fig.12 and Fig.13 shown.
[0093] exist Fig.12In the image selected by the red frame, we can see that YOLOv8s only detected five vehicles and misclassified the bushes as trucks. The pedestrian in the lower left corner of the red frame was also not detected. However, SDSS-YOLOv8s accurately detected vehicles far away on the road in the same area of the same image, detecting 6 more vehicles than YOLOv8s and correctly classifying each vehicle. The person missed by YOLOv8s in the lower left corner was also accurately detected by it.
[0094] exist Fig.13 In the image selected by the red frame in a low-light night environment, YOLOv8s only detected one pedestrian and three motorcycles; while SDSS-YOLOv8s detected four more pedestrians and three more people on motorcycles than YOLOv8s in the same area of the same image, and all the targets in the selected area were detected.
[0095] Through Figure 8-13 A comprehensive comparison of all detection results in the results shows that compared with YOLOv8s, SDSS-YOLOv8s shows higher detection accuracy and lower missed detection rate when detecting densely distributed and low-resolution targets; whether in daytime or nighttime scenes, SDSS-YOLOv8s can stably detect most target objects, including pedestrians, small cars, trucks and motorcycles; even in scenes with low pixel values, dense targets and complex backgrounds, SDSS-YOLOv8s has strong detection performance, thus showing excellent robustness and accuracy; all these also show that the model has strong illumination adaptability and can continuously perform efficient target detection tasks under different lighting conditions.
[0096] In order to verify that the algorithm SDSS-YOLO proposed in this invention is also applicable to other small target detection scenarios, we use the FloW-Img dataset of floating garbage in inland rivers from the perspective of unmanned ships released by Oka Zhibo as the generalization experimental dataset of the model proposed in this invention, where the dataset contains 2000 images, 1200 pictures as training sets, and 800 pictures as verification sets.
[0097] according to Fig.14The data in the figure show that the performance of the SDSS-YOLOv8s model on the FloW-Img dataset is better than that of the basic YOLOv8s model; the precision (P) of SDSS-YOLOv8s is improved by 1.3%, the recall (R) is improved by 3.6%, the mAP50 is improved by 3.3%, and the mAP50-95 is slightly reduced by 0.1%; these experimental data show that SDSS-YOLO can not only perform small target detection tasks in aerial images taken by drones, but also perform well in small target detection in unmanned ship images; this shows that the SDSS-YOLO model has strong generalization ability, and despite changes in image environment and target distribution, it can maintain high detection performance in different scenarios.
[0098] In the application, the directional words such as front, back, top, bottom, etc. involved are defined by the positions of the parts in the drawings and the positions of the parts relative to each other, just for the clarity and convenience of expressing the technical solution. It should be understood that they are relative concepts and can change accordingly according to different ways of use and placement, and the use of the directional words should not limit the scope of protection requested by this application.
[0099] In the absence of conflict, the above embodiments and features in the embodiments may be combined with each other. The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A small target detection model in drone aerial photography scenes, characterized in that: The following steps are involved: Obtain aerial image dataset; The improved YOLOv8s model is trained using an aerial image dataset. The improved YOLOv8s network model includes a backbone feature network, a detection head and a loss function. The backbone feature network introduces an SPD-Conv module in its P2, P3, P4 and P5 layers, the detection head introduces a Dynamic Head module and adds a specific small target detection head (SODH), and the loss function uses Shape-IoU as the loss function; The aerial image to be detected is input into the trained improved YOLOv8s model for detection.
2. The small target detection model in a drone aerial photography scene according to claim 1 is characterized in that: The method for the SPD-Conv module to retain the spatial information of features is as follows: the SPD-Conv module is composed of a space-to-depth layer and a non-stride convolution layer; the space-to-depth layer changes the channel dimension of the feature map for downsampling, thereby retaining the spatial information of the features and avoiding information loss in traditional methods; the non-stride convolution layer reduces the number of channels by using a convolution operation with a stride of 1, and further processes the features by introducing learnable parameters to ensure that key spatial information is retained in the process of reducing the channel dimension, thereby enhancing feature extraction.
3. The small target detection model in a drone aerial photography scene according to claim 1 is characterized in that: The role of introducing the Dynamic Head module in the optimized detection head is as follows: Dynamic Head introduces a self-attention mechanism on different feature dimensions, so that the detection head has scale-awareness, spatial-awareness, and task-awareness capabilities; the optimized detection head can dynamically adjust the network structure according to the input features, so as to better adapt to different target distributions and improve the expression ability of features, thereby improving the accuracy of target positioning and classification in complex scenarios.
4. The small target detection model in a drone aerial photography scene according to claim 3 is characterized in that: The calculation formulas of the three perceptions introduced by the Dynamic Head module are as follows: p C (F)·F=max(α 1 (F)·F c +b 1 (F),a 2 (F)·F c +b 2 (F)); where π c , π s and π L They are task perception module, space perception module and scale perception module respectively. F(·) is a linear function approximated by a 1×1 convolutional layer. is the Hard sigmoid function, K is the number of sparse sampling locations, and p k +Δp k is the spatial offset Δp obtained through self-learning k Perform position shift to focus on the discriminative area, Δm k is the position p k The self-learned importance scalar at ; both are learned from the input features at the median level of F.
5. The small target detection model in a drone aerial photography scene according to claim 1 is characterized in that: A small target detection head with a size of 160×160 is specially introduced in the detection head. The detection head is residually connected with the 160×160 feature map of the P2 layer in the Backbone, so as to fuse the deeper global semantic information with the shallower feature information. Because the P2 layer has a higher resolution, it can better retain the detailed features of small targets. Combined with the feature map of 160×160 scale, the expression ability of small target features can be effectively enhanced.
6. The small target detection model in a drone aerial photography scene according to claim 1 is characterized in that: The Shape-IoU loss function adaptively adjusts the calculation method so that the model can effectively extract the features of different types of targets, thereby maintaining excellent detection performance.
7. The small target detection model in a drone aerial photography scene according to claim 6 is characterized in that: The Shape-IoU loss function expression is as follows: L Shape-Iou =1-IoU+distance shape +0.5×Ω sahpe Among them, scale is the scaling factor, which is related to the scale of the target in the dataset, ωω and hh are the weight coefficients in the horizontal and vertical directions, and their values are related to the shape of the Ground Truth box.
8. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor implements a small target detection model based on a drone aerial photography scenario as described in any one of claims 1 to 7 by executing the computer instructions.
9. A computer-readable storage medium storing computer instructions, characterized in that: When the computer instructions are executed by the computer, a small target detection model in a drone aerial photography scenario according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Unmanned aerial vehicle aerial photography low-visibility sea area target detection method, system and equipment
CN121544875A
Unmanned aerial vehicle aerial low-visibility sea area target detection method, system and device
CN121544875B