A method and system for extracting and detecting wildlife image features in real time by using a UAV

CN122157038APending Publication Date: 2026-06-05WUHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUHAN UNIV
Filing Date
2026-02-10
Publication Date
2026-06-05

Smart Images

  • Figure CN122157038A_ABST
    Figure CN122157038A_ABST
Patent Text Reader

Abstract

The present application provides a kind of unmanned plane wild animal image feature extraction and real-time detection method and system, method includes: obtaining the real-time video of undergrowth containing wild animal to be detected by unmanned plane shooting;Completed DDM-YOLO detection model is trained, and the wild animal image feature extracted and wild animal real-time detection result are output;Wherein, the training process of DDM-YOLO detection model includes: constructing the undergrowth wild animal multi-scene data set containing thermal infrared and visible light multi-modal image;YOLOv8 is used as basic framework, and DDM-YOLO detection model is constructed;The DDM-YOLO detection model integrates depth separable space to depth convolution downsampling module, deformable channel attention convolution module, uses multi-task adaptive intersection over union loss function;Undergrowth wild animal multi-scene data set is used to train DDM-YOLO detection model, and the model after training is completed is output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of ecological monitoring technology, specifically relating to a method and system for extracting and real-time detecting wildlife images from unmanned aerial vehicles (UAVs). Background Technology

[0002] Traditional forest animal monitoring methods mainly rely on manual ground patrols. However, forest areas have complex terrain and dense vegetation, and manual patrols suffer from problems such as low efficiency, high cost, and limited coverage. Furthermore, it is difficult to detect scattered animals in the first instance, which can easily lead to missing the best time for intervention.

[0003] Unmanned aerial vehicle (UAV) remote sensing technology, with its advantages of mobility, low cost, and high spatial resolution, has been gradually applied in the field of forest monitoring. By equipping UAVs with visible light or infrared imaging equipment, image data of large areas of forest can be quickly acquired, providing a new technical approach for efficient animal monitoring. However, in practical applications, the complex vegetation environment under the forest canopy poses a serious challenge to target detection in UAV images. The core problem lies in the understory occlusion effect: the branches and leaves of the forest canopy, the understory shrubs, and herbaceous plants can severely obscure ground targets, resulting in animals appearing in images with incomplete features, blurred outlines, and high background noise, or even only a local area of ​​the target can be captured.

[0004] Existing target detection methods based on UAV imagery are mostly designed for large targets (such as vehicles, buildings, and large wild animals) in open scenes. Their feature extraction modules mainly rely on the complete outline, texture, and color information of the target. When dealing with small animal targets in occluded forest scenes, existing methods have the following drawbacks: 1. Insufficient feature extraction capability: Existing methods struggle to effectively distinguish the weak features of occluded animals from complex forest background noise, easily misclassifying obstructions such as dead branches and stones as targets. Simultaneously, many real targets are missed due to feature occlusion. 2. Poor real-time performance: Target detection algorithms for high-resolution UAV imagery typically have high computational complexity, making real-time processing on the UAV difficult. This necessitates transmitting monitoring data back to the ground station for offline analysis, failing to meet the needs of rapid on-site decision-making. 3. Limited small target detection performance: Animals are usually small targets in UAV imagery, and existing algorithms lack sufficient feature representation capabilities for small targets, resulting in detection accuracy and recall rates that are insufficient for practical applications.

[0005] In addition, existing drone monitoring methods for forest environments mostly focus on monitoring macro indicators such as fires, pests and diseases, and vegetation coverage. There is a lack of research on detection methods specifically for animals in forest cover scenarios, and a complete technical solution that combines high detection accuracy and real-time performance has not yet been formed. Summary of the Invention

[0006] To overcome the shortcomings of existing methods for detecting small animal targets in forest cover scenarios, such as insufficient feature extraction capabilities, poor real-time performance, and limited small target detection capabilities, which make them unsuitable for practical applications, this invention provides a method and system for feature extraction and real-time detection of wildlife images using unmanned aerial vehicles (UAVs). This method is based on the high-precision, lightweight detection model DDM-YOLO (Deformable and Depthwise Separation Module) of YOLOv8. The DDM-YOLO model achieves real-time and accurate detection of occluded wildlife in forest undergrowth. First, a feature extraction module (DCAC) incorporating a deformable large kernel attention mechanism is designed into the backbone network. Deformable convolutions adaptively focus on irregular and occluded target features, while large kernel attention expands the receptive field, enhancing the model's ability to represent the features of diverse wildlife in complex backgrounds. Second, a depthwise separable space-to-depth convolutional downsampling module (DSSDConv) is introduced into the neck network to replace standard convolutions. This reduces the number of parameters and computational complexity while preserving fine-grained feature information of the target, enhancing the efficiency of multi-scale feature fusion. Finally, regarding the loss function, a multi-task adaptive intersection-union loss function with thermal feature consistency (MTAIoU) is proposed. This module reduces the negative impact of low-quality examples on training, improving localization accuracy. Experimental results show that the DDM-YOLO detection model significantly improves mean accuracy (mAP) while maintaining high inference speed and substantially reducing the number of parameters.

[0007] According to one aspect of the present invention, a method for feature extraction and real-time detection of wildlife images using an unmanned aerial vehicle (UAV) is provided, comprising:

[0008] Acquire real-time video footage of forest understory containing wildlife, captured by drones;

[0009] The real-time video stream frames under the forest are input into the trained DDM-YOLO detection model, and the extracted wildlife image features and real-time wildlife detection results are output. The real-time wildlife detection results include: wildlife category, coordinates and confidence information.

[0010] The training process of the DDM-YOLO detection model includes:

[0011] Construct a multi-scene dataset of forest wildlife containing thermal infrared and visible light multimodal images;

[0012] Based on the YOLOv8 framework, a DDM-YOLO detection model is constructed. The DDM-YOLO detection model integrates a depth-separable spatial-to-depth convolutional downsampling module and a deformable channel attention convolution module, and adopts a multi-task adaptive cross-union loss function. This model processes the input wildlife images and outputs wildlife image features and real-time wildlife detection results.

[0013] The DDM-YOLO detection model was trained using a multi-scene dataset of wild animals in the forest, and the trained model was output.

