Feedback generative adversarial network with channel spatial attention mechanism for agent path planning

By constructing a feedback generative adversarial network with channel space attention, the problems of low efficiency and insufficient accuracy of Dijkstra's algorithm and A* algorithm in path planning are solved, and fast and accurate path planning is achieved.

CN115903856BActive Publication Date: 2026-06-19DALIAN UNIV OF TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN Β· China
Patent Type
Patents(China)
Current Assignee / Owner
DALIAN UNIV OF TECH
Filing Date
2023-02-15
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing Dijkstra's algorithm and A* algorithm suffer from low efficiency and insufficient accuracy in path planning, especially in large and complex path topology networks where it is difficult to quickly find the optimal path.

Method used

A feedback generative adversarial network model with channel-space attention mechanism is adopted. A real map path is generated by an improved fast random search tree algorithm, and a concatenated channel-space feedback attention model is constructed to build a feedback generative adversarial network. The path planning is optimized by iterative training of the generator and discriminator.

Benefits of technology

It improves the timeliness and accuracy of path planning, concentrates the generated paths near the optimal path, enhances the correlation between features, and improves the quality of path generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115903856B_ABST
    Figure CN115903856B_ABST
Patent Text Reader

Abstract

A feedback generative adversarial network (GAN) with channel-space attention mechanism for agent path planning is proposed. First, an environment map containing obstacles, start and end points is acquired and divided into training and test sets. Second, an improved fast random search tree (FSRS) algorithm is input into the training set to generate realistic map paths. Third, a concatenated channel-space feedback attention model is constructed. Finally, a feedback GAN with channel-space attention mechanism is built. After the network is built, the training set is input into the network, the weights are saved after training, and the test set is input into the network to obtain the optimal path. This invention fully considers timeliness and accuracy, enabling rapid path finding and improving efficiency. The generated paths include the optimal path and are mostly concentrated near the optimal path, improving accuracy. The addition of the attention mechanism enhances the correlation between features, significantly improving the quality of the generated paths.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention pertains to path planning in the fields of artificial intelligence, including robotics, drones, cruise missiles, and autonomous driving. Specifically, it relates to a feedback generative adversarial network model with a channel space attention mechanism for path planning of intelligent agents. Background Technology

[0002] Path planning technology has wide applications in both high-tech fields, such as autonomous collision-free robot navigation and cruise missile radar evasion, and everyday life, such as GPS navigation and urban road planning. It can also be applied to resource allocation problems in decision-making and management, and routing problems in communication technology. In general, any planning problem that can be represented by a point-line network can be solved using path planning methods. The core of path planning is algorithm design; the quality of the algorithm directly determines the quality of the route. Different algorithms have different characteristics and therefore different applicable scopes and fields.

[0003] Currently, the following methods exist for path planning:

[0004] 1) Dijkstra's algorithm

[0005] Dijkstra's algorithm is a typical shortest path algorithm. It expands outwards from the starting point layer by layer until it reaches the destination, finding the shortest path by comparing all nodes in a forward direction. Because it traverses all nodes to find the shortest path, it has a high success rate and good robustness. However, its low efficiency due to traversing many nodes is a fatal flaw when applied to large and complex path topology networks. In addition, Dijkstra's algorithm cannot handle problems with negative edges.

[0006] 2) A-star heuristic search algorithm, or A* algorithm for short

[0007] The A* algorithm is a heuristic search algorithm that comprehensively evaluates the cost of each expanded search node by setting an appropriate heuristic function. It compares the cost values ​​of each expanded node and selects the most promising point for expansion until the target node is found. The advantages of this method are fewer expanded nodes, good robustness, and fast response to environmental information. The disadvantages are poor real-time performance, high computational cost and long processing time per node, and decreased search efficiency as the number of nodes increases. Furthermore, the algorithm does not completely traverse all feasible solutions, and the result may not be the optimal solution.

[0008] In summary, the feedback generative adversarial network with channel spatial attention mechanism designed in this invention can efficiently and accurately complete path planning. This patent was supported by the China Postdoctoral Science Foundation (2022TQ0179). Summary of the Invention

[0009] This invention addresses the limitations of Dijkstra's algorithm and A* algorithm in path planning by proposing a feedback generative adversarial network model with a channel-space attention mechanism, achieving better path planning results. Since path planning demands high efficiency and accuracy, finding the optimal path in the environment graph within a limited time has always been a challenging problem.

