Unmanned aerial vehicle obstacle avoidance method and system based on compact causal features, and storage medium
By decomposing environmental image features into domain-invariant and domain-specific features, and combining channel gating parameter filtering and redundancy compression, compact causal features are constructed for UAV obstacle avoidance. This solves the problems of unstable obstacle avoidance strategies and poor generalization ability in existing technologies, and achieves more efficient and stable obstacle avoidance decisions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-11
- Publication Date
- 2026-07-14
AI Technical Summary
Existing UAV obstacle avoidance methods have poor generalization ability and robustness in complex environments, and high feature redundancy, which makes the obstacle avoidance strategy susceptible to environmental domain differences and the decision-making unstable.
By extracting latent visual features from environmental images, decomposing them into domain-invariant features and domain-specific features, constructing causal features, and using trainable channel gating parameters to generate differentiable binary masks for channel-level filtering and redundancy compression, the results are input into the SAC framework for obstacle avoidance decision-making.
It improves the generalization ability and obstacle avoidance robustness of UAVs in unknown scenarios, enhances the accuracy and real-time performance of obstacle avoidance decisions, and meets the real-time deployment requirements of airborne platforms.
Smart Images

Figure CN122387145A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of unmanned aerial vehicles (UAVs) and machine learning technology, and in particular to a UAV obstacle avoidance method, system, and storage medium based on compact causal features. Background Technology
[0002] Obstacle avoidance for drones has become a core research topic in robotics and artificial intelligence, with widespread applications in precision agriculture, search and rescue operations, mining, and infrastructure inspection. In these fields, the stable execution of obstacle avoidance tasks by drone systems is crucial, ensuring that each drone can safely navigate from its starting point to its intended target location. However, the real-world environment is complex, dynamic, and unpredictable; any subtle error in perception or decision-making can trigger a cascading failure, leading to mission failure, property damage, or even threats to human safety. Therefore, obstacle avoidance for drones is not only a technological challenge but also a critical safety issue in the deployment of autonomous drones.
[0003] Over the past two decades, researchers have devoted considerable effort to developing effective obstacle avoidance algorithms. Traditional methods are primarily based on hand-designed rules or modular designs integrating perception, planning, and control. While these methods achieve good performance in structured environments, they often lead to overly complex systems with strong parameter sensitivity and limited scalability. In contrast, Deep Reinforcement Learning (DRL) provides an end-to-end framework that can directly learn control and decision-making policies from high-dimensional perceptual inputs. Through large-scale environmental interactions, DRL enables UAVs to autonomously learn adaptive behaviors in varied obstacle environments. Therefore, DRL-based navigation and obstacle avoidance methods have become a key technology for improving the robustness, adaptability, and safety of UAV systems in complex and unseen environments. Despite the success of DRL methods, these methods are inherently data-driven and often rely on the assumption that training and testing environments have similar distributions. However, this assumption often fails in real-world applications. Policies trained through simulation or limited environments often lead to a significant decline in UAV obstacle avoidance performance when deployed in real-world environments with different visual features, dynamic changes, and obstacle configurations.
[0004] In the process of realizing this invention, the inventors discovered at least the following problems in the prior art: 1. Existing UAV autonomous obstacle avoidance methods mostly extract raw visual features directly from environmental images for obstacle avoidance navigation decisions without performing causal feature construction processing on the features. This results in the extracted visual features being mixed with a large amount of domain offset information that is not related to obstacle avoidance navigation decisions, such as lighting changes, scene textures, shooting angles and other interfering factors. This makes the obstacle avoidance strategy susceptible to environmental domain differences, resulting in poor generalization ability and robustness.
[0005] 2. Traditional policy networks directly use high-dimensional original features for training and decision-making. These features contain a large number of redundant channels that do not contribute to the obstacle avoidance task or even interfere with it. The feature representation has high redundancy and insufficient compactness, which reduces the efficiency of policy learning and decision response speed, and is also prone to decision fluctuations.
[0006] 3. Existing reinforcement learning obstacle avoidance methods lack an adaptive filtering mechanism for feature channels, and cannot automatically suppress redundant information and retain key decision features based on task contribution. Due to feature redundancy and domain interference, problems such as inconsistent obstacle avoidance and unstable decision-making are prone to occur. Summary of the Invention
[0007] The purpose of this invention is to provide a method, system, and storage medium for obstacle avoidance in unmanned aerial vehicles (UAVs) based on compact causal characteristics, in order to solve the technical problems of unstable obstacle avoidance decisions and poor generalization in existing technologies. The various technical effects of the preferred solutions among the many technical solutions provided by this invention are detailed below.
[0008] To achieve the above objectives, the present invention provides the following technical solution: In a first aspect, the present invention provides an obstacle avoidance method for unmanned aerial vehicles (UAVs) based on compact causal features, comprising: Acquire environmental images, current flight speed, and target location information perceived by the UAV; Extract the latent visual features of the environmental image, and decompose the latent visual features into domain-invariant features and domain-specific features based on the cross-scene consistency of the latent visual features. Construct causal features for obstacle avoidance decision based on the domain-invariant features. The causal features are fused with the current flight speed and target location information of the UAV to obtain fused causal input features; Based on the trainable channel gating parameters, a corresponding differentiable binary mask is generated, and the fused causal input features are subjected to channel-level filtering and redundancy compression based on the differentiable binary mask to generate compact causal features. The trainable channel gating parameters are jointly updated through backpropagation according to the optimization objective of the reinforcement learning strategy. The compact causal features are input into the SAC framework, and the obstacle avoidance navigation control actions of the UAV are output through the policy network of the SAC framework to complete the obstacle avoidance navigation decision of the UAV.
[0009] In the description of the embodiments of this application, "cross-scene consistency" refers to the ability of the same type of visual features to maintain a relatively stable statistical distribution and semantic correspondence in the latent feature space under different environmental scenarios (such as different lighting conditions, weather conditions, geographical locations, sensor types or surface materials), that is, the latent visual features maintain stable and transferable attributes under different scenarios.
[0010] Preferably, constructing causal features for obstacle avoidance decision based on the domain-invariant features includes: clustering the domain-invariant features in the feature space to obtain the causal features; The domain-specific features are then identified as non-causal features.
[0011] Preferably, the step of generating a corresponding differentiable binary mask based on trainable channel gating parameters, and performing channel-level filtering and redundancy compression on the fused causal input features based on the differentiable binary mask to generate compact causal features includes: Based on the trainable channel gating parameters, trainable weights are assigned to each feature channel of the fused causal input features; The trainable weights are converted into differentiable binary masks using a multilayer perceptron and a ReLU activation function. The differentiable binary mask is multiplied element-wise with the fused causal input features to obtain the gating filtering results for each feature channel; Based on the gating and filtering results of each feature channel, the task-related feature channel is activated and the task-irrelevant feature channel is deactivated, thereby generating the compact causal feature.
[0012] Preferably, the expression for converting the trainable weights into a differentiable binary mask using a multilayer perceptron and the ReLU activation function is as follows: = ReLU(MLP( )) m = in, For trainable weights, Here, m is an intermediate parameter, m is a differentiable binary mask, ReLU() is the ReLU activation function, and MLP() is a multilayer perceptron. It is a numerically stable term.
[0013] Preferably, during the training phase, the process of constructing the causal features is trained using a variational autoencoder, and the loss function during the training process of constructing the causal features is defined as: in, This represents the approximate posterior distribution of the variational autoencoder output; This represents the network parameters of the variational autoencoder; Represents potential visual training features; This indicates the input training data; Used to measure how close the reconstruction result is to the input training data; Denotes KL divergence, The prior distribution representing the latent visual training features; This indicates that the distribution of latent visual training features obtained from the variational autoencoder is compared with the prior distribution.
[0014] Preferably, the trainable channel gating parameters are jointly updated via backpropagation based on the reinforcement learning strategy optimization objective, including: The generation process of differentiable binary masks is optimized by using the loss function of the policy network of the SAC framework as a supervision signal. The causal input features are fed into the policy network to participate in the output of obstacle avoidance navigation control actions. The gradient is backpropagated through the loss function of the policy network to update the trainable channel gating parameters.
[0015] Preferably, the SAC framework includes a policy network and a value network; The loss function of the policy network is: in, This indicates that the observation condition o follows a distribution. B The mathematical expectation, B This represents the experience replay pool of historical obstacle avoidance samples of the aforementioned UAV. This represents the target action distribution obtained by exponential transformation of the Q-value function. This represents the probability distribution of the policy network's output for all possible obstacle avoidance actions of the UAV under observation condition o. Indicates KL divergence; The loss function of the value network is: in, This represents the Q-value estimate for performing action a under the current observation o. Indicates an immediate reward. Indicates the observation at the next moment. Indicates the discount factor. This represents the expected long-term return that can be obtained under subsequent strategies starting from the next state.
[0016] Preferably, during the training phase of the method, L1 regularized sparsity constraints are also applied to the differentiable binary mask.
[0017] In a second aspect, the present invention also provides a drone obstacle avoidance system based on compact causal features for performing the method as described in the first aspect, comprising: The information perception module is used to acquire environmental images, current flight speed, and target location information perceived by the UAV. The causal feature construction module is used to extract the latent visual features of the environmental image, and decompose the latent visual features into domain-invariant features and domain-specific features based on the cross-scene consistency of the latent visual features, and construct causal features for obstacle avoidance decision based on the domain-invariant features. The fusion module is used to fuse the causal features with the current flight speed and target position information to obtain fused causal input features; A redundancy compression module is used to generate a differentiable binary mask based on trainable channel gating parameters, and to perform channel-level filtering and redundancy compression on the fused causal input features based on the differentiable binary mask to generate compact causal features. The obstacle avoidance and navigation decision module is used to input the compact causal features into the SAC framework and output the obstacle avoidance and navigation control actions of the UAV through the policy network of the SAC framework to complete the obstacle avoidance and navigation decision of the UAV.
[0018] In a third aspect, the present invention also provides a computer-readable storage medium storing a computer program that, when executed, implements the UAV obstacle avoidance method based on compact causal features as described in the first aspect.
[0019] Implementing one of the above-described technical solutions of the present invention has the following advantages or beneficial effects: 1. Based on the cross-scene consistency of the latent visual features of environmental images, this invention decomposes the latent visual features into domain-invariant features and domain-specific features, and constructs causal features for obstacle avoidance navigation decisions based on the domain-invariant features. This effectively reduces the interference of domain-specific factors such as environmental background, lighting changes and scene differences on obstacle avoidance decisions, and improves the generalization ability and obstacle avoidance robustness of UAVs in unknown scenes and complex environments. 2. This invention utilizes trainable channel gating parameters to generate differentiable binary masks, performs channel-level filtering and redundancy compression on fused causal input features, adaptively retains key feature channels related to the obstacle avoidance task and suppresses redundant information, thereby improving the accuracy of obstacle avoidance decisions and the efficiency of model inference while reducing feature dimensions and computational complexity. 3. This invention inputs compact causal features into the SAC framework for obstacle avoidance navigation decision-making, and jointly updates the trainable channel gating parameters according to the reinforcement learning strategy optimization objective. This enables the causal feature construction, redundancy compression, and strategy learning processes to be mutually optimized. It can automatically learn obstacle avoidance strategies to adapt to complex environments without the need for manual design of feature selection rules, further improving the real-time performance, stability, and adaptability of UAV obstacle avoidance navigation, while meeting the real-time deployment requirements of UAV airborne platforms. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings: Figure 1 This is a flowchart of an unmanned aerial vehicle obstacle avoidance method based on compact causal features according to an embodiment of the present invention; Figure 2 This is a diagram of the UAV obstacle avoidance learning framework based on compact causal features according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the causal feature construction process based on cross-scenario consistency in an embodiment of the present invention; Figure 4 This is a schematic diagram of the compact causal feature generation process according to an embodiment of the present invention; Figure 5 This is a schematic diagram of a drone obstacle avoidance simulation environment that supports causal intervention according to an embodiment of the present invention; Among them, (a) is the original simulation environment diagram, (b) is the simulation environment diagram with obstacles added to (a), (c) is the simulation environment diagram with the shape of obstacles changed on (b), and (d) is the simulation environment diagram with the background changed on (c). Figure 6 This is a schematic diagram of a simulation scenario during the model training phase of an embodiment of the present invention; (a) is a schematic diagram of a spherical obstacle in the playground scene used in the training phase, and (b) is a cube obstacle in the forest scene used in the training phase. Figure 7 This is a schematic diagram of a forest simulation scenario during the model testing phase of an embodiment of the present invention; Among them, (a) is a bird's-eye view of the forest scene, and (b) is a first-person view of the forest scene from a drone. Figure 8 This is a schematic diagram of a canyon scene simulation during the model testing phase of an embodiment of the present invention; Among them, (a) is a bird's-eye view of the canyon scene, and (b) is a first-person view of the canyon scene from a drone. Figure 9 This is a schematic diagram of a snow mountain scene simulation during the model testing phase of an embodiment of the present invention; Among them, (a) is a bird's-eye view of the snow mountain scene, and (b) is a first-person view of the snow mountain scene from a drone. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the present invention clearer, various exemplary embodiments described below will be referenced to the accompanying drawings, which form part of the exemplary embodiments, illustrating various exemplary embodiments that may be used to implement the present invention. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. It should be understood that they are merely examples of processes, methods, and apparatuses consistent with some aspects of the present invention disclosed as detailed in the appended claims. Other embodiments may be used, or structural and functional modifications may be made to the embodiments listed herein without departing from the scope and spirit of the present invention.
[0022] To illustrate the technical solution described in this invention, specific embodiments are described below, showing only the parts related to the embodiments of this invention.
[0023] Example 1: like Figure 1 As shown, this invention provides a drone obstacle avoidance method based on compact causal features, comprising: S1. Acquire environmental images, current flight speed, and target location information perceived by the UAV; S2. Extract the latent visual features of the environmental image, and decompose the latent visual features into domain-invariant features and domain-specific features based on the cross-scene consistency of the latent visual features, and construct causal features for obstacle avoidance decision based on the domain-invariant features. S3. The causal features are fused with the current flight speed and target position information of the UAV to obtain fused causal input features; S4. Generate a corresponding differentiable binary mask based on the trainable channel gating parameters, and perform channel-level filtering and redundancy compression on the fused causal input features based on the differentiable binary mask to generate compact causal features. The trainable channel gating parameters are jointly updated through backpropagation based on the reinforcement learning strategy optimization objective. S5. Input the compact causal features into the SAC framework, and output the obstacle avoidance navigation control actions of the UAV through the policy network of the SAC framework to complete the obstacle avoidance navigation decision of the UAV.
[0024] This invention combines cross-scene consistent causal feature construction with redundancy compression to decompose the latent visual features of the input environment image, obtaining domain-invariant and domain-specific features. Based on these domain-invariant features, causal features for obstacle avoidance navigation decisions are constructed, thereby reducing the influence of non-causal factors such as scene background, illumination changes, and environmental differences on the decision-making process. Furthermore, a differentiable binary mask is generated based on trainable channel gating parameters to perform channel-level filtering and redundancy compression on the fused causal input features. This selectively activates feature channels relevant to the obstacle avoidance task and suppresses redundant features, resulting in a more compact causal representation. This improves the reliability, generalization ability, and real-time decision-making performance of UAVs in obstacle avoidance navigation under different environments.
[0025] As an optional implementation, in step S2, constructing causal features for obstacle avoidance decision based on the domain-invariant features includes: The domain-invariant features are clustered in the feature space, and the clustered domain-invariant features are used as the causal features. The domain-specific features are then identified as non-causal features.
[0026] In the description of the embodiments of this application, the domain-invariant features refer to the potential visual features extracted from the UAV environmental images that have cross-domain shared attributes and characterize the semantics of obstacle avoidance navigation decisions. They reflect the core causal features that are strongly correlated with UAV obstacle avoidance decisions and are not affected by changes in the environmental domain, rather than domain-specific interference information, including but not limited to decision-related visual features that are universally applicable across domains, such as obstacle spatial location, relative distance, and traversable area boundaries. Regardless of changes in non-decision factors such as background, lighting, and obstacle appearance in the environmental domain, these features are shared across domains, remain stable, and are not visual representations specific to a single domain, and continuously characterize the semantics of obstacle avoidance navigation decisions.
[0027] The obstacle avoidance navigation decision semantics refers to the task semantic information that is causally related to the UAV obstacle avoidance navigation task and can determine the UAV obstacle avoidance control action selection; it reflects the causal scene information that has a substantial impact on obstacle avoidance decision, rather than the visual features of the environmental surface, including but not limited to the spatial pose of obstacles, the range of passable areas, the relative orientation of targets and other scene information that affects obstacle avoidance planning, as well as the semantics of various obstacle avoidance-related UAV control actions.
[0028] In the description of the embodiments of this application, the domain-specific features refer to potential visual features extracted from UAV environmental images that are unique to a single scene domain, do not possess cross-domain sharing attributes, and do not characterize obstacle avoidance navigation decision semantics. They reflect visual appearances and environmental interference information unique to a single scene domain, rather than causal information related to obstacle avoidance decisions. Specifically, they include, but are not limited to, non-decision interference features unique to a single domain, such as scene background texture, ambient light intensity, obstacle color and appearance, and shooting angle distortion. Regardless of how such features are presented in a single domain, as long as they are unique to a specific domain, do not share across domains, and have no causal relationship with obstacle avoidance navigation decisions, they all fall within the scope of domain-specific features described in this application. The domain-specific features do not participate in strategy input during the obstacle avoidance decision process.
[0029] The non-causal features are used together with the causal features to reconstruct the image, and the reconstructed image is used to evaluate the information integrity of the decoupled features.
[0030] Preferably, step S4 generates a corresponding differentiable binary mask based on the trainable channel gating parameters, and performs channel-level filtering and redundancy compression on the fused causal input features based on the differentiable binary mask to generate compact causal features, including: S401. Assign trainable weights to each feature channel of the fused causal input features according to the trainable channel gating parameters; S402. The trainable weights are converted into differentiable binary masks using a multi-layer perceptron (MLP) and a ReLU activation function. S403. Multiply the differentiable binary mask element-wise with the fused causal input features to obtain the gating filtering results for each feature channel; S404. Based on the gating and filtering results of each feature channel, activate the task-related feature channel and deactivate the task-irrelevant feature channel, thereby generating the compact causal feature.
[0031] After obtaining the gating and filtering results of each feature channel, the feature channel with a mask value of 1 is activated, and the feature channel with a mask value of 0 is deactivated.
[0032] S402 includes: for fusing causal input features Z π We assign it a trainable weight. R, the corresponding mask m is determined as follows: = ReLU(MLP( )) m = in, For trainable weights, Here, m is an intermediate parameter, m is a differentiable binary mask, ReLU() is the ReLU activation function, and MLP() is a multilayer perceptron. This is a numerically stable term, a very small positive number used to ensure the denominator is not zero. For each channel, when... When the value is 0, the value of mask m is 0; otherwise, the value of mask m is 1, because Minimal. This process will make the weights trainable. It is converted into a differentiable binary mask m, eliminating the need for manual threshold design.
[0033] This embodiment is merely a special case and does not indicate that this is the only way to implement the present invention.
[0034] Example 2: This embodiment is used to demonstrate the training process of the method described in Embodiment 1, such as... Figure 2 As shown in the figure, this embodiment demonstrates a compact causal feature learning framework. In this framework, speed represents the current speed information of the UAV, and its role is to supplement visual features. Images alone cannot fully reflect the current motion state, so speed information is needed to assist decision-making. The target can generally be understood as the target direction, relative position, or target distance, and its role is to tell the policy where to fly. The role of the linear layer is to project the fused state features onto the value evaluation branch and the policy generation branch, respectively. This represents the input characteristics of the value network, and its function is to serve as input to the value network for value assessment. This indicates the fusion of causal input features, which serve as input to the policy network to generate action policies. This represents the loss function of the value network, which is used to train the value network so that its output value estimate is closer to the true return target. This represents the loss function of the policy network, which is used to train the network and make the policy more inclined to choose high-value actions. Image reconstruction uses... As the total loss for representation learning; Responsible for reconstructing and regularizing potential visual training features; Responsible for causal comparison learning; These are the weighting coefficients.
[0035] During the training phase, the process of constructing the causal features is trained using a Variational Auto-Encoder (VAE), and the loss function used in the training process for constructing the causal features is... Defined as: in, This represents the approximate posterior distribution of the variational autoencoder output; This represents the network parameters of the variational autoencoder; Represents potential visual training features; This indicates the input training data; Used to measure how close the reconstruction result is to the input training data; This represents the KL divergence (Kullback-Leibler Divergence). The prior distribution representing the latent visual training features; This indicates that the distribution of latent visual training features obtained from the variational autoencoder is compared with the prior distribution.
[0036] Specifically, such as Figure 3 As shown, in the process of constructing causal features, latent representations are first extracted from the input images using a variational autoencoder, and then positive and negative sample pairs are constructed within a contrastive learning framework. Specifically, positive sample pairs consist of images with the same latent causal semantics, while negative sample pairs consist of images with different latent causal semantics.
[0037] Positive and negative sample pairs are not automatically clustered through an independent semantic classification network, but are constructed using a simulation environment that supports scene-level causal intervention according to the principle of controlled variables. While keeping the UAV's pose and physical state unchanged, intervention is only applied to the appearance of the background or obstacles. If two images, although visually different, do not change the UAV's essential obstacle avoidance decision, they are determined to have the same underlying causal semantics and constitute a positive sample pair. If interventions such as adding or removing obstacles, or changing the relative spatial relationships of obstacles, cause a change in the optimal obstacle avoidance decision, they are determined to not have the same underlying causal semantics and constitute a negative sample pair.
[0038] It should be noted that the latent causal semantics described in this application refer to the hidden task semantics in the input image that can truly determine the obstacle avoidance actions of the UAV. It reflects scene information that is causally related to the obstacle avoidance decision, rather than the surface visual appearance of the image. Specifically, while keeping the UAV pose, target state, and other environmental conditions unchanged, if a change in the image does not lead to a change in the obstacle avoidance decision, then the change corresponds to non-causal semantics; if a change in the image leads to a change in the obstacle avoidance decision, then the change corresponds to causal semantics. Therefore, images with the same obstacle avoidance decision meaning can be considered to have the same latent causal semantics.
[0039] For example, such as Figure 6As shown, spherical obstacles in a playground environment and cubic obstacles in a forest environment, despite differences in obstacle shape or background, do not affect the obstacle avoidance strategy. Therefore, their features should remain similar to ensure consistent actions output by the downstream policy network, thereby achieving decoupling of non-causal features. Negative sample pairs consist of unobstructed playground images and playground images containing spherical obstacles, as the presence or absence of obstacles directly affects the UAV's decision-making.
[0040] Preferably, during training, a contrastive learning loss can also be applied to the domain-invariant features. To enhance causal consistency, variational autoencoding loss is applied to both types of features. To maintain the fidelity of the input image, the overall optimization objective is defined as: Among them, for Figure 6 In the scenario shown, the specific form of HCL loss is: in, These represent causal features from images of an accessible playground, forest cube obstacles, and playground spherical obstacles, respectively.
[0041] While causal features can effectively remove domain offset interference, they may still contain redundant information irrelevant to the task. These redundant components introduce noise and increase representation complexity, thereby weakening the model's generalization ability. Therefore, this invention also introduces, for example... Figure 4 The redundancy compression module shown is used to adaptively remove redundant features to obtain a more compact causal representation. The redundancy compression module focuses on filtering redundant information within the causal features, thus eliminating the need for additional multi-level consistency constraints.
[0042] Specifically, the redundancy compression module is embedded in the policy network of the SAC framework (Soft Actor-Critic, SAC), i.e. Figure 2 The first and second redundant compression modules shown herein, after embedding the redundant compression module into the policy network, undergo end-to-end training to ensure that the module can truly achieve the goal of preserving task-related information and suppressing redundant information. The training process includes: The trainable channel gating parameters are jointly updated via backpropagation based on the reinforcement learning strategy optimization objective, specifically as follows: The generation process of differentiable binary masks is optimized by using the loss function of the policy network of the SAC framework as a supervision signal. The causal input features are fed into the policy network to participate in the output of obstacle avoidance navigation control actions. The gradient is backpropagated through the loss function of the policy network to update the trainable channel gating parameters.
[0043] During training, the trainable channel gating parameters are jointly updated based on the optimization objective of the policy network. When a feature channel contains information that is beneficial for the UAV to complete obstacle avoidance and navigation decisions, retaining that feature channel can improve the control actions output by the policy network, thereby reducing the loss function value of the policy network. Therefore, the corresponding channel gating parameters tend to increase during gradient optimization, making the generated differentiable binary mask more inclined to activate that feature channel.
[0044] Conversely, when a certain feature channel contributes little to obstacle avoidance navigation decision-making or contains redundant information unrelated to the task, retaining that feature channel cannot effectively reduce the policy network loss and may even interfere with policy learning. Therefore, the corresponding channel gating parameter tends to decrease during the optimization process, causing the generated differentiable binary mask to gradually suppress that feature channel.
[0045] Furthermore, when a differentiable binary mask incorrectly masks feature channels that are crucial for obstacle avoidance and navigation decisions, the loss function of the policy network will increase, and the gradient will be passed to the channel gating parameters through backpropagation to correct the generation result of the corresponding mask. Conversely, for feature channels with low relevance to the task, their corresponding gating parameters will gradually weaken during continuous optimization. Through the above joint optimization mechanism, the trainable channel gating parameters can adaptively adjust according to the optimization objective of the reinforcement learning policy, achieving channel-level screening and redundancy compression of fused causal input features. Ultimately, it retains key feature channels closely related to the obstacle avoidance and navigation task, suppresses irrelevant or redundant feature channels, and generates a more compact causal feature representation.
[0046] The SAC framework is as follows Figure 2 As shown, the SAC framework includes a policy network and a value network; The loss function of the policy network is: in, This indicates that the observation condition o follows a distribution. B The mathematical expectation, B This represents the experience replay pool of historical obstacle avoidance samples of the aforementioned UAV. This represents the target action distribution obtained by exponential transformation of the Q-value function. This represents the probability distribution of the policy network's output for all possible obstacle avoidance actions of the UAV under observation condition o. Indicates KL divergence; The loss function of the value network is: in, This represents the Q-value estimate for performing action a under the current observation o. Indicates an immediate reward. Indicates the observation at the next moment. Indicates the discount factor. This represents the expected long-term return that can be obtained under subsequent strategies starting from the next state.
[0047] Building upon this foundation, to further enhance the compactness of the representation, this invention introduces an L1 regularization term into the training objective, imposing a sparsity constraint on the differentiable binary mask. This constraint compels the model to minimize the number of activated feature channels while meeting obstacle avoidance performance requirements, thereby compressing redundant features, reducing interference from irrelevant information, and ultimately obtaining a more compact and generalizable causal representation.
[0048] Example 3: like Figure 5-9 As shown, this embodiment uses Unreal Engine combined with the AirSim simulator to build multiple training and testing simulation environments. The designed simulation environments can realistically reproduce drone flight scenarios, including typical scenes such as playgrounds, forests, canyons, and snow-capped mountains, to illustrate the training process and testing effects of the drone obstacle avoidance method described in this invention.
[0049] Performance evaluation metrics include: Group Success Rate (SSR): The percentage of drone swarms that successfully reach their target point; Individual Success Rate (ISR): The percentage of a single drone that successfully reaches its target within a specified time without collision; Success weighted by path length (SPL): Whether the drone successfully reaches the target via the shortest path; Extra Distance: refers to the average relative increase in distance compared to the shortest feasible path, used to measure the optimality of the path and navigation efficiency; Average speed: refers to the average flight speed of a drone during a successful mission, used to assess the trade-off between navigation efficiency and safety.
[0050] The most basic, such as Figure 5As shown, a notable feature of this environment is its support for scene-level causal intervention. Specifically, it allows for the modification of a single element in the scene (such as obstacle shape or environmental background) while keeping other factors completely unchanged, thereby enabling direct analysis of the causal impact of that specific element on the drone's perception and policy learning.
[0051] Based on this, the present invention also conducted the following tests: During the testing phase, the model retains only the modules directly related to decision-making and reasoning: the variational autoencoder, the causal feature construction module, the redundancy compression module, and the policy network. The reconstruction branch and loss calculations used during training are no longer involved. The specific process is as follows: First, the current environment image is input into the variational autoencoder to extract latent visual representations. Then, the causal feature construction module separates causal features related to the obstacle avoidance task. Next, the redundancy compression module performs channel filtering and compression on the causal features to obtain compact causal features. Finally, this representation, along with velocity and target information, is input into the policy network to output the control action at the current moment, thereby guiding the UAV to complete real-time obstacle avoidance and target navigation. By retaining only the aforementioned key reasoning modules, robust decision-making in unknown scenarios can be achieved with relatively low computational overhead during the testing phase.
[0052] Performance comparison of different methods: such as Figure 6 and Figure 7 As shown, the UAV was trained in a playground scenario with varying obstacle shapes and backgrounds, and tested in a forest scenario with multiple unknown obstacles. Table 1 shows that the method described in this invention (CCFL) is compared with existing similar methods, achieving improvements of 61.6%, 42%, and 35.9% in SSR, ISR, and SPL respectively compared to the SAC+RAE method, and also demonstrating superior path planning quality. Although the CCFL method plans slightly longer and slower flight paths, this reflects the UAV performing more obstacle avoidance maneuvers to improve the success rate.
[0053] Table 1. Comparison of CCFL method with other methods in forest and playground scenarios. Background Comparison: To further evaluate the generalization ability of the proposed method, such as... Figure 8 and Figure 9 As shown, two additional unknown environments were designed, named Snow Mountain and Canyon respectively. As shown in Table 2, both environments use the same obstacle configuration as the Forest scene to ensure consistent evaluation conditions.
[0054] Table 2 Test results for forest, snow mountain, and canyon scenes. The results show that CCFL outperforms SAC+RAE on all metrics, with significant improvements in SSR and ISR, demonstrating its strong effectiveness and robustness in unseen environments.
[0055] Ablation Experiments: To verify the role of different representation modules in the CCFL method, ablation experiments were conducted to test the impact of different module combinations on model performance. The experimental results are shown in Table 3. Table 3. Comparison of ablation methods for each module It is evident that removing any module leads to a significant decrease in the performance of both SSR and ISR. When the two modules are integrated, the model achieves the highest performance, confirming that the causal feature building module and the redundancy compression module work together to improve generalization, stability, and obstacle avoidance efficiency.
[0056] Example 4: To implement the solutions described in the above embodiments, the present invention also provides a drone obstacle avoidance system based on compact causal features, comprising: The information perception module is used to acquire environmental images, current flight speed, and target location information perceived by the UAV. The causal feature construction module is used to extract the latent visual features of the environmental image, and decompose the latent visual features into domain-invariant features and domain-specific features based on the cross-scene consistency of the latent visual features, and construct causal features for obstacle avoidance decision based on the domain-invariant features. The fusion module is used to fuse the causal features with the current flight speed and target position information to obtain fused causal input features; A redundancy compression module is used to generate a differentiable binary mask based on trainable channel gating parameters, and to perform channel-level filtering and redundancy compression on the fused causal input features based on the differentiable binary mask to generate compact causal features. The obstacle avoidance and navigation decision module is used to input the compact causal features into the SAC framework and output the obstacle avoidance and navigation control actions of the UAV through the policy network of the SAC framework to complete the obstacle avoidance and navigation decision of the UAV.
[0057] Example 5: Those skilled in the art will understand that all or part of the features / steps of the above-described method embodiments can be implemented by methods, data processing systems, or computer programs. These features may be implemented without hardware, entirely in software, or in a combination of hardware and software. The aforementioned computer program may be stored in one or more computer-readable storage media. When the computer program is executed (e.g., by a processor), it performs the steps of the above-described embodiments of the UAV obstacle avoidance method based on compact causal features.
[0058] The aforementioned storage media capable of storing program code include: static hard disks, solid-state hard disks, random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), optical storage devices, magnetic storage devices, flash memory, magnetic disks or optical disks, and / or combinations of the above devices, that is, they can be implemented by any type of volatile or non-volatile storage devices or combinations thereof.
[0059] The above description is merely a preferred embodiment of the present invention. Those skilled in the art will understand that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the present invention. Furthermore, under the teachings of the present invention, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of the present invention.
Claims
1. A drone obstacle avoidance method based on compact causal features, characterized in that, include: Acquire environmental images, current flight speed, and target location information perceived by the UAV; Extract the latent visual features of the environmental image, and decompose the latent visual features into domain-invariant features and domain-specific features based on the cross-scene consistency of the latent visual features. Construct causal features for obstacle avoidance decision based on the domain-invariant features. The causal features are fused with the current flight speed and target location information of the UAV to obtain fused causal input features; Based on the trainable channel gating parameters, a corresponding differentiable binary mask is generated, and the fused causal input features are subjected to channel-level filtering and redundancy compression based on the differentiable binary mask to generate compact causal features. The trainable channel gating parameters are jointly updated through backpropagation according to the optimization objective of the reinforcement learning strategy. The compact causal features are input into the SAC framework, and the obstacle avoidance navigation control actions of the UAV are output through the policy network of the SAC framework to complete the obstacle avoidance navigation decision of the UAV.
2. The UAV obstacle avoidance method based on compact causal features according to claim 1, characterized in that, The step of constructing causal features for obstacle avoidance decision-making based on the domain-invariant features includes: clustering the domain-invariant features in the feature space to obtain the causal features; The domain-specific features are then identified as non-causal features.
3. The UAV obstacle avoidance method based on compact causal features according to claim 1, characterized in that, The step of generating a corresponding differentiable binary mask based on trainable channel gating parameters, and performing channel-level filtering and redundancy compression on the fused causal input features based on the differentiable binary mask to generate compact causal features includes: Based on the trainable channel gating parameters, trainable weights are assigned to each feature channel of the fused causal input features; The trainable weights are converted into differentiable binary masks using a multilayer perceptron and a ReLU activation function. The differentiable binary mask is multiplied element-wise with the fused causal input features to obtain the gating filtering results for each feature channel; Based on the gating and filtering results of each feature channel, the task-related feature channel is activated and the task-irrelevant feature channel is deactivated, thereby generating the compact causal feature.
4. The UAV obstacle avoidance method based on compact causal features according to claim 3, characterized in that, The expression for converting the trainable weights into a differentiable binary mask using a multilayer perceptron and the ReLU activation function is as follows: = ReLU(MLP( )) m = in, For trainable weights, Here, m is an intermediate parameter, m is a differentiable binary mask, ReLU() is the ReLU activation function, and MLP() is a multilayer perceptron. It is a numerically stable term.
5. The UAV obstacle avoidance method based on compact causal features according to claim 2, characterized in that, During the training phase, the process of constructing the causal features is trained using a variational autoencoder, and the loss function in the training process of constructing the causal features is defined as: in, This represents the approximate posterior distribution of the variational autoencoder output; This represents the network parameters of the variational autoencoder; Represents potential visual training features; This indicates the input training data; Used to measure how close the reconstruction result is to the input training data; Denotes KL divergence, The prior distribution representing the latent visual training features; This indicates that the distribution of latent visual training features obtained from the variational autoencoder is compared with the prior distribution.
6. The UAV obstacle avoidance method based on compact causal features according to claim 1, characterized in that, The trainable channel gating parameters are jointly updated via backpropagation based on the reinforcement learning strategy optimization objective, including: The generation process of differentiable binary masks is optimized by using the loss function of the policy network of the SAC framework as a supervision signal. The causal input features are fed into the policy network to participate in the output of obstacle avoidance navigation control actions. The gradient is backpropagated through the loss function of the policy network to update the trainable channel gating parameters.
7. The UAV obstacle avoidance method based on compact causal features according to claim 6, characterized in that, The SAC framework includes a policy network and a value network; The loss function of the policy network is: in, This indicates that the observation condition o follows a distribution. B The mathematical expectation, B This represents the experience replay pool of historical obstacle avoidance samples of the aforementioned UAV. This represents the target action distribution obtained by exponential transformation of the Q-value function. This represents the probability distribution of the policy network's output for all possible obstacle avoidance actions of the UAV under observation condition o. Indicates KL divergence; The loss function of the value network is: in, This represents the Q-value estimate for performing action a under the current observation o. Indicates an immediate reward. Indicates the observation at the next moment. Indicates the discount factor. This represents the expected long-term return that can be obtained under subsequent strategies starting from the next state.
8. The UAV obstacle avoidance method based on compact causal features according to claim 3, characterized in that, During the training phase, L1 regularized sparsity constraints are also applied to the differentiable binary mask.
9. A drone obstacle avoidance system based on compact causal features, characterized in that, For performing the method according to any one of claims 1-8, comprising: The information perception module is used to acquire environmental images, current flight speed, and target location information perceived by the UAV. The causal feature construction module is used to extract the latent visual features of the environmental image, and decompose the latent visual features into domain-invariant features and domain-specific features based on the cross-scene consistency of the latent visual features, and construct causal features for obstacle avoidance decision based on the domain-invariant features. The fusion module is used to fuse the causal features with the current flight speed and target position information to obtain fused causal input features; A redundancy compression module is used to generate a differentiable binary mask based on trainable channel gating parameters, and to perform channel-level filtering and redundancy compression on the fused causal input features based on the differentiable binary mask to generate compact causal features. The obstacle avoidance and navigation decision module is used to input the compact causal features into the SAC framework and output the obstacle avoidance and navigation control actions of the UAV through the policy network of the SAC framework to complete the obstacle avoidance and navigation decision of the UAV.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed, implements the UAV obstacle avoidance method based on compact causal features as described in any one of claims 1-8.