[0014] As a further technical solution, the steps for constructing the DDM-YOLO detection model based on the YOLOv8 framework include:

[0015] The DSSDConv module is used to replace stride convolution at the entry point and downsampling point of the backbone network;

[0016] A deformable channel attention convolution module is embedded at the end of the backbone network;

[0017] In the neck network, the DSSDConv module is used to replace standard convolutions for downsampling and feature fusion, reducing the model size;

[0018] A multi-task adaptive cross-union loss function is used to predict the head.

[0019] As a further technical solution, the DDM-YOLO detection model consists of three parts: a backbone network, a neck network, and a head network.

[0020] The input wildlife image received by the backbone network is losslessly downsampled at the entry point by a depth-separable spatial-to-depth convolutional downsampling module. Then, the number of channels is expanded through a standard convolutional block to obtain an initial scale feature map. After that, features are extracted by four C2f modules. A depth-separable spatial-to-depth convolutional downsampling module is connected between two adjacent C2f modules to achieve lossless downsampling. The feature maps output by the second, third and fourth C2f modules are output to obtain multi-scale feature maps. Among them, a fast spatial pyramid pooling block is connected after the fourth C2f module, so that the highest scale feature map in the multi-scale feature map is fused with multi-scale semantics. The highest scale feature map fused with multi-scale semantics is enhanced with anti-occlusion feature by a deformable channel attention convolutional module to output the extracted wildlife image features.

[0021] The neck network starts with the highest-scale feature map that integrates multi-scale semantics, adopts the PAN-FPN structure, integrates multi-scale feature maps, and outputs three-scale output feature maps.

[0022] The head network adopts a decoupled head structure, with three detection heads processing the output feature maps at three scales from the neck network respectively, and finally outputting wildlife detection results containing wildlife category, coordinates and confidence information.

[0023] As a further technical solution, the deformable channel attention convolution module uses residual connections as its backbone. An offset generation sub-network, consisting of grouped convolutions, GELU activation functions, and 1×1 convolutions, processes the feature map input to the deformable channel attention convolution module to generate a normalized sampling point offset field. A deformable depthwise separable convolutional layer performs deformable depthwise separable convolution on the input feature map based on the sampling point offset field, extracting the deformation and occlusion target features of the input feature map. A lightweight attention sub-network sequentially processes the deformation and occlusion target features through adaptive average pooling layers, GELU activation function layers, two-dimensional convolutional layers, and Sigmoid activation function layers, performs channel importance recalibration, and finally, through convolutional layer processing, obtains mixed features and introduces residual connections to generate the final wildlife image features.

[0024] As a further technical solution, the mathematical expression of the task-adaptive intersection-union ratio (IUU) loss function is as follows:

[0025] L IoU =λ cls L cls +λ box L box +λ dfl L dfl +λ thermal L thermal

[0026] In the formula, L IoU L represents the multi-task adaptive intersection-union loss function; cls L box L dfl and L thermal The improved Focal loss, dynamic non-monotonic focusing mechanism and geometric sensitivity loss, distributed focus loss, and thermal infrared feature consistency loss are represented by weighting coefficients λ. cls , λ box , λ dfl and λ thermal .

[0027] As a further technical solution, the structure and workflow of the depth-separable space to depth convolutional downsampling module include:

[0028] By employing a space-to-depth transformation, the feature map [B, C, H, W] of the input depth-separable space-to-depth convolutional downsampling module is rearranged into [B, C×4, H / 2, W / 2] to form a high-dimensional feature map, preserving local spatial structure information and achieving lossless downsampling.

[0029] By employing depthwise separable convolution, channel-wise convolution is sequentially performed on the high-dimensional feature map, followed by spatial filtering and pointwise convolution, to achieve cross-channel feature fusion and obtain lossless downsampling results of the input feature map.

[0030] As a further technical solution, the lightweight design of the DDM-YOLO detection model also includes: reducing the number of times the C2f module in the backbone network is repeatedly executed to 2-3 times, reducing the number of channels in each layer, and compressing the number of parameters in the model.

[0031] According to another aspect of this specification, a system for extracting and detecting wildlife images from unmanned aerial vehicles (UAVs) in real time is provided, comprising:

[0032] The real-time input module is used to acquire real-time video of the forest understory containing wild animals, captured by a drone.

[0033] The feature extraction and real-time detection module is used to input real-time video stream frames from the forest floor into the trained DDM-YOLO detection model, and output the extracted wildlife image features and real-time wildlife detection results. The real-time wildlife detection results include: wildlife category, coordinates, and confidence information.

[0034] The training process of the DDM-YOLO detection model includes:

[0035] Construct a multi-scene dataset of forest wildlife containing thermal infrared and visible light multimodal images;

[0036] Based on the YOLOv8 framework, a DDM-YOLO detection model is constructed. The DDM-YOLO detection model integrates a depth-separable spatial-to-depth convolutional downsampling module and a deformable channel attention convolution module, and adopts a multi-task adaptive cross-union loss function. This model processes the input wildlife images and outputs wildlife image features and real-time wildlife detection results.

[0037] The DDM-YOLO detection model was trained using a multi-scene dataset of wild animals in the forest, and the trained model was output.

[0038] According to another aspect of this specification, an electronic device is provided, including a memory and a processor, the memory storing program instructions executed by the processor, the processor invoking the program instructions to perform a method for extracting and detecting wildlife image features from unmanned aerial vehicles (UAVs) in real time.

[0039] According to another aspect of this specification, a non-transitory computer-readable storage medium is provided, the non-transitory computer-readable storage medium storing computer instructions that cause the computer to execute a method for extracting and detecting wildlife image features from unmanned aerial vehicles (UAVs) in real time.

[0040] Compared with existing technologies, the advantages of this invention are as follows: This invention uses YOLOv8-n as the basic model to construct an improved lightweight network model (DDM-YOLO detection model). Addressing the issues of insufficient feature extraction, information loss during downsampling, poor adaptability of the loss function, and excessive model weight in forest occlusion scenarios, the invention achieves lossless downsampling and lightweighting through the DSSDConv module, preserving fine-grained features of occluded targets while reducing the number of parameters; it enhances the model's ability to represent features of deformed and occluded targets by fusing deformable convolution and channel attention through the DCAC module; it optimizes training performance through the MTAIoU loss function, improving classification and localization accuracy; and it further compresses the model size by simplifying the network structure, adapting to deployment on edge devices. While ensuring detection accuracy, this invention achieves lightweighting and real-time detection, effectively solving the problem of efficient detection of wild animals in forest occlusion scenarios. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 A flowchart illustrating a method for extracting and detecting wildlife images from unmanned aerial vehicles (UAVs) in real time, provided in an embodiment of the present invention.