[0010] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0011] A feedback generative adversarial network (GAN) with channel-space attention mechanism for agent path planning is proposed. First, an environment map containing obstacles, start and end points is acquired and divided into training and testing sets. Second, an improved fast random search tree algorithm is input into the training set to generate realistic map paths. Third, a concatenated channel-space feedback attention model is constructed, consisting of a channel attention module, a spatial attention module, and a feedback structure. Finally, based on the constructed concatenated channel-space feedback attention model, a feedback GAN with a channel-space attention mechanism is built. After the network is built, the training set is input into the network, the weights are saved after training, and then the test set is input into the network to obtain the path. The specific steps include:

[0012] Step 1: Obtain the environment map.

[0013] The environment map is a 64x64x3 pixel image, consisting of three parts: the map itself, the start point, and the finish point. The map is a black and white image, with black representing obstacles and white representing movable areas. The start and finish points are represented by two dots. The environment map is divided into training and testing sets.

[0014] Step 2: Input the training set into the improved Fast Random Search Tree algorithm to generate real map paths. Specifically:

[0015] First, using the starting point as the first node, a random point x is generated in each loop. rand The generation of random points is arbitrary; they can be any point on the environment map. Connecting the generated points with the previously generated points, and repeating this process, a node graph is created, which is defined as a "tree". The distance x is then found within this constructed tree. rand The nearest node x near , connect x near and x rand From x near To x rand The direction of this connecting line is the direction in which the tree grows.

[0016] Secondly, a step size (Stepsize) is set as the step size for each growth of the tree, which will generate a new node x at the end of the growth. new Determine x new and x near Does the line connecting the two lines pass through an obstacle? If it does, discard x. new Reselect the node; if it is not traversed, retain x. new .

[0017] Finally, with x new Using x as the center, find the intersection point with x within the defined radius. new Adjacent node x neighbor Calculate the distance from the starting point to x neighbor Path distance and x neighbor To x new The node x with the smallest path distance is selected from the sum of the path distances. neighbor Replace the original sampling point x as the new parent node. near And for x new The adjacent nodes are rewired to minimize the total distance from all nodes to the starting point. Furthermore, the defined radius range can be set as needed.

[0018] By repeatedly performing the above steps, until x... new Upon reaching the vicinity of the endpoint, the loop ends, and the actual map path is obtained. The "vicinity of the endpoint" can be understood as a circle with the endpoint as the center, with a radius set as needed. new When a point appears within the circle, it can be considered to have reached the vicinity of the endpoint.

[0019] Step 3: Construct the serial channel spatial feedback attention module. This model consists of a channel attention module, a spatial attention module, and a feedback structure. For example... Figure 2 As shown.

[0020] (3.1) Channel attention module, which obtains feature map F through channel attention mechanism. C Specifically:

[0021] The environment graph with start and end points is converted into a feature graph F(C x H x W). For example... Figure 2 As shown in (a), the input feature map F is processed by global max pooling (MaxPool) and global average pooling (AvgPool) on slices of H x W, respectively, to obtain two C x 1 x 1 feature maps, denoted as . and They are then fed into a shared network to generate corresponding features. and The size remains unchanged. Then, the two features are summed element-wise, followed by a sigmoid activation operation to generate a channel attention map, denoted as M. C Then for M C The dimensions are expanded to transform it into a C x H x W feature map, denoted as M. β€² C M β€² C Multiplying it by the feature map F yields the final feature map F. C The changes in image resolution parameters are expressed as (C x H x W)β€”(C x1x 1)β€”(C / rx 1x 1)β€”(C / rx 1x 1)β€”(C x 1x 1)β€”(C x 1x 1)β€”(C x H x W)β€”(C x Hx W).

[0022] The shared network is a multilayer perceptron (MLP). The MLP structure consists of an input layer, a hidden layer, and an output layer. To reduce parameter overhead, the hidden activation size is set to (C / r) x 1 x 1, where r is the reduction ratio. The activation function is ReLU, calculated as follows:

[0023] MLP = W1(W0(x)) (1)

[0024] Here, W1 and W0 are shared weights, and the activation function ReLU is preceded by W0 and followed by W1.

[0025] The calculation process of the channel attention mechanism is as follows:

