A method and medium for real-time moving target detection on UAVs in open areas
By using a lightweight CSPDarknet model and a two-stage real-time inference detection method, the real-time and multi-scale target detection problems of UAVs in open areas are solved, improving detection accuracy and robustness, and making it suitable for mobile target monitoring in complex backgrounds.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN UNIV
- Filing Date
- 2026-05-12
- Publication Date
- 2026-06-09
Smart Images

Figure CN122176286A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of unmanned aerial vehicle (UAV) technology, specifically to a method and medium for real-time moving target detection on UAVs in open areas. Background Technology
[0002] In today's rapidly developing digital and intelligent era, real-time monitoring and management of moving targets has become a crucial requirement for ensuring urban safety, optimizing traffic flow, and improving logistics efficiency. Accurately and in real-time grasping the location, speed, and trajectory of moving targets is a necessary prerequisite for achieving intelligent urban management, refined traffic scheduling, and efficient logistics distribution, directly impacting urban operational efficiency and residents' quality of life. However, traditional methods relying on fixed cameras or manual patrols have significant shortcomings in terms of real-time performance, flexibility, and coverage: fixed cameras can only cover limited areas and cannot adapt to dynamic changes in targets; manual patrols require a large workforce and are difficult to implement for all-day, all-area monitoring. These methods are insufficient to meet the monitoring needs of complex scenarios such as large logistics parks and busy transportation hubs. These areas have densely packed targets and frequent dynamic changes; traditional monitoring methods often suffer from incomplete coverage and delayed response, frequently resulting in blind spots due to fixed equipment or insufficient manpower, severely restricting the timeliness and scientific nature of management decisions. With its advantages of maneuverability, wide coverage, and relatively low cost, drones can quickly reach designated areas and carry out real-time, dynamic monitoring tasks, greatly improving the efficiency and coverage of mobile target monitoring and providing a new technical approach to overcome the limitations of traditional monitoring methods.
[0003] While drone technology has brought new hope to moving target monitoring, it still faces many challenges in practical applications. In recent years, research teams both domestically and internationally have utilized drones equipped with high-resolution cameras, combined with advanced computer vision algorithms, to achieve efficient monitoring of moving targets. These studies mainly focus on improving detection accuracy and handling background noise in complex environments by optimizing deep learning models. Although these methods perform well in laboratory settings, three main problems remain in practical applications. First, insufficient real-time performance: most existing detection models rely on post-processing at ground stations, failing to meet the real-time detection requirements of drones, leading to increased delays in detection results and affecting the real-time performance and effectiveness of monitoring. Second, the challenge of multi-scale target detection: in actual monitoring, the size and distance of moving targets vary greatly, resulting in multi-scale characteristics in images, making it difficult for existing models to accurately detect both large and small targets simultaneously. Third, the issue of detection accuracy in complex backgrounds: in open areas such as city streets and grasslands, there is significant background noise (such as buildings and vegetation), making small target detection susceptible to interference, leading to increased false negatives and missed detections.
[0004] Therefore, developing a real-time moving target detection method for UAVs in open areas has become the key to breaking through current technical bottlenecks and improving the effectiveness of moving target monitoring. It has important practical significance for improving the efficiency and accuracy of moving target monitoring. Summary of the Invention
[0005] The purpose of this invention is to address the problems existing in the prior art by providing a method for real-time moving target detection on unmanned aerial vehicles (UAVs) in open areas.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A method for real-time moving target detection on a drone in open areas includes the following steps: Construction of an open-area moving target dataset: This dataset is designed for detecting moving targets in open areas. Airborne detection model baseline establishment: The CSPDarknet model is used as the baseline model. In its backbone network, only the three shallow feature maps P2, P3 and P4 output from the base network (backbone) used for feature extraction are retained as the input of the neck feature pyramid. The P5 stage located at the top of the backbone network and its subsequent connections are deleted. At the same time, the input and output channels of the SPPF block at the end of the neck are reduced from the default 1024 to 512 to construct a lightweight baseline network containing only shallow high-definition features. The baseline model is optimized as follows: Based on the constructed lightweight baseline network, the standard convolutional units in the CSPDarknet model are replaced with linear deformable convolutions, so that the convolutional sampling grid can be adaptively adjusted according to the geometric deformation of the target; at the same time, a scale sequence feature fusion module is inserted after layers P2 to P4, and the multi-scale feature maps are Gaussian smoothed and then stitched together by 3D convolution, thereby reducing the number of model parameters while retaining the feature extraction capability of the baseline model. Wise-IoU loss is added to the bounding box regression branch of the optimized baseline model to suppress false target edge errors with dynamic weighting of center distance; normalized NWD loss is added in parallel to model the predicted box and the ground truth box as a two-dimensional Gaussian distribution and establish an anti-false target loss function; the optimized baseline model is trained based on the anti-false target loss function to obtain the target detection model; Two-stage real-time inference detection: In the first stage, the detection video (target video captured by the drone) is input frame by frame into the trained target detection model, and candidate boxes and corresponding confidence scores s are output. In the second stage, for boxes with s < 0.25, a square region is adaptively cropped from the original image by a side length of max(w,h) × 1.5, where w is the width of the candidate box and h is the height of the candidate box. The same target detection model weights as in the first stage are used to perform a second forward propagation on the square region to obtain the refined coordinates and refined confidence scores s'. After the refined candidate boxes (refined boxes) are inversely mapped back to the full image, the high-confidence boxes are subjected to non-maximum suppression to output the final detection results.
[0007] Furthermore, drones were used to film moving targets in open areas to obtain moving target videos. The videos were then processed by frame extraction to obtain frame images. The dataset was then expanded using data augmentation methods, and the frame images were labeled to construct a dataset suitable for moving target detection in open areas.
[0008] The data augmentation method includes the following steps: (1) Perform geometric transformations such as rotation, flipping, translation, and scaling on video frames to change the spatial structure of the extracted image; (2) Adjust brightness, contrast, and color saturation to simulate different lighting conditions; (3) Add Gaussian noise and salt-and-pepper noise to enhance robustness.
[0009] Furthermore, the base network is responsible for gradually generating multi-scale feature maps. In each stage, the side length of the feature map is halved by convolution or pooling with a stride of 2, while the number of channels is doubled. The baseline model contains five corresponding feature extraction stages, denoted as C1 to C5, and the corresponding five shallow feature maps are denoted as P2 to P6.
[0010] Furthermore, the linear deformable convolution, while maintaining the sharing of convolution kernel weights, learns a two-dimensional offset only for K sampling points, defined as follows: , After the initial uniform grid sampling coordinates G0 are offset by G=G0+ΔO, the deformed feature values are obtained through bilinear interpolation, whereby the bilinear interpolation is defined as: , In the formula, ΔO represents the two-dimensional offset, R represents the real matrix, k represents the k sampling points selected by the linear variable convolution, and I(x,y) is the interpolation result at the offset coordinates (x,y). q =( q x , q y) represents the integer pixel coordinates of the 4-neighborhood N4(p), and I(q) represents the original feature value of the neighboring pixel q.
[0011] Furthermore, the steps for establishing the inserted scale sequence feature fusion module are as follows: (1) Perform Gaussian smoothing on each channel of the output layers P2 to P4 according to the standard deviations σ = 1, 2, and 3; (2) F σ3 With F σ4 Upsample to F using nearest neighbor. σ2 For the same spatial size, this upsampling process is specifically defined as follows: , In the formula, , They are respectively F σ3 , F σ4 The output value after upsampling, where i' and j' are the sampling positions, c is the number of channels, and s is the magnification factor; (3) Stack vectors along the unified dimension to form a 3D tensor, defined as: , In the formula, X represents the 3D tensor formed by stacking. and These are the results after upsampling to unify the space; (4) Multi-scale fusion is performed using 3D convolutional kernels to output a unified feature map that preserves details and semantics, specifically defined as: , In the formula, X c Let W be the input 3D tensor, b be the 3D convolution kernel, b be the bias vector, Y be the output feature map value at channel Cout, (x,y,z) be the output space-scale coordinates, (k,i,j) be the relative coordinates within the convolution kernel, k be the sampling point, and K be the input 3D tensor. t This represents the size of the 3D convolution kernel in the scale direction. K h The size of the 3D convolution kernel in the height direction. K w The size of the 3D convolution kernel in the width direction. C in and C out These are the number of input and output channels, respectively.
[0012] Furthermore, the Wise-IoU loss is defined as: , In the formula, LIoU To detect the IoU between the ground truth bounding box and the predicted bounding box, R(x,y) is a dynamic weighting factor.
[0013] Furthermore, the IoU in Wise-IoU loss is defined as follows: , , In the formula, Area intersection This represents the area of the intersection between the ground truth bounding box and the predicted bounding box. Area union The area of the union between the ground truth bounding box and the predicted bounding box; x right , x left , y bottom , y top These are the right, left, bottom, and top boundaries of the intersection, respectively. Area pred and Area gt These represent the predicted box area and the actual box area, respectively.
[0014] Furthermore, the Wise-IoU loss uses a dynamic weighting factor R(x,y) to dynamically adjust the weights of the loss based on the center distance between the predicted and ground truth boxes, making the model pay more attention to the center position of the predicted boxes during training. R(x,y) is defined as: , In the formula, (x,y) are the center coordinates of the prediction box, (x,y) gt ,y gt W represents the center coordinates of the true bounding box. gt and H gt These are the width and height of the actual bounding box, respectively.
[0015] Furthermore, a non-maximum suppression method is employed, which focuses on boxes with high confidence while removing other boxes that overlap significantly with them, to ensure that each target is detected only once.
[0016] Furthermore, the specific process of removing other boxes that overlap significantly with the high-confidence box is as follows: (1) Sort all detection boxes from high to low according to their confidence level s; (2) Select the detection box with the highest confidence level. B max As the currently reserved box; (3) Calculation B max IoU with all other detection boxes; (4) Remove detection boxes with an IoU greater than the set threshold of 0.65 from the candidate box list; (5) Repeat steps (2) to (4) until the candidate box list is empty.
[0017] Compared with existing technologies, the beneficial effects of this invention are as follows: 1. This method proposes a novel lightweight target detection model framework for UAVs. Through lightweight model design and a two-stage real-time inference strategy, it significantly improves the real-time performance of the model in the UAV airborne environment, ensuring immediate feedback of detection results and making it suitable for real-time detection of moving targets in open areas. 2. This method effectively solves the problem of multi-scale target detection by designing a scale sequence feature fusion module, performing Gaussian smoothing and 3D convolutional stitching on multi-scale feature maps, and significantly improves the detection accuracy of small targets. While ensuring high model timeliness, it also enables the detection model to have good capabilities when facing complex scenarios with moving targets of varying sizes in open areas. 3. By adding the designed Wise-IoU loss and normalized Wasserstein distance loss to the bounding box regression branch, a dynamic weighting mechanism is innovatively used to suppress false target edge errors, significantly improving the detection accuracy and robustness of the model in complex backgrounds and reducing the false detection and missed detection rates. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating a method for real-time moving target detection on an unmanned aerial vehicle (UAV) in open areas according to the present invention. Figure 2 This is a framework diagram of the real-time detection model on the UAV in this embodiment of the invention; Figure 3 This is a structural diagram of the SSFF module in an embodiment of the present invention; Figure 4 This is a flowchart of the model reasoning process in an embodiment of the present invention; Figure 5 This is a schematic diagram showing the dataset labels established in an embodiment of the present invention; Figure 6 This is a schematic diagram illustrating the reasoning effect in an embodiment of the present invention; Figure 7 This is a schematic diagram of onboard video detection in an embodiment of the present invention; Figure 8 This is a diagram showing the real-time detection results of the present invention during the actual operation of a drone in a certain area. Detailed Implementation
[0019] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] Example 1: A method for real-time moving target detection on UAVs in open areas is provided, combining... Figures 1-4 As shown, the specific steps include the following: Step 1: Construct a dataset of moving targets in open areas. This involves creating an image dataset suitable for detecting moving targets in open areas. Step 2, Airborne Detection Model Baseline Establishment: Using CSPDarknet as the baseline model, in its backbone network, only the three shallow feature maps P2, P3, and P4 output from the base network (Backbone) used for feature extraction are retained as inputs to the neck feature pyramid. The P5 stage at the top of the backbone network and its subsequent connections are deleted. At the same time, the input / output channels of the SPPF block at the end of the neck are reduced from the default 1024 to 512 to construct a lightweight baseline network containing only shallow high-definition features. Step 3: Establishment of Multi-Scale Target Detection Module: Based on the lightweight baseline network constructed in Step 2, the standard convolutional units in the CSPDarknet model are replaced with linear deformable convolutions, allowing the convolutional sampling grid to adaptively adjust with the geometric deformation of the target. Simultaneously, a scale sequence feature fusion module is inserted after layers P2 to P4. After Gaussian smoothing of the multi-scale feature maps, they are concatenated through 3D convolutions. This reduces the number of model parameters while retaining the feature extraction capability of the baseline model, thus completing the optimization of the baseline model. Step 4: Establishing the anti-spoofing target loss function: Add Wise-IoU loss to the bounding box regression branch to suppress false target edge errors with dynamic weighting of center distance; add normalized NWD loss in parallel to model the predicted box and ground truth box as a two-dimensional Gaussian distribution to complete the establishment of the anti-spoofing target loss function; train the optimized baseline model based on the anti-spoofing target loss function to obtain the target detection model; Step 5: Two-stage real-time inference detection on the UAV: In the first stage, the detection video captured by the UAV is input frame by frame into the trained onboard moving target detection model facing open areas, and candidate boxes and corresponding confidence scores s are output. In the second stage, for boxes with s < 0.25, a square region is adaptively cropped from the original image according to the side length max(w,h) × 1.5, where w refers to the width of the candidate box and h refers to the height of the candidate box. The same target detection model weights as in the first stage are used to perform a second forward propagation on the square region to obtain the refined coordinates and refined confidence scores s'. After the refined candidate boxes (refined boxes) are inversely mapped back to the full image, the high-confidence boxes are subjected to non-maximum suppression to output the final detection results.
[0021] This method for real-time moving target detection on UAVs in open areas significantly improves the real-time performance of the model in the UAV airborne environment through the above steps, ensuring immediate feedback of detection results. It is well-suited for the real-time detection needs of moving targets in open areas.
[0022] In step 3, by designing a scale sequence feature fusion module (SSFF), Gaussian smoothing and 3D convolution are performed on the multi-scale feature maps, which effectively solves the problem of multi-scale target detection and significantly improves the detection accuracy of small targets. While ensuring the high timeliness of the model, it also enables the detection model to have good capabilities when facing complex scenes with moving targets of different sizes in open areas.
[0023] In step 4, by adding the designed Wise-IoU loss and normalized Wasserstein distance (NWD) loss to the bounding box regression branch, a dynamic weighting mechanism is innovatively used to suppress false target edge errors, which significantly improves the detection accuracy and robustness of the model in complex backgrounds and reduces the false detection and missed detection rates.
[0024] As a supplement, in step 1, a drone is used to film moving targets in an open area to obtain moving target videos. The videos are then processed by frame extraction to obtain frame images. The dataset is then expanded using data augmentation methods, and the frame images are accurately labeled to construct a dataset suitable for moving target detection in open areas.
[0025] In this embodiment, firstly, a drone is used to film moving targets (such as various animals) in an open area, exemplified by a nature reserve, to acquire high-quality moving target videos. Then, frame extraction is performed on the videos, and the dataset is expanded using data augmentation methods. Finally, the LabelImg tool is used to accurately label the extracted frames, constructing a dataset suitable for moving target detection in open areas, such as... Figure 5 As shown.
[0026] The data augmentation method includes the following steps: (1) Perform geometric transformations such as rotation, flipping, translation, and scaling on video frames to change the spatial structure of the extracted image; (2) Adjust brightness, contrast, and color saturation to simulate different lighting conditions; (3) Add Gaussian noise and salt-and-pepper noise to enhance robustness.
[0027] As a supplement, the base network is responsible for gradually generating multi-scale feature maps. In each stage, the side length of the feature map is halved by convolution or pooling with a stride of 2, while the number of channels is doubled. The baseline model contains five corresponding feature extraction stages, denoted as C1 to C5, and the five corresponding shallow feature maps are denoted as P2 to P6.
[0028] Specifically, in this embodiment, CSPDarknet (Cross Stage Partial Darknet) is used as the baseline model. In its backbone network, only the three shallow feature maps P2 (160×160), P3 (80×80), and P4 (40×40) output from the backbone are retained as inputs to the neck feature pyramid. The P5 stage (64× downsampling, 20×20) at the top of the backbone and its subsequent connections are deleted. At the same time, the input / output channels of the SPPF (Spatial Pyramid Pooling - Fast) block at the end of the neck are reduced from the default 1024 to 512, thus constructing a lightweight baseline network containing only shallow high-definition features.
[0029] The Backbone refers to the base network used for feature extraction, which is responsible for gradually generating multi-scale feature maps from the input image. Its main process is to halve the side length of the feature map and double the number of channels at each stage through convolution or pooling with a stride of 2. The baseline model contains five corresponding feature extraction stages, denoted as C1 to C5, which will output five corresponding shallow feature maps denoted as P2 to P6.
[0030] The SPPF block is a lightweight module in the baseline model used for "multi-scale receptive field fusion." Its function is to concatenate the max pooling results from different scales and then use 1×1 convolutions to reduce dimensionality, thereby concatenating three receptive fields of different sizes (e.g., 5×5, 9×9, 13×13) into the same feature layer at once without increasing the number of learnable parameters. The reduction of the SPPF block's input / output channels from the default 1024 to 512, as proposed in step 2, only occurs within the convolutions inside the SPPF block.
[0031] As a supplement, in step 3, the Linear Deformable Convolution (LD-conv) learns a two-dimensional offset for only K sampling points while maintaining the sharing of convolution kernel weights, as defined below: , Then the initial uniform grid sampling coordinates G0 are obtained by G=G0+Δ O After offset processing, the deformed eigenvalues are obtained through bilinear interpolation, whereby bilinear interpolation is defined as follows: , In the formula, Δ O Represents the two-dimensional offset, R represents a real matrix, k represents the k sampling points selected by the linear variable convolution, and I(x,y) is the interpolation result at the offset coordinates (x,y); q =( q x , q y ) represents the integer pixel coordinates of the 4-neighborhood N4(p), and I(q) represents the original feature value of the neighboring pixel q.
[0032] Furthermore, the steps for establishing the Scaled-Sequence Feature Fusion (SSFF) module inserted in step 3 are as follows: (1) Perform Gaussian smoothing on each channel of the P2 to P4 layers output in step 2 according to the standard deviations σ = 1, 2, and 3; The Gaussian smoothing is specifically defined as follows: , In the formula , F(i,j) For the smoothed output features at position (i,j) The value, P(iu,jv) The original values of the input feature map after adding the convolution kernel offset; G σ (u,v) The kernel is a two-dimensional Gaussian kernel, where σ is the standard deviation (1, 2, or 3 in this invention); u and v are the relative offsets within the kernel, -r≤u,v≤r, where r=[3σ].
[0033] (2) F σ3 With F σ4 Upsample to F using nearest neighbor. σ2 For the same spatial size, this upsampling process is specifically defined as follows: , In the formula, , They are respectively Fσ3 , F σ4 The output value after upsampling, i' and j' are the sampling positions, c is the number of channels, and s is the magnification factor (2 and 4 respectively).
[0034] (3) Stack vectors along the unified dimension to form a 3D tensor, defined as: , In the formula, X represents the 3D tensor formed by stacking. and These are the results after upsampling and unifying the space.
[0035] (4) Multi-scale fusion is performed using 3D convolutional kernels to output a unified feature map that preserves details and semantics, specifically defined as: , In the formula, X c Let W be the input 3D tensor, b be the 3D convolution kernel, b be the bias vector, Y be the output feature map value at channel Cout, (x,y,z) be the output space-scale coordinates, (k,i,j) be the relative coordinates within the convolution kernel, k be the sampling point, and K be the input 3D tensor. t This represents the size of the 3D convolution kernel in the scale direction. K h The size of the 3D convolution kernel in the height direction. K w The size of the 3D convolution kernel in the width direction. C in and C out These are the number of input and output channels, respectively.
[0036] As a supplement, the Wise-IoU loss in step 4 is defined as: , In the formula, L IoU To detect the IoU between the ground truth bounding box and the predicted bounding box, R(x,y) is a dynamic weighting factor.
[0037] In Wise-IoU loss, IoU is defined as follows: , , In the formula, Area intersection This represents the area of the intersection between the ground truth bounding box and the predicted bounding box. Area union The area of the union between the ground truth bounding box and the predicted bounding box; x right ,x left , y bottom , y top These are the right, left, bottom, and top boundaries of the intersection, respectively. Area pred and Area gt These represent the predicted box area and the actual box area, respectively.
[0038] x right , x left , y bottom , y top They are defined as follows: ; Area pred and Area gt They are defined as follows: .
[0039] As a supplement, in step 4, the dynamic weighting factor R(x,y) used in the Wise-IoU loss dynamically adjusts the weights of the loss based on the center distance between the predicted bounding box and the ground truth bounding box. This makes the model pay more attention to the center position of the predicted bounding box during training, thereby improving object detection accuracy. R(x,y) is defined as: , In the formula, (x,y) are the center coordinates of the prediction box, (x,y) gt ,y gt W represents the center coordinates of the true bounding box. gt and H gt These are the width and height of the actual bounding box, respectively.
[0040] As a supplement, step 5 employs non-maximum suppression (NMS) to retain high-confidence boxes among multiple overlapping detection boxes detected by the real-time detection model, while removing other boxes that overlap significantly with them. This ensures that each target is detected only once. The inference effect is illustrated below. Figure 6 As shown.
[0041] Specifically, the process of removing other boxes that overlap significantly with a box based on its high confidence level is as follows: (1) Sort all detection boxes from high to low according to their confidence level s; (2) Select the detection box with the highest confidence level. Bmax As the currently reserved box; (3) Calculation B max IoU with all other detection boxes; (4) Remove detection boxes with an IoU greater than the set threshold of 0.65 from the candidate box list; (5) Repeat steps (2) to (4) until the candidate box list is empty.
[0042] The target detection method in this embodiment, using a drone to capture a detection video of a certain area, is shown below. Figure 7 As shown, Figure 8 The image shows the results of real-time monitoring during actual drone operation.
[0043] Example 2: In specific implementation, the method proposed in the technical solution of the present invention can be automatically executed by those skilled in the art using computer software technology. The system device for implementing the method, such as a computer-readable storage medium storing the corresponding computer program of the technical solution of the present invention and a computer device including the computer program running the corresponding computer program, should also be within the protection scope of the present invention.
[0044] For example, a computer-readable storage medium includes a stored program that, when executed by a processor, implements the real-time moving target detection method for unmanned aerial vehicles in open areas as described in Example 1.
[0045] An electronic device includes at least one processor and at least one memory connected to the processor; wherein the processor is configured to call program instructions in the memory to execute the real-time moving target detection method for open-area UAVs as described in Embodiment 1.
[0046] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for real-time moving target detection on unmanned aerial vehicles (UAVs) in open areas, characterized in that, Includes the following steps: A dataset of images suitable for moving target detection in open areas was constructed; Using the CSPDarknet model as the baseline model, in the backbone network of this baseline model, the three shallow feature maps P2, P3 and P4 output from the base network used for feature extraction are retained as the input of the neck feature pyramid, and the P5 stage located at the top of the backbone network and its subsequent connections are deleted; the input and output channels of the SPPF block at the end of the neck are reduced from the default 1024 to 512 to construct a lightweight baseline network with shallow high-definition features. The baseline model is optimized as follows: Based on the constructed lightweight baseline network, the standard convolutional units in the CSPDarknet model are replaced with linear deformable convolutions, and a scale sequence feature fusion module is inserted after layers P2 to P4. The multi-scale feature maps are Gaussian smoothed and then stitched together by 3D convolution. Wise-IoU loss is added to the bounding box regression branch of the optimized baseline model to suppress false target edge errors with dynamic weighting of center distance; normalized NWD loss is added in parallel to model the predicted box and the ground truth box as a two-dimensional Gaussian distribution and establish an anti-false target loss function; the optimized baseline model is trained based on the anti-false target loss function to obtain the target detection model; Two-stage real-time inference detection: In the first stage, the detection video captured by the drone is input frame by frame into the trained target detection model, which outputs candidate boxes and corresponding confidence scores. s ; In the second phase, for s For boxes <0.25, use max(w, h The square region with a side length of 1.5 is adaptively cropped from the original image. Here, w represents the width of the candidate box, and h represents its height. The same object detection model weights as in the first stage are used for a second forward propagation of this square region to obtain the refined coordinates and refined confidence scores. s' After the refined candidate boxes are inversely mapped back to the full image, the high-confidence boxes are subjected to non-maximum suppression to output the final detection results.
2. The method for real-time moving target detection on an unmanned aerial vehicle (UAV) in open areas according to claim 1, characterized in that, Using drones to film moving targets in open areas, the video of the moving targets is obtained. The video is then processed by frame extraction to obtain frame images. The dataset is then expanded using data augmentation methods, and the frame images are labeled to construct a dataset suitable for moving target detection in open areas.
3. The method for real-time moving target detection on an unmanned aerial vehicle (UAV) in open areas according to claim 1, characterized in that, The base network is responsible for gradually generating multi-scale feature maps. In each stage, the side length of the feature map is halved by convolution or pooling with a stride of 2, while the number of channels is doubled. The baseline model contains five corresponding feature extraction stages, denoted as C1 to C5, and the five corresponding shallow feature maps are denoted as P2 to P6.
4. The method for real-time moving target detection on an unmanned aerial vehicle (UAV) in open areas according to claim 1, characterized in that, The linear deformable convolution learns a two-dimensional offset for only K sampling points while maintaining shared kernel weights, as defined below: , Initial uniform grid sampling coordinates G 0 After offsetting by G=G0+ΔO, the deformed eigenvalues are obtained through bilinear interpolation, whereby the bilinear interpolation is defined as: , In the formula, ΔO represents the two-dimensional offset, R represents the real matrix, and k represents the k sampling points selected by the linear variable convolution. I (x,y) It is the interpolation result at the offset coordinates (x, y); q=(q x ,q y ) 4-neighborhood N 4 (p) Integer pixel coordinates I(q) For the domain pixels q The original eigenvalues.
5. The method for real-time moving target detection on an unmanned aerial vehicle (UAV) in open areas according to claim 1, characterized in that, The steps for establishing the inserted scale sequence feature fusion module are as follows: (1) Perform Gaussian smoothing on each channel of the output layers P2 to P4 according to the standard deviations σ = 1, 2, and 3; (2) F σ3 and F σ4 Upsampling from nearest neighbor F σ2 For the same spatial size, this upsampling process is specifically defined as follows: , In the formula, , They are respectively F σ3 , F σ4 Output value after upsampling i' and j' Here, c represents the sampling position, s represents the number of channels, and s represents the magnification factor. (3) Stack vectors along the unified dimension to form a 3D tensor, defined as: , In the formula, X represents the 3D tensor formed by stacking. and These are the results after upsampling to unify the space; (4) Multi-scale fusion is performed using 3D convolutional kernels to output a unified feature map that preserves details and semantics, specifically defined as: , In the formula, X c For the input 3D tensor, W 3D convolution kernel, b For bias vectors, Y To output feature maps in channels C out The values are (x, y, z), which are the output space-scale coordinates, (k, i, j), which are the relative coordinates within the convolution kernel, and k is the sampling point. K t This represents the size of the 3D convolution kernel in the scale direction. K h The size of the 3D convolution kernel in the height direction. K w The size of the 3D convolution kernel in the width direction. C in and C out These represent the number of input and output channels, respectively.
6. The method for real-time moving target detection on an unmanned aerial vehicle (UAV) in open areas according to claim 1, characterized in that, Wise-IoU loss is defined as: , In the formula, L IoU To detect the gap between the ground truth bounding box and the predicted bounding box IoU , R(x,y) It is a dynamic weighting factor; Wise-IoU loss IoU The definition is as follows: , , In the formula, Area intersection This represents the area of the intersection between the ground truth bounding box and the predicted bounding box. Area union The area of the union between the ground truth bounding box and the predicted bounding box; x right , x left , y bottom , y top These are the right, left, bottom, and top boundaries of the intersection, respectively. Area pred and Area gt These represent the predicted box area and the actual box area, respectively.
7. The method for real-time moving target detection on an unmanned aerial vehicle (UAV) in open areas according to claim 6, characterized in that, The dynamic weighting factor used in Wise-IoU loss R(x,y) The loss weights are dynamically adjusted based on the center distance between the predicted bounding box and the ground truth bounding box, making the model pay more attention to the center position of the predicted bounding box during training. R(x,y) Defined as: , In the formula, (x,y) are the center coordinates of the prediction box, (x,y) gt ,y gt W represents the center coordinates of the true bounding box. gt and H gt These are the width and height of the actual bounding box, respectively.
8. The method for real-time moving target detection on an unmanned aerial vehicle (UAV) in open areas according to claim 1, characterized in that, The non-maximum suppression method is used, which focuses on boxes with high confidence while removing other boxes that overlap with them, so that each target is detected only once.
9. The method for real-time moving target detection on an unmanned aerial vehicle (UAV) in open areas according to claim 8, characterized in that, The specific process of removing other boxes that overlap significantly with the high-confidence box is as follows: (1) Sort all detection boxes from high to low according to their confidence level s; (2) Select the detection box with the highest confidence level. B max As the currently reserved box; (3) Calculation B max IoU with all other detection boxes; (4) Remove detection boxes with an IoU greater than the set threshold of 0.65 from the candidate box list; (5) Repeat steps (2) to (4) until the candidate box list is empty.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program that, when executed by a processor, implements the real-time moving target detection method for unmanned aerial vehicles in open areas as described in any one of claims 1 to 9.