[0043] Figure 2 This is a schematic diagram of the DSSDConv network structure in an embodiment of the present invention;

[0044] Figure 3 This is a schematic diagram of the DCAC network structure in an embodiment of the present invention;

[0045] Figure 4 A flowchart illustrating a method for feature extraction and real-time detection of unmanned aerial vehicle (UAV) wildlife images to address forest cover obstruction, provided by an embodiment of the present invention;

[0046] Figure 5 This is a framework diagram of the DDM-YOLO detection model in an embodiment of the present invention;

[0047] Figure 6 These are the detection results of examples with different degrees of occlusion in the test set in this embodiment of the invention;

[0048] Figure 7 This is a schematic diagram of the results of a drone-based wildlife image feature extraction and real-time detection system provided in an embodiment of the present invention;

[0049] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0050] It should be noted that:

[0051] The terms “comprising” and “having”, and any variations thereof, in the specification, claims, and accompanying drawings of this invention are intended to cover a non-exclusive inclusion, such as a process, method, system, product, or apparatus that includes a series of steps or units, not necessarily limited to those explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0052] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices. The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be decomposed, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0053] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, 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. In addition, the technical features of the various embodiments or individual embodiments provided by the present invention can be arbitrarily combined to form new technical solutions. Such combinations are not bound by the order of steps and / or structural composition patterns, but must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.

[0054] Existing drone monitoring methods for forest environments mostly focus on monitoring macro-indicators such as fires, pests and diseases, and vegetation coverage. There is a lack of research on detection methods specifically for animals in forest cover scenarios, and a complete technical solution that combines high detection accuracy and real-time performance has not yet been formed.

[0055] Therefore, this invention provides a method that can effectively solve the problem of forest canopy obstruction and achieve accurate extraction and real-time detection of animal features in UAV images. This method has significant practical importance and application value for improving the intelligent level of forest ecosystem monitoring and ensuring ecological and environmental safety. Figure 1 As shown, a method for feature extraction and real-time detection of wildlife images using unmanned aerial vehicles (UAVs) includes:

[0056] Step 1: Acquire real-time video footage of the forest understory containing wild animals, captured by a drone;

[0057] Step 2: Input the real-time video stream frames under the forest into the trained DDM-YOLO detection model, and output the extracted wildlife image features and the real-time wildlife detection results. The real-time wildlife detection results include: the category, coordinates and confidence information of the wildlife.

[0058] The training process of the DDM-YOLO detection model includes:

[0059] Step 2-1: Construct a multi-scene dataset of forest wildlife containing thermal infrared and visible light multimodal images;

[0060] Step 2-2: Based on the YOLOv8 framework, construct the DDM-YOLO detection model. The DDM-YOLO detection model integrates a depth-separable spatial-to-depth convolutional downsampling module and a deformable channel attention convolution module, and adopts a multi-task adaptive cross-union loss function. This model processes the input wildlife images and outputs wildlife image features and real-time wildlife detection results.

[0061] Steps 2-3: Train the DDM-YOLO detection model using a multi-scene dataset of wild animals in the forest and output the trained model.

[0062] In step 2-1, the multi-scene dataset of forest wildlife includes wildlife image samples in thermal infrared and visible light with different degrees of occlusion, different scales, and different lighting conditions. After labeling, the samples are divided into training set, validation set, and test set. The collection area of ​​the wildlife image samples covers typical forest environments including but not limited to coniferous forest, broad-leaved forest, and mixed forest. The wild animals collected include but are not limited to deer, wild boar, panda, and hare.

[0063] The degree of occlusion is divided into four categories: no occlusion, slight occlusion (occlusion area ≤ 20%), moderate occlusion (20% < occlusion area ≤ 70%), and severe occlusion (occlusion area > 70%).

[0064] Preferably, the multi-scene dataset of wild animals in the forest contains samples of targets at different scales and complex backgrounds.

[0065] Specifically, the LabelImg tool was used to label the samples, and the labeling format was YOLO.

[0066] Step 2-2, which involves constructing the DDM-YOLO detection model based on the YOLOv8 framework, includes the following steps:

[0067] Step 2-2.1: Replace stride convolution with DSSDConv modules at the entry and downsampling points of the backbone network.

[0068] The core of the DSSDConv module lies in its use of a "space-to-depth" transformation as a lossless downsampling strategy. This reconstructs pixel information from local regions to the channel dimension, rather than directly discarding or compressing it. This maximizes the preservation of fine-grained spatial information during the downsampling process, which is crucial for preventing the loss of features from occluded or blurred thermal infrared small targets. Subsequently, efficient filtering is performed through depthwise separable convolution, greatly reducing the number of parameters and computational complexity.

[0069] Specifically, such as Figure 2 As shown, the workflow of the depth-separable space to depth convolutional downsampling module (DSSDConv) includes:

[0070] By employing a space-to-depth transformation, the feature map [B, C, H, W] of the input depth-separable space-to-depth convolutional downsampling module is rearranged into [B, C×4, H / 2, W / 2] to form a high-dimensional feature map, preserving local spatial structure information and achieving lossless downsampling.

[0071] By employing depthwise separable convolution, channel-wise convolution is sequentially performed on the high-dimensional feature map, followed by spatial filtering and point-wise convolution, to achieve cross-channel feature fusion and obtain lossless downsampling results of the input feature map, significantly reducing the number of parameters and computational complexity.

[0072] Preferably, the depth-separable spatial to depth convolutional downsampling module introduces an adaptive padding strategy to adapt to inputs of arbitrary resolution, stabilizes training through batch normalization layers, and enhances nonlinear representation using the Hardswish activation function.

[0073] Step 2-2.2: Embed deformable channel attention convolutional modules (DCAC modules) at the ends of the backbone network.