[0026]

[0027] Where C represents the number of channels, H represents the height of the image, W represents the width of the image, and Οƒ is the activation function.

[0028] (3.2) Spatial attention module, which obtains feature map F through spatial attention mechanism. S Specifically:

[0029] The environment graph with start and end points is converted into a feature graph F(C x H x W). For example... Figure 2 As shown in (b), the input feature map F is subjected to global average pooling (AvgPool) and global max pooling (MaxPool) based on dimension C (channels) to obtain two 1xH x W feature maps, denoted as... and The two feature maps are then concatenated based on their channels. Next, a 7x7 convolution operation is performed to reduce the dimensionality to one channel, i.e., 1xH x W. Finally, an activation function is applied to generate a spatial attention map M. S Finally, regarding MS The dimensions are expanded to transform it into a C x H x W feature map, denoted as M. S β€² M S β€² Multiplying it by the feature map F yields the final feature map F. S The image resolution parameters change as follows: (C x H x W) β€” (1x H x W) β€” (2x H x W) β€” (1x H x W) β€” (1x H x W) β€” (C x H x W) β€” (C x H x W).

[0030] The computational process of the spatial attention mechanism is as follows:

[0031]

[0032] Where C represents the number of channels, H represents the height of the image, W represents the width of the image, and f 7Γ—7 This represents a 7x7 convolution operation, where Οƒ is the activation function.

[0033] (3.3) The spatial attention module of the feedback channel is obtained through cyclic feedback calculation. Specifically:

[0034] like Figure 2 As shown in (c), the channel attention module and the spatial attention module are connected in series. The input is then denoted as the feature map F. in The output is the feature map F. out The channel attention module outputs "feature map F". C The spatial attention module outputs "feature map F". S When there is no feedback, the feature map F in The input to the channel attention module is the feature map F, and the output of the channel attention module is the feature map F. C Immediately following F C As input to the spatial attention module, the spatial attention module outputs a feature map F. S At this time, F S That is, feature map F out When there are t feedback cycles, the feature map F in and feature map The sum of the values ​​is the input to the channel attention module, and the channel attention module outputs a feature map. Immediately afterwards The spatial attention module takes as input and outputs a feature map. at this time That is, feature map Where t is the number of feedbacks.

[0035] The cyclic feedback calculation process is represented as follows:

[0036]

[0037] Step 4: Based on the cascaded channel-space feedback attention module constructed in Step 3, build a feedback generative adversarial network with channel-space attention. Details are as follows:

[0038] (4.1) Serial Generator Network: The generator mainly consists of an encoder and a decoder. The encoder consists of blocks 1 to 4. Each block is composed of a convolutional block (conv+BN+ReLU), a residual block (conv+BN+PreLU), and a serial channel spatial feedback attention module, as shown in [reference needed]. Figure 3 (a) where conv is the convolution operation, BN is the normalization process, and ReLU and PreLU are the activation functions. The decoder consists of blocks 5 to 7, which have the same structure as the encoder, except that the convolution blocks are replaced with deconvolution blocks (upconv+BN+ReLU). The other two modules are the same as the encoder, where upconv is the deconvolution operation.

[0039] First, map features are extracted using block 1 of the encoder, and then encoded and decoded sequentially using blocks 2 through 7. The outputs of block 1 and block 7 are added element-wise, and the result is input into block 8. Block 8 enhances the original contextual information to ensure image quality. At the end of the concatenated generator network, the output of block 8 is convolved and activated by an activation function (conv+tanh), compressing the feature map into a 3-channel image, which represents the generated map path. Figure 3 (b), where tanh is the activation function. The parameter changes of the image resolution are: 64x 64x3β€”64x 64x 64β€”32x 32x 128β€”16x 16x 256β€”8x 8x 512β€”16x 16x 256β€”32x 32x128β€”64x 64x 64β€”64x 64x 32β€”64x 64x 3.