[0074] The DCAC module integrates deformable convolution and channel attention mechanisms to enhance the model's ability to perceive complex geometric deformations and occluded targets. Deformable convolution allows the convolution kernel to adaptively adjust the sampling point position according to the target shape, effectively modeling the outline of animals irregularly occluded by branches and leaves, and significantly improving the model's robustness to deformed targets. At the same time, the channel attention mechanism weights key features with significant temperature contrast in thermal infrared images, suppressing complex background noise. Furthermore, by predicting offsets through lightweight subnetworks and combining them with depthwise separable convolutional structures, the feature representation ability is significantly improved while maintaining low computational complexity, making it possible to use large-size convolution kernels to expand the receptive field.

[0075] The deformable channel attention convolution module uses residual connections as its backbone. It processes the input feature map through an offset generation sub-network consisting of grouped convolutions, GELU activation functions, and 1×1 convolutions to generate a normalized sampling point offset field. The deformable depthwise separable convolutional layer performs deformable depthwise separable convolution on the input feature map based on the sampling point offset field to extract the deformation and occlusion target features of the input feature map. The lightweight attention sub-network processes the deformation and occlusion target features through an adaptive average pooling layer, a GELU activation function layer, a two-dimensional convolutional layer, and a Sigmoid activation function layer in sequence. Channel importance is recalibrated using Squeeze-and-Excitation. Finally, the mixed features are obtained through a 1×1 convolutional layer, and residual connections are introduced to generate the final wildlife image features.

[0076] Specifically, such as Figure 3 As shown, firstly, the offset generation subnetwork is a lightweight subnetwork, which sequentially includes a first two-dimensional convolutional layer (conv2d), a first GELu activation function layer (GELu), a second two-dimensional convolutional layer, and a tanh activation function layer (tanh). The first two-dimensional convolutional layer is a grouped convolution, the GELu layer is non-linearly activated to smooth the gradient, the second two-dimensional convolutional layer predicts the offset of the sampling point, and the tanh function layer normalizes the offset to [-1,1] to prevent out-of-bounds sampling and outputs the normalized sampling point offset field.

[0077] Secondly, the Deformable Depth-Separable Convolutional Layer (DeformConv2d) performs deformable depth-separable convolution on the input feature map based on the offset field, adaptively capturing the deformation and occlusion features of the input feature map. This layer supports the use of large-size convolutional kernels (such as 21×21) to expand the receptive field.

[0078] Third, the lightweight attention subnetwork sequentially includes an adaptive average pooling layer (AdaptiveAvgPool2d), a second GELu activation function layer (GELu), a third two-dimensional convolutional layer (conv2d), and a Sigmoid activation function layer (Sigmoid). It adjusts the weights of each channel in the deformable and occluded target features obtained from the deformable depthwise separable convolutional layer. Finally, it fuses the features of each channel through 1×1 convolution to obtain mixed features, and combines residual connections to promote gradient flow.

[0079] Step 2-2.3: Use the DSSDConv module in the neck network to replace standard convolutions for downsampling and feature fusion, reducing the model size.

[0080] Step 2-2.4: Apply the multi-task adaptive cross-union ratio (MTAIoU) loss function to the prediction head.