[0040] (4.2) Discriminator Network: such as Figure 3 As shown in (b), the discriminator consists of 5 convolutional blocks (conv+BN+LeakyReLu), see Figure 3(c), where conv is the convolution operation, BN is the normalization process, and LeakyReLu is the activation function. The map with starting and ending points, the real map path obtained in step 2, and the generated map path generated by the generator in step (4.1) are used as inputs to the discriminator. The discriminator judges the authenticity of the generated map path and the difference between the real map path and the real map path, thus continuously performing adversarial training of the generative adversarial network. The image resolution parameters change as follows: 64x 64x 3β€”32x32x32β€”16x 16x 128β€”8x 8x 256β€”4x 4x 512β€”1x 1x 1. Furthermore, self-attention modules can be added for optimization. Specifically, a self-attention module, denoted as `self1`, is added after the first convolutional block, and another, denoted as `self2`, is added after the third convolutional block. The output of the first convolutional block is used as the input to self-attention module `self1`, and the output of the third convolutional block is used as the input to self-attention module `self2`. The output of `self1` is then added to the output of the first convolutional block and input into the second convolutional block. The output of `self2` is then added to the output of the third convolutional block and input into the fourth convolutional block. The addition of self-attention modules helps to focus on global information and strengthens the relevance of the context.

[0041] (4.3) Loss Function

[0042] Discriminator loss function:

[0043]

[0044] Generator loss function:

[0045]

[0046] Among them, D map (s,m) represents the identification result of the real map path, D map (G(z,m,p),m) represents the identification result of the map path generated by the generator, D point (s,p) represents whether the true path satisfies the identification result of connecting the start and end points, D point (G(z,m,p),p) represents the identification result of whether the path generated by the generator satisfies the connection between the starting point and the ending point; G(z,m,p) represents the map path generated by the generator; Indicates the loss of the map path; Indicates the loss at the starting and ending points; denoted by s, z, m, p, and k is a hyperparameter that forms the dynamic crossover coefficient, enhancing the generator's attention to the starting and target states.

[0047] Step 5: Train the generative adversarial network (GAN) using the original map (with start and end points) and real-world map paths from the training set as inputs, and save the weights after training. Finally, use the original map (with start and end points) from the test set as input to generate the optimal path and save the optimal path result.

[0048] The training process is as follows: The feedback generative adversarial network (GAN) built in step 4 is used for training, primarily involving iterative training of the generator and discriminator. Samples are selected from the training set and input into the discriminator and generator. Loss functions (9) to (11) are used to calculate the losses of the discriminator and generator, respectively. The training process of the generator and discriminator is repeated continuously. The relevant parameters of the generator and discriminator are continuously updated using the losses calculated through the loss function, thereby continuously improving the discriminator's discrimination ability and enabling the generator to produce increasingly accurate paths. After multiple training iterations, the training process of the adversarial network is completed.

[0049] After steps 1 through 5, the environment map is prepared. A real-world map path is generated using an improved fast random search tree algorithm. A feedback generative adversarial network (GAN) is then built. The map with start and end points, along with the real-world map path, is input into the network as a training set for iterative training. After training, the weight parameters are saved. When a new map is input, the weight parameters are loaded first, and then the generator is used to generate the optimal path.

[0050] The beneficial effects of this invention are:

[0051] This invention, based on a feedback generative adversarial network model with a channel-space attention mechanism, fully considers both timeliness and accuracy. On the one hand, it can quickly find paths, improving efficiency; on the other hand, the generated paths include the optimal path and are mostly concentrated in the vicinity of the optimal path, improving accuracy. Simultaneously, the addition of the attention mechanism enhances the correlation between features, and the feedback structure allows for deeper training, significantly improving the quality of the generated paths. Attached Figure Description

[0052] Figure 1 These are environment maps, where (a), (b), (c), and (d) are four environment maps with start and end points;

[0053] Figure 2 Here are the diagrams of the cascaded feedback channel attention module, where (a) is the channel attention module diagram, (b) is the spatial attention module diagram, and (c) is the cascaded feedback structure diagram.

[0054] Figure 3 Here are the adversarial network diagrams, where (a) is the adversarial generator network block module structure diagram, (b) is the adversarial generator network structure diagram, and (c) is the adversarial discriminator network structure diagram.

[0055] Figure 4 It is a real path graph generated by an improved fast random search tree algorithm;

[0056] Figure 5 It is a path graph generated by an adversarial network. Detailed Implementation

[0057] The present invention will be further described below with reference to specific embodiments.

[0058] A feedback generative adversarial network with a channel space attention mechanism for agent path planning includes the following steps:

[0059] Step 1: Prepare an environment map and set the start and end points, such as... Figure 1 As shown, (a), (b), (c), and (d) are four environment maps with start and end points, each with a resolution of 64 x 64 x 3 pixels. The maps are black and white images, with black representing obstacles and white representing movable areas; two points are used to represent the start and end points. In this training, 100 different environment maps were selected, each containing 100 different start and end points, for a total of 10,000 samples. These 10,000 samples were divided into a training set and a test set, with 8,000 samples in the training set and 2,000 samples in the test set.

[0060] Step 2: Input the training set into the improved Fast Random Search Tree algorithm to generate real map paths. For example, for... Figure 1 The four images (a), (b), (c), and (d) in the image are used to generate images such as... Figure 4 The four actual map paths shown are (a), (b), (c), and (d).

[0061] Step 3: Construct a feedback generative adversarial network with channel-space attention, such as... Figure 2 , Figure 3As shown, the network model consists of a generator and a discriminator. The generator consists of an encoder and a decoder. The encoder consists of blocks 1 to 4, and the decoder consists of blocks 5 to 7. The encoder's block network structure can be represented as a convolutional block (conv+BN+ReLU) β€” a residual block (conv+BN+PreLU) β€” a cascaded channel spatial feedback attention module; the decoder's block network structure can be represented as a deconvolutional block (upconv+BN+ReLU) β€” a residual block (conv+BN+PreLU) β€” a cascaded channel spatial feedback attention module. The network parameters change as follows: 64x 64x 3 β€” 64x 64x 64 β€” 32x 32x 128 β€” 16x 16x 256 β€” 8x 8x512 β€” 16x16x 256 β€” 32x 32x 128 β€” 64x 64x 64 β€” 64x 64x 32 β€” 64x 64x 3. The discriminator consists of convolutional blocks (conv+BN+LeakyReLU) and a self-attention module. A map with a start and end point, a real map path, and a generated map path are input into the discriminator to obtain a true / false result. The discriminator judges the difference between the generated map path and the real map path, thus continuously training the network adversarially. The network structure parameters change from 64x 64x 3 to 32x 32x 32 to 16x 16x128 to 8x 8x 256 to 4x 4x512 to 1x 1x 1.

[0062] Step 4: Train the network built in Step 3. The training mainly involves iterative training of the generator and discriminator. Select 8000 training samples, divide them into groups of 8, and input them into the feedback generative adversarial network in 1000 groups. Calculate the loss of the discriminator and the generator using loss functions (9) to (11). Repeat the training process of the generator and discriminator. Update the relevant parameters of the generator and discriminator with the loss calculated by the loss function, so that the discriminator's discrimination ability is continuously improved, and the generator can generate more and more accurate paths. After multiple training sessions, save the relevant parameters and weights of the generator and discriminator to complete the training process of the adversarial network.

[0063] Step 5: Load the parameter weights obtained in Step 4 into the generator, select 2000 test samples and input them into the generator. The generator will then generate the corresponding paths and download and save them. For example, ... Figure 1 The generator takes four images (a), (b), (c), and (d) as input and generates the corresponding images. Figure 5 There are four paths: (a), (b), (c), and (d).

[0064] Implementation Results

[0065] 1) From Figure 5The four paths (a), (b), (c), and (d) and Figure 4 A comparison of the four paths (a), (b), (c), and (d) shows that the generated map paths are very close to the actual map paths, and the generated map paths are concentrated near the optimal path, while the non-optimal paths have been reduced.

[0066] 2) By Figure 5 From the four paths (a), (b), (c), and (d), it can be seen that, for Figure 1 Four different maps (a), (b), (c), and (d) were used, and the optimal path was obtained for each map, demonstrating that the model has good adaptability to different maps. At the same time, after online testing, with the network model well trained, the network can quickly generate the optimal path when a new environment map with a start point and an end point is input.

[0067] Therefore, the feedback generative adversarial network model with channel space attention has improved both the timeliness and accuracy of path planning, and the overall performance is good.

[0068] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are only used to illustrate the technical solutions of the present invention and should not be construed as limiting the present invention. Those skilled in the art can make modifications and substitutions to the above embodiments within the scope of the present invention without departing from the principles and spirit of the present invention.

Claims