[0081] The multi-task adaptive intersection-union ratio (MTU-Loss) loss function consists of four parts: the improved FocalLoss(L... cls ) is used to solve the classification imbalance problem; regression loss (L box The WIoU loss employing a dynamic non-monotonic focusing mechanism effectively reduces the weight of low-quality occluded samples, improving training stability; the distributed focus loss (L...) dfl This transforms bounding box regression into discrete probability prediction, providing more refined gradient information; and includes thermal infrared feature consistency loss (L... thermal Inspired by contrastive learning, this loss function helps the model learn to ignore interference factors such as occlusion and extract more essential hot features by constraining the deep features of the same batch and category of targets (including occluded targets) to remain similar in the vector space.

[0082] The mathematical expression for the multi-task adaptive intersection-union ratio (CIU) loss function is:

[0083] L IoU =λ cls L cls +λ box L box +λ dfl L dfl +λ thermal L thermal

[0084] In the formula, L IoU L represents the multi-task adaptive intersection-union loss function; cls L box L dfl and L thermalThe improved Focal loss, dynamic non-monotonic focusing mechanism and geometric sensitivity loss, distributed focus loss, and thermal infrared feature consistency loss are represented by weighting coefficients λ. cls , λ box , λ dfl and λ thermal .

[0085] Specifically, the improved FocalLoss (L cls The class imbalance problem is solved by reducing the weight of easily distinguishable samples through a modulation factor.

[0086] Dynamic non-monotonic focusing mechanism and geometrically sensitive loss (WIoU) reduce interference from low-quality samples and improve regression stability;

[0087] Distribution focus loss (L dfl Treating bounding box regression as a classification problem optimizes the localization accuracy of small targets;

[0088] Thermal infrared feature uniformity loss (L thermal This constrains the deep feature similarity of targets of the same category and ignores occlusion interference.

[0089] Furthermore, in step 2-2, the DDM-YOLO detection model consists of three parts: a backbone network, a neck network, and a head network.

[0090] The input wildlife image received by the backbone network is losslessly downsampled at the entry point by a depth-separable spatial-to-depth convolutional downsampling module. Then, the number of channels is expanded through a standard convolutional block to obtain an initial scale feature map. After that, features are extracted by four C2f modules. A depth-separable spatial-to-depth convolutional downsampling module is connected between two adjacent C2f modules to achieve lossless downsampling. The feature maps output by the second, third and fourth C2f modules are output to obtain multi-scale feature maps. Among them, a fast spatial pyramid pooling block is connected after the fourth C2f module, so that the highest scale feature map in the multi-scale feature map is fused with multi-scale semantics. The highest scale feature map fused with multi-scale semantics is enhanced with anti-occlusion feature by a deformable channel attention convolutional module to output the extracted wildlife image features.

[0091] The neck network starts with the highest-scale feature map that integrates multi-scale semantics, adopts the PAN-FPN structure, integrates multi-scale feature maps, and outputs three-scale output feature maps.

[0092] The head network adopts a decoupled head structure, with three detection heads processing the output feature maps at three scales from the neck network respectively, and finally outputting wildlife detection results containing wildlife category, coordinates and confidence information.

[0093] Furthermore, in step 2-2, the lightweight design of the DDM-YOLO detection model also includes: reducing the number of times the C2f module in the backbone network and neck network is repeatedly executed to 2-3 times, reducing the number of channels in each layer, and compressing the number of parameters in the model.

[0094] In steps 2-3, the processed multi-scene dataset of forest wildlife is input into the DDM-YOLO detection model for iterative training until the model converges. Preferably, the training process also includes: using data augmentation techniques (such as random pruning and rotation) to simulate changes in the dense forest environment, inputting test set samples into the trained DDM-YOLO detection model, outputting detection results, and evaluating detection accuracy, speed, and model complexity.

[0095] Optionally, in steps 2-3, the hyperparameters for model training are set as follows: input image size 640×640, batch size 32, number of iterations 300 rounds, initial learning rate 0.01, learning rate dynamically adjusted using a cosine annealing learning rate scheduler, and weight decay coefficient 0.0005.

[0096] After steps 2-3 are completed, the trained DDM-YOLO detection model is converted to ONNX format and deployed to an edge computing device (such as Jetson AGX Xavier). The real-time image is read through the video stream decoding module, and the detection results are output in real time after model inference. Statistical information such as the frequency and location of the target is stored, thus completing the deployment of feature extraction and real-time detection.

[0097] Based on the same technical concept as the foregoing embodiments, this invention provides a method for feature extraction and real-time detection of wildlife images from drones in the event of forest cover obstruction. The overall technical flowchart for the detection is shown below. Figure 4 Specifically, it includes:

[0098] Step 1: Construct the forest understory wildlife dataset SHPanda. The experimental dataset of this invention is a wildlife dataset for forest understory shading scenarios. The data collection device is an M350 drone platform equipped with a DJI H30T thermal infrared payload and a high-definition visible light camera. The target of the data collection is captive giant pandas. A multi-dimensional data collection system was constructed, with flight altitudes finely divided in 40m gradients (60m, 80m, 100m, 120m, 140m, 160m) to adapt to the activity altitude and monitoring resolution requirements of giant pandas. The collection angles cover four key angles: 45°, 60°, 75°, and 90°, while also considering tilt angles. The oblique photography method offers superior scene reproduction compared to the target identification capabilities of vertical overhead photography. It achieves full-time coverage of lighting conditions, accurately pinpointing four typical time periods: early morning (5:00-7:00), noon (11:00-13:00), afternoon (15:00-17:00), and nighttime (19:00-23:00), adapting to target feature capture under varying light intensities. Occlusion levels are graded according to canopy closure (no occlusion: 0%, slight occlusion: 10%-20%, moderate occlusion: 20%-70%, severe occlusion: over 70%). The data collection comprehensively covers the complex scene boundaries of wildlife monitoring, providing high-density, multi-dimensional experimental support for subsequent model generalization verification and technical solution optimization. Blurry and targetless invalid images are subsequently removed, retaining only valid samples containing giant panda targets. The LabelImg tool was used to annotate the bounding boxes and categories of the targets. The annotation format was converted to YOLO format (one .txt file for each image, recording the target category and normalized coordinates). Then, data augmentation operations were performed, including random cropping (0.6-1.0 times), horizontal flipping (probability 0.5), brightness adjustment (±25%), Gaussian blur (3×3 kernel), and occlusion simulation (randomly generated branch and leaf masks, with occlusion area of ​​10%-50%). Finally, the augmented samples were divided into training, validation, and test sets in a 7:2:1 ratio for model training and performance verification.

[0099] Step 2: Using YOLOv8-n (lightweight benchmark version) as the basic model, construct the DDM-YOLO detection model. See the model structure below. Figure 5 .

[0100] The DDM-YOLO detection model consists of three parts: a backbone network, a neck network, and a head network. The data flow is as follows: The backbone network receives a 640×512 input image, performs lossless downsampling using DSSDConv and C2f feature extraction, and outputs feature maps at three scales: P3, P4, and P5. Before the P5 layer output, the feature maps undergo anti-occlusion feature enhancement via a DCAC module. The neck network uses a PAN-FPN structure to fuse multi-scale features. The head network employs a decoupled head structure, ultimately outputting a prediction tensor containing the target class probability and bounding box coordinates.

[0101] 1. Backbone Network: The input is a preprocessed image of 640×512. The image is first losslessly downsampled by the DSSDConv module, and the number of channels is expanded by standard convolutional blocks to obtain the initial scale feature map (P1). Subsequently, it is alternately passed through the C2f module and the DSSDConv module for feature extraction and downsampling. The backbone network finally outputs feature maps of three scales (P3, P4, and P5), with sizes of 80×80, 40×40, and 20×20, respectively. Before the output of the P5 layer, the feature map is fused with multi-scale semantics by the SPPF (Spatial Pyramid Pooling-Fast) module, and then enhanced with anti-occlusion features by the DCAC module to output the extracted wildlife image features.

[0102] 2. Neck Network: Employs a PAN-FPN (Path Aggregation Network-Feature Pyramid Network) structure. It receives the P3, P4, and P5 feature maps output from the backbone network (P5 at this point has already incorporated multi-scale semantics). Through upsampling and lateral connections, it fuses deep semantic information with shallow localization information, ultimately outputting three enhanced feature maps, corresponding to the detection requirements of small targets (80×80), medium targets (40×40), and large targets (20×20), respectively.

[0103] 3. Head Network: A decoupled head structure is adopted. The three scale feature maps output from the neck are fed into three separate detection heads. Within each detection head, the classification task and regression task are separated, and the final output is a tensor containing the category of the wild animal target, the bounding box coordinates, and the confidence score.

[0104] Step 2 includes:

[0105] 2.1: Deploy the DSSDConv module. See the module structure below. Figure 3The DSSDConv module is deployed at the backbone network entry point (after Conv2d) and the second downsampling node, with a scaling factor of 2 and an adaptive padding mode of "reflect". This module first rearranges the input feature map [B,C,H,W] into [B,C×4,H / 2,W / 2] through a "space-to-depth" transformation to achieve lossless downsampling and fully preserve local spatial structure information. Then, it performs spatial filtering through channel-wise convolution and cross-channel feature fusion through point-wise convolution, which greatly reduces the number of parameters and computational complexity. Finally, it introduces a batch normalization layer (momentum 0.937, epsilon=1e-5) to stabilize the training process and uses the Hardswish activation function to enhance nonlinear expression and improve the model's generalization ability. Specifically, the data processing flow of the DSSDConv module is as follows: Assuming the input feature map size is [B,C,H,W], after Space-to-Depth transformation, the output size is [B,4C,H / 2,W / 2], which not only achieves downsampling with half the resolution but also expands the channel dimension by 4 times; then, the number of channels is adjusted through 1×1 pointwise convolution, and the output feature map [B,C] that meets the requirements of the next layer network is obtained. out H / 2, W / 2].

[0106] 2.2: Deploying the DCAC Module; The DCAC module is deployed after the last C2f module in the backbone network. It has 4 grouped convolutional groups and 18 offset field output channels (corresponding to 9 sampling points for a 3×3 convolutional kernel, with 2 coordinate offsets per point). First, a lightweight sub-network consisting of grouped convolutions, the GELU activation function, and 1×1 convolutions generates a normalized sampling point offset field to dynamically guide the convolution sampling position. Second, deformable depthwise separable convolutions are performed based on the offset field, using a 21×21 large-size convolutional kernel to expand the receptive field and adaptively capture deformed and occluded target features. Then, a lightweight Squeeze-and-Excitation sub-network with a compression factor of 16 is used for channel importance recalibration, highlighting key features and suppressing background noise. Finally, features are mixed through 1×1 convolutions, and residual connections in the form of "1×1 convolution + addition" promote gradient flow and ensure training stability. The specific execution flow of the DCAC module is as follows: 1. Input: Receive deep feature maps from the backbone network. 2. Offset Generation: The lightweight subnetwork is based on... Calculate the sampling point offset ΔP, with a size consistent with the spatial resolution of the input feature map; 3. Feature resampling: based on ΔP... Perform deformable convolution to output intermediate features that adapt to the geometry of the occlusion. 4. Attention Weighting: Calculate the channel weight vector in the SE subnet. and with 5. Output: After residual connection fusion, the final enhanced feature is output. The feature map remains the same size but contains richer semantic information about the occluded target, which is used as the final wildlife image feature output.

[0107] 2.3: Configure the MTAIoU loss function; the loss function is composed of improved Focal Loss, dynamic non-monotonic focusing WIoU, distributed focus loss, and thermal infrared feature consistency loss, weighted by a coefficient λ. cls =2、λ box =3、λ dfl =1、λ thermal =0.5 weighted composition; Focal Loss balance factor α=0.25, which reduces the weight of easily distinguishable samples by modulation factor to solve the class imbalance problem; WIoU v3 scale factor is calculated based on the diagonal length of the minimum bounding rectangle to reduce the interference of low-quality occluded samples; distributed focus loss treats bounding box regression as a classification problem to optimize the localization accuracy of small targets; thermal infrared feature consistency loss constrains the deep feature similarity of targets of the same class to help the model ignore occlusion interference.

[0108] 2.4: Detection Head Output and Decoding; The three detection heads of the DDM-YOLO detection model correspond to downsampling rates of 8, 16, and 32 times, respectively. For each scale of feature map grid points, the model output tensor dimension is... ,in, Indicates the number of wildlife categories. This indicates the maximum number of anchor points in the regression. Indicates the feature map height. Indicates the width of the feature map:

[0109] Branching: Output The probability values ​​for each category (in this scenario, for the wildlife category);

[0110] Regression branch: Outputs the distribution of four bounding box parameters (center point coordinates x, y and width and height w, h);

[0111] Before being used to calculate the MTAIoU loss function, the output tensor is decoded to restore the specific bounding box coordinates and then preliminarily screened based on the confidence threshold.

[0112] 2.5: Lightweight Adjustment; The number of times the C2f module in the backbone network is repeatedly executed is uniformly set to 2 times, and the number of channels in each layer is adjusted to Conv1 (3→32), C2f1 (32→64), C2f2 (64→128), C2f3 (128→256), DCAC output (256→256); The number of channels in the neck and detection head are reduced proportionally to further compress the number of model parameters and computational complexity.

[0113] Step 3: Input the processed dataset into the DDM-YOLO detection model and perform iterative training until the network converges.

[0114] The model is initialized using pre-trained weights on the YOLOv8-n dataset, with only the first three layers of the backbone network frozen, while the parameters of the remaining layers are trainable. The training process consists of three stages:

[0115] Warm-up phase (rounds 1-50): The learning rate is linearly increased from 0.001 to 0.01, the batch size is 32, the stochastic gradient descent (SGD) optimizer is used, and the momentum is 0.9;

[0116] Decay phase (rounds 51-250): The learning rate decays from 0.01 to 0.0005 using a cosine annealing strategy, the optimizer is switched to AdamW, and the weight decay coefficient is 0.0005;

[0117] Fine-tuning phase (rounds 251-300): The learning rate is fixed at 0.0001, and only the parameters of the detector head and DCAC and DSSDConv modules are updated to avoid overfitting;

[0118] Every 10 rounds, mAP and inference speed are tested on the validation set. The model with the highest mAP is saved (round 286, validation set mAP=88.7%) and named "DDM-YOLO detection model_best.pt".

[0119] Step 4: Model testing and edge deployment.

[0120] 4.1 Test Environment and Metrics:

[0121] The testing environment was divided into a server-side environment (Intel Core i9-13900K, NVIDIA RTX 4090, 128GB RAM) and an edge device environment (NVIDIA Jetson AGX Xavier, 8-core ARM CPU, 512-core GPU, 32GB RAM, JetPack 5.1.1 system and TensorRT 8.5.2 installed); the test metrics included mean accuracy (mAP@0.5), number of parameters, inference speed (FPS), and model size.

[0122] 4.2 Analysis of Experimental Results:

[0123] Table 1 Ablation experiments based on the SHPanda UAV dataset

[0124]

[0125] As shown in Table 1, in the ablation experiments based on the SHPanda UAV dataset, deploying the DSSDConv module alone reduced the number of parameters by 52.6% and improved FPS by 15.4%; deploying the DCAC module alone improved mAP50 by 8.3%; and using the MTAIoU loss function alone improved mAP50 by 4.7%. The combined performance of the three was the best.

[0126] Table 2 Comparative experiments based on the SHPanda UAV dataset

[0127]

[0128] As shown in Table 2, in the comparative experiment based on the SHPanda UAV dataset, the DDM-YOLO detection model is significantly better than the YOLOv8, FFCA-YOLO and other comparative models in terms of detection accuracy, number of parameters, computational cost and inference speed, demonstrating outstanding overall performance advantages.

[0129] See the comparison of detection results. Figure 6 In unobstructed scenarios, the DDM-YOLO detection model demonstrates superior target recognition confidence, achieving an mAP50 of 0.896, higher than YOLOv8's 0.832. In lightly occluded scenarios, ALSS-YOLO exhibits target misses, while the DDM-YOLO model not only detects targets completely but also achieves more accurate bounding box matching. In moderately occluded scenarios, models such as FFCA-YOLO show recognition errors, while the DDM-YOLO model maintains stable category recognition and localization accuracy. Looking at the performance table, the DDM-YOLO detection model achieves an mAP95 of 0.857, far exceeding other models, while maintaining a parameter count of only 1.274M and a model size of 2.8MB, achieving a better balance between lightweight design and detection accuracy, demonstrating stronger overall performance.

[0130] The implementation of the various embodiments of the present invention is based on programmed processing through a system with processor functionality. Therefore, in practical engineering, the technical solutions and functions of the various embodiments of the present invention are encapsulated into various modules. Based on this reality, and building upon the above embodiments, the embodiments of the present invention provide a UAV wildlife image feature extraction and real-time detection system, which is used to execute a UAV wildlife image feature extraction and real-time detection method from the above method embodiments.

[0131] See Figure 7 The system includes:

[0132] The real-time input module is used to acquire real-time forest understory video containing wild animals taken by a drone; the feature extraction and real-time detection module is used to input the real-time forest understory video stream frames into the trained DDM-YOLO detection model, and output the extracted wild animal image features and the real-time detection results of wild animals, including: the category, coordinates and confidence information of wild animals;

[0133] The training process of the DDM-YOLO detection model includes: constructing a multi-scene dataset of forest wildlife containing thermal infrared and visible light multimodal images; building the DDM-YOLO detection model based on the YOLOv8 framework; the DDM-YOLO detection model integrates a depth-separable spatial-to-depth convolutional downsampling module and a deformable channel attention convolution module, and adopts a multi-task adaptive cross-union loss function. This model processes the input wildlife images and outputs wildlife image features and real-time wildlife detection results; training the DDM-YOLO detection model using the multi-scene dataset of forest wildlife, and outputting the trained model.

[0134] It should be noted that the system embodiments provided by the present invention are used not only to implement the methods in the above method embodiments, but also to implement the methods in other method embodiments provided by the present invention. The only difference is that corresponding functional modules are set. The principle is basically the same as that of the above system embodiments provided by the present invention. As long as those skilled in the art can improve the modules in the above system embodiments by referring to the specific technical solutions in other method embodiments and combining technical features to obtain corresponding technical means and technical solutions composed of these technical means, on the basis of the above system embodiments, and on the premise of ensuring the practicality of the technical solutions, they can obtain corresponding system-like embodiments for implementing the methods in other method-like embodiments.

[0135] The method in this embodiment of the invention is implemented using an electronic device; therefore, it is necessary to introduce the relevant electronic device. For this purpose, embodiments of the present invention provide an electronic device, such as... Figure 8 As shown, the electronic device includes: at least one processor, a communication interface, at least one memory, and a communication bus, wherein the at least one processor, the communication interface, and the at least one memory communicate with each other via the communication bus. The at least one processor invokes logical instructions stored in the at least one memory to execute all or part of the steps of the methods provided in the foregoing method embodiments.

[0136] Furthermore, when the logical instructions in at least one of the aforementioned memories are implemented as software functional units and sold or used as independent products, they are stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, is embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (a personal computer, server, or network device) to execute all or part of the steps of the methods described in the various method embodiments of the present invention. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks—various media for storing program code.

[0137] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, located in one place, or distributed across multiple network units. The purpose of this embodiment is achieved by selecting some or all of the modules according to actual needs. Those skilled in the art will understand and implement this without any inventive effort.

[0138] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0139] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0140] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0141] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0142] Based on the same technical concept as the foregoing embodiments, the present invention provides a non-transitory computer-readable storage medium that stores computer instructions that cause the computer to execute a method for extracting and detecting wildlife images from unmanned aerial vehicles in real time.

[0143] In summary, this invention discloses a method for feature extraction and real-time detection of unmanned aerial vehicle (UAV) wildlife images in forest undergrowth occlusion, relating to the fields of computer vision and ecological monitoring technology. Addressing the challenges of wildlife detection in dense forest environments, such as variable target scale, severe occlusion, complex backgrounds, and limited computing resources on edge devices, this invention proposes a detection method based on the improved DDM-YOLO (Deformable and Depthwise Separation Module YOLO) detection model using the YOLOv8 architecture. This method enhances the representation of occluded target features by embedding a deformable channel attention convolutional module (DCAC) into the backbone network, and employs a depthwise separable spatial-to-depth convolutional downsampling module (DSSDConv) in the neck network to achieve lightweight and fine-grained feature preservation. The training effect is optimized by combining a multi-task adaptive cross-union loss function (MTAIoU) with thermal feature consistency. Experimental results show that the proposed method achieves an 18.15% improvement in mean accuracy (mAP) on publicly available wildlife datasets compared to the benchmark model, while reducing the number of parameters by approximately 74.42%. The inference speed on edge devices meets real-time requirements, satisfying the needs of real-time detection, and can be applied to fields such as forest undergrowth wildlife monitoring and ecological protection.

[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the technical solutions of the embodiments of the present invention.

Claims

1. A method for feature extraction and real-time detection of wildlife images from unmanned aerial vehicles (UAVs), characterized in that, include: Acquire real-time video footage of forest understory containing wildlife, captured by drones; The real-time video stream frames under the forest are input into the trained DDM-YOLO detection model, and the extracted wildlife image features and real-time wildlife detection results are output. The real-time wildlife detection results include: wildlife category, coordinates and confidence information. The training process of the DDM-YOLO detection model includes: Construct a multi-scene dataset of forest wildlife containing thermal infrared and visible light multimodal images; Based on the YOLOv8 framework, a DDM-YOLO detection model is constructed. The DDM-YOLO detection model integrates a depth-separable spatial-to-depth convolutional downsampling module and a deformable channel attention convolution module, and adopts a multi-task adaptive cross-union loss function. This model processes the input wildlife images and outputs wildlife image features and real-time wildlife detection results. The DDM-YOLO detection model was trained using a multi-scene dataset of wild animals in the forest, and the trained model was output.

2. The method for feature extraction and real-time detection of wildlife images from unmanned aerial vehicles as described in claim 1, characterized in that, The steps for constructing the DDM-YOLO detection model based on the YOLOv8 framework include: The DSSDConv module is used to replace stride convolution at the entry point and downsampling point of the backbone network; A deformable channel attention convolution module is embedded at the end of the backbone network; The DSSDConv module is used in the neck network to replace the standard convolution for downsampling and feature fusion, reducing the model size and optimizing the number of repetitions and channels of the C2f module to reduce computational complexity. A multi-task adaptive cross-union loss function is used to predict the head.

3. The method for feature extraction and real-time detection of wildlife images from unmanned aerial vehicles as described in claim 2, characterized in that, The DDM-YOLO detection model consists of three parts: a backbone network, a neck network, and a head network. The input wildlife image received by the backbone network is losslessly downsampled at the entry point by a depth-separable spatial-to-depth convolutional downsampling module. Then, the number of channels is expanded through a standard convolutional block to obtain an initial scale feature map. After that, features are extracted by four C2f modules. A depth-separable spatial-to-depth convolutional downsampling module is connected between two adjacent C2f modules to achieve lossless downsampling. The feature maps output by the second, third and fourth C2f modules are output to obtain multi-scale feature maps. Among them, a fast spatial pyramid pooling block is connected after the fourth C2f module, so that the highest scale feature map in the multi-scale feature map is fused with multi-scale semantics. The highest scale feature map fused with multi-scale semantics is enhanced with anti-occlusion feature by a deformable channel attention convolutional module to output the extracted wildlife image features. The neck network starts with the highest-scale feature map that integrates multi-scale semantics, adopts the PAN-FPN structure, integrates multi-scale feature maps, and outputs three-scale output feature maps. The head network adopts a decoupled head structure, with three detection heads processing the output feature maps at three scales from the neck network respectively, and finally outputting wildlife detection results containing wildlife category, coordinates and confidence information.

4. The method for feature extraction and real-time detection of wildlife images by unmanned aerial vehicles as described in claim 1, characterized in that, The deformable channel attention convolution module uses residual connections as its skeleton and processes the feature map input to the deformable channel attention convolution module through an offset generation sub-network consisting of grouped convolutions, GELU activation functions, and 1×1 convolutions to generate a normalized sampling point offset field. The deformable depthwise separable convolution layer performs deformable depthwise separable convolution on the input feature map based on the sampling point offset field to extract the deformation and occlusion target features of the input feature map. The lightweight attention subnetwork sequentially processes deformation and occlusion target features through adaptive average pooling layers, GELu activation function layers, two-dimensional convolutional layers, and Sigmoid activation function layers, performs channel importance recalibration, and finally processes them through convolutional layers to obtain mixed features. Residual connections are then introduced to generate the final wildlife image features.

5. The method for extracting and real-time detecting wildlife images from unmanned aerial vehicles as described in claim 1, characterized in that, The mathematical expression of the multi-task adaptive intersection-union ratio loss function is as follows: L IoU =λ cls L cls +λ box L box +λ dfl L dfl +λ thermal L thermal; In the formula, L IoU L represents the multi-task adaptive intersection-union loss function; cls L box L dfl and L thermal The improved Focal loss, dynamic non-monotonic focusing mechanism and geometric sensitivity loss, distributed focus loss, and thermal infrared feature consistency loss are represented by weighting coefficients λ. cls , λ box , λ dfl and λ thermal .

6. The method for feature extraction and real-time detection of wildlife images by unmanned aerial vehicles as described in claim 1, characterized in that, The structure and workflow of the depth-separable spatial-to-depth convolutional downsampling module include: By employing a space-to-depth transformation, the feature map [B, C, H, W] of the input depth-separable space-to-depth convolutional downsampling module is rearranged into [B, C×4, H / 2, W / 2] to form a high-dimensional feature map, preserving local spatial structure information and achieving lossless downsampling. By employing depthwise separable convolution, channel-wise convolution is sequentially performed on the high-dimensional feature map, followed by spatial filtering and pointwise convolution, to achieve cross-channel feature fusion and obtain lossless downsampling results of the input feature map.

7. The method for feature extraction and real-time detection of wildlife images from unmanned aerial vehicles as described in claim 1, characterized in that, The lightweight design of the DDM-YOLO detection model also includes: reducing the number of times the C2f module in the backbone network and neck network is executed repeatedly to 2-3 times, reducing the number of channels in each layer, and compressing the number of model parameters.

8. A system for extracting and detecting wildlife images from unmanned aerial vehicles (UAVs) in real time, characterized in that, include: The real-time input module is used to acquire real-time video of the forest understory containing wild animals, captured by a drone. The feature extraction and real-time detection module is used to input real-time video stream frames from the forest floor into the trained DDM-YOLO detection model, and output the extracted wildlife image features and real-time wildlife detection results. The real-time wildlife detection results include: wildlife category, coordinates, and confidence information. The training process of the DDM-YOLO detection model includes: Construct a multi-scene dataset of forest wildlife containing thermal infrared and visible light multimodal images; Based on the YOLOv8 framework, a DDM-YOLO detection model is constructed. The DDM-YOLO detection model integrates a depth-separable spatial-to-depth convolutional downsampling module and a deformable channel attention convolution module, and adopts a multi-task adaptive cross-union loss function. This model processes the input wildlife images and outputs wildlife image features and real-time wildlife detection results. The DDM-YOLO detection model was trained using a multi-scene dataset of wild animals in the forest, and the trained model was output.

9. An electronic device, characterized in that, The method includes a memory and a processor, the memory storing program instructions that are executed by the processor, the processor invoking the program instructions to perform the method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer instructions that cause the computer to perform the method described in any one of claims 1 to 7.