1. A feedback generative adversarial network with a channel-space attention mechanism for agent path planning, characterized in that, Includes the following steps: Step 1: Obtain an environment map containing obstacles, start point, and end point, and divide the environment map into a training set and a test set. The map is a black and white image, with black representing obstacles and white representing movable areas. Two points are used to represent the start point and end point. Step 2: Input the training set into the improved fast random search tree algorithm and use the improved fast random search tree algorithm to generate real map paths; Step 3: Construct a serial channel spatial feedback attention model, which includes a channel attention module, a spatial attention module, and a feedback structure; Step 4: Based on the constructed serial channel space feedback attention model, build a feedback generative adversarial network with a channel space attention mechanism; Step 5: Use the original map with start and end points and the real map path from the training set as input to train the generative adversarial network. Save the weights after training. Finally, use the original map with start and end points from the test set as input to the network to generate the optimal path and save the optimal path result.

2. The feedback generative adversarial network with channel space attention mechanism for agent path planning according to claim 1, characterized in that, Step 2 includes the following steps: First, using the starting point as the first node, a random point is generated in each loop. The generation of random points is arbitrary, meaning they can be any point on the environment map. Connecting the generated points with the previously generated points, and repeating this process, generates a node graph, which is defined as a "tree". Distances are then calculated from this constructed tree. The nearest node ,connect and ,from arrive The direction of this connecting line is the direction in which the tree grows; Secondly, a step size (Stepsize) is set as the step size for each growth of the tree, which will generate a new node at the end of the growth. ,judge and Does the line connecting the two lines pass through an obstacle? If it does, discard it. Reselect nodes; retain nodes if they are not traversed. ; Finally, with Centered on the defined radius, search for... Adjacent nodes Calculate the starting point to path distance and arrive Choose the node with the smallest sum of path distances. As the new parent node, it replaces the original sampling point. , and for The adjacent nodes are rewired to minimize the total distance from all nodes to the starting point; furthermore, the defined radius range can be set as needed. By repeatedly performing the above steps, until... Upon reaching the vicinity of the endpoint, the loop ends, and the actual map path is obtained; the vicinity of the endpoint can be understood as a circle with the endpoint as the center, and the radius can be set as needed. When a point appears within the circle, it can be considered to have reached the vicinity of the endpoint.

3. A feedback generative adversarial network with channel space attention mechanism for agent path planning according to claim 2, characterized in that, Step 3 includes the following steps: (3.1) Channel attention module, which obtains feature maps through the channel attention mechanism. Specifically: First, the environment map with start and end points is converted into a feature map F (C x H x W). The input feature map F is then subjected to global max pooling and global average pooling on slices of H x W, respectively, resulting in two C x 1 x 1 feature maps, denoted as... and They are then fed into a shared network to generate corresponding features. and Furthermore, the size remains unchanged; secondly, the two features are summed element-wise, and then a sigmoid activation operation is performed to generate a channel attention map, denoted as . Finally, regarding The dimensionality is expanded to become a C x H x W feature map, denoted as ,Will Multiplying it by the feature map F yields the final feature map. ; The shared network is a multilayer perceptron (MLP). The calculation process of the channel attention mechanism is as follows: =MaxPool(F), =AvgPool(F) (2); =MLP( ), =MLP( ) (3); =Οƒ( + ) (4); Where C represents the number of channels, H represents the height of the image, W represents the width of the image, and Οƒ is the activation function; (3.2) Spatial attention module, which obtains feature maps through spatial attention mechanism. Specifically: First, the environment map with start and end points is converted into a feature map F (C x H x W). Global average pooling and global max pooling are then applied to the input feature map F based on dimension C, resulting in two 1 x H x W feature maps, denoted as... and Next, the two feature maps are concatenated based on channels; then, a 7 x 7 convolution operation is performed to reduce the dimensionality to one channel, i.e., 1 x H x W, and then an activation function is used to generate a spatial attention map. Finally, regarding The dimensionality is expanded to become a C x H x W feature map, denoted as ,Will Multiplying it by the feature map F yields the final feature map. ; The computational process of the spatial attention mechanism is as follows: =MaxPool(F), =AvgPool(F) (5); =Οƒ( ([ ? ])) (6); Where C represents the number of channels, H represents the height of the image, and W represents the width of the image. This represents a 7 x 7 convolution operation, where Οƒ is the activation function; (3.3) The spatial attention module of the feedback channel is obtained through cyclic feedback calculation. Specifically: The channel attention module and the spatial attention module are concatenated, and the input is then denoted as the feature map. The output is a feature map. The channel attention module outputs a feature map. The spatial attention module outputs a feature map. When there is no feedback, the feature map The input to the channel attention module is the feature map, and the output of the channel attention module is the feature map. Immediately afterwards As input to the spatial attention module, the spatial attention module outputs a feature map. ,at this time That is, feature map When t feedbacks occur, the feature map and feature map The sum of the values ​​is the input to the channel attention module, and the channel attention module outputs a feature map. Immediately afterwards The spatial attention module takes as input and outputs a feature map. ,at this time That is, feature map Where t is the number of feedbacks; The cyclic feedback calculation process is represented as follows: = ( ( )), t=0 (7οΌ‰οΌ› = ( ( )), t>0 (8)。 4. A feedback generative adversarial network with channel space attention mechanism for agent path planning according to claim 3, characterized in that, Step 4 includes the following steps: (4.1) Serial generator network: The generator body includes an encoder and a decoder, wherein the encoder consists of blocks 1 to 4 and the decoder consists of blocks 5 to 7; First, map features are extracted through block 1 in the encoder, and then encoded and decoded sequentially through blocks 2 to 7. The outputs of block 1 and block 7 are added element by element, and the result is input into block 8. The role of block 8 is to enhance the original context information to ensure image quality. At the end of the concatenated generator network, the output of block 8 is convolved and activated by an activation function, and the feature map is compressed into a 3-channel image, which is the generated map path. (4.2) Discriminator Network: The discriminator consists of 5 convolutional blocks; The map with a starting point and an ending point, the real map path obtained in step 2, and the generated map path generated by the generator in step (4.1) are used as inputs to the discriminator. The discriminator judges whether the generated map path is real or fake and judges the difference between the generated map path and the real map path, thereby continuously performing adversarial training of the generative adversarial network. (4.3) Loss Function Discriminator loss function: = (9οΌ‰οΌ› = (10οΌ‰οΌ› Generator loss function: = + (11οΌ‰οΌ› in, This indicates the identification result of the actual map path. This indicates the identification result of the map path generated by the generator. ( p) indicates whether the actual path satisfies the identification result of connecting the start and end points. This indicates whether the path generated by the generator satisfies the identification result of connecting the start and end points; This represents the map path generated by the generator; Indicates the loss of the map path; Indicates the loss at the starting and ending points; denoted by s, z, m, p, and k is a hyperparameter that forms the dynamic crossover coefficient, enhancing the generator's attention to the starting and target states.

5. A feedback generative adversarial network with channel space attention mechanism for agent path planning according to claim 4, characterized in that, In step (4.1), each block of the encoder, from block 1 to block 4, is composed of a convolutional block, a residual block, and a serial channel spatial feedback attention module connected in series; blocks 5 to 7 of the decoder have the same structure as the encoder, except that the convolutional block is replaced with a deconvolutional block, and the other two modules are the same as those of the encoder.

6. A feedback generative adversarial network with channel space attention mechanism for agent path planning according to claim 5, characterized in that, In step (4.2), a self-attention module can be added for optimization to enhance relevance. Specifically, a self-attention module, self1, is added after the first convolutional block, and self2 is added after the third convolutional block. The output of the first convolutional block is used as the input of the self-attention module self1, and the output of the third convolutional block is used as the input of the self-attention module self2. The output of self1 is added to the output of the first convolutional block and input into the second convolutional block. The output of self2 is added to the output of the third convolutional block and input into the fourth convolutional block.

7. A feedback generative adversarial network with channel space attention mechanism for agent path planning according to claim 6, characterized in that, The training process in step 5 is as follows: The feedback generative adversarial network built in step 4 is used for training. The training mainly consists of iterative training of the generator and discriminator. Samples are selected from the training set and input into the discriminator and generator. The loss of the discriminator and generator is calculated using loss functions (9) to (11) respectively. The training process of the generator and discriminator is repeated continuously. The relevant parameters of the generator and discriminator are continuously updated by calculating the loss through the loss function. After multiple training sessions, the training process for the adversarial network is completed.

Citation Information

Patent Citations

  • Robot path planning method based on generative adversarial network and ant colony algorithm

    CN114167865A

  • Mask wearing detection method based on YOLOv5 network

    CN114399799A