Military target identification method and device based on visual Transform and program product

By adopting a visual Transformer-based method in military target recognition, the problem of traditional algorithms being too heavy on local features is solved, and higher prediction accuracy and multi-scale feature capture capabilities are achieved.

CN119919919APending Publication Date: 2025-05-02ZHENGZHOU XINDA ADVANCED TECH RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411898486.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

Traditional military target recognition algorithms rely on convolutional neural networks and have the problem of excessive dependence on local features, making it difficult to capture global image information, especially when dealing with image deformation, rotation or scaling.

Method used

Using a military target recognition method based on visual Transformer, multi-scale representation is obtained by segmenting the image to be identified into multiple image blocks, and each image block is downsampled at a degree of 1/2 and 1/4. Features are extracted using deformable convolution, and feature upsampling and feature addition operations are generated by Pixel shuffle, and feature compression and learning are finally performed through linear layers and decoding modules.

Benefits of technology

It improves the prediction accuracy of military targets, can better capture multi-scale features and complex structures of images, and enhances the target recognition ability in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919919A_ABST
    Figure CN119919919A_ABST
Patent Text Reader

Abstract

The invention provides a military target identification method and device based on visual Transform and a program product, and the method comprises the steps: dividing an image into a plurality of image blocks, carrying out the down-sampling of 1 / 2 and 1 / 4 degrees of each image block, and obtaining the multi-scale representation of each image block, feature extraction is carried out on the image blocks by using deformable convolution; after feature extraction is completed, a feature map obtained through deformable convolution on 1 / 4 sampling is subjected to up-sampling through Pixel shuffle, the feature map obtained through up-sampling and a feature map obtained through deformable convolution on 1 / 2 sampling are added, and therefore the added feature map contains fine-grained information and also contains structure information on the macroscale. The feature maps obtained on the original image blocks through the operation are repeated to enable the feature maps to have richer spatial information, and finally the three feature maps are spliced together after being extended into one-dimensional vectors and sent to an Encoder module for target recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of target recognition, and in particular to a military target recognition method, device and program product based on visual Transformer. Background Art

[0002] Military target recognition technology is a key enabling technology in modern warfare. It uses artificial intelligence to accurately identify and judge targets on the ground, at sea or in the air, providing precise guidance and support for military operations. With the continuous advancement of military technology, the application of target recognition technology has become increasingly widespread. Military target recognition technology plays a vital role in reconnaissance, early warning, intelligence analysis and other fields.

[0003] Traditional military target recognition algorithms mainly rely on convolutional neural networks (CNNs), which have some significant shortcomings, including over-reliance on local features, which limits their ability to capture global information of images, resulting in poor performance when processing deformation, rotation or scaling in images. In contrast, ViT's Multi-Head Attention (MHA) can capture richer feature information and capture the relationship between global features through the attention mechanism, which is very helpful for understanding the complex feature combinations of military targets. However, one of the main challenges faced by traditional visual Transformers in image recognition tasks is the lack of processing capabilities for multi-scale features. Traditional visual Transformers usually process inputs at a fixed resolution, which limits the model's capture of features of different scales, especially when processing images with rich hierarchical structures, such as different parts of an object may need to be analyzed at different scales to better understand its structure and contextual information.

[0004] In order to solve the above problems, people have been seeking an ideal technical solution. Summary of the invention

[0005] Based on this, it is necessary to provide a military target recognition method, device and program product based on visual Transformer to address the above technical problems, which has a high prediction accuracy for military targets.

[0006] In order to achieve the above object, the first aspect of the present invention provides a military target recognition method based on visual Transformer, comprising the following steps: After the image to be recognized is divided into several image blocks, it is sent to the improved visual Transformer for processing to obtain the target recognition result; Among them, the improved visual Transformer downsamples each image block by 1 / 2 and 1 / 4 respectively to obtain 1 / 4 scale representation and 1 / 2 scale representation of each image block; Use deformable convolution to extract features from each image patch and its 1 / 4 scale representation and 1 / 2 scale representation; The feature map extracted from the 1 / 4 scale representation of the image block is used as the first feature map; Use pixel shuffle to upsample the feature map extracted from the 1 / 4 scale representation of the image block, add the upsampled feature map to the feature map extracted from the 1 / 2 scale representation of the image block, and use the added feature map as the second feature map; Use pixel shuffle to upsample the second feature map, add the upsampled feature map to the feature map extracted from the image block, and use the added feature map as the third feature map; The first feature map, the second feature map, and the third feature map are extended into one-dimensional vectors, concatenated, and sent to the first linear module for feature compression; The compressed feature vector is sent to the decoding module for feature learning, and the output of the decoding module is sent to the second linear module for decoding output to obtain the target recognition result.

[0007] In order to achieve the above-mentioned object, the second aspect of the present invention provides a military target recognition device based on visual Transformer, comprising: An image segmentation module is used to segment the image to be identified into a number of image blocks; A 1 / 2 downsampling module is used to downsample each image block by 1 / 2 to obtain a 1 / 2 scale representation of each image block; A 1 / 4 downsampling module is used to downsample each image block by 1 / 4 to obtain a 1 / 4 scale representation of each image block; A first feature map acquisition module, comprising a deformable convolution module I, configured to extract a feature map from a 1 / 4 scale representation of an image block as a first feature map; A second feature map acquisition module, comprising a deformable convolution module II, a pixel shuffle upsampling module I and a feature addition module I, wherein the pixel shuffle upsampling module upsamples the first feature map, the deformable convolution module II is used to extract a feature map from a 1 / 2 scale representation of an image block, and the feature addition module I is used to add feature maps output by the deformable convolution module II and the pixel shuffle upsampling module to obtain a second feature map; A third feature map acquisition module, comprising a deformable convolution module III, a pixel shuffle upsampling module II and a feature addition module II, wherein the pixel shuffle upsampling module II upsamples the second feature map, the deformable convolution module III is used to extract the feature map from the original image, and the feature addition module II is used to add the feature maps output by the deformable convolution module III and the pixel shuffle upsampling module II to obtain a third feature map; A feature splicing module, used for extending the first feature map, the second feature map and the third feature map into a one-dimensional vector for splicing; The first linear module is used to compress the concatenated vector and send it to the linear layer for feature compression; A decoding module is used to perform feature learning on the compressed feature vector; The second linear module is used to reduce the dimension of the output of the decoding module to obtain the target recognition result.

[0008] In order to achieve the above-mentioned object, the third aspect of the present invention provides a computer device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor is used to implement the military target recognition method based on visual Transformer as described in the first aspect when executing the program stored in the memory.

[0009] In order to achieve the above-mentioned purpose, the fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the military target recognition method based on visual Transformer as described in the first aspect is implemented.

[0010] In order to achieve the above-mentioned purpose, the fifth aspect of the present invention provides a computer program product, including a computer program, which, when executed by a processor, implements the military target recognition method based on visual Transformer as described in the first aspect.

[0011] The beneficial effects of the present invention are: The present invention proposes a new military target recognition algorithm based on visual transformer. After splitting the image into multiple image blocks, each image block is downsampled to 1 / 2 or 1 / 4, so as to obtain a multi-scale representation of each image block. Then, deformable convolution is used to extract features from the image block. Compared with traditional convolution, the use of deformable convolution to extract features can better obtain spatial changes and deformation information. For military targets, it is easier to distinguish the target from complex scenes such as jungles. After completing the feature extraction, the feature map obtained from the 1 / 4 sampling through the deformable convolution is upsampled using Pixel shuffle, and the upsampled feature map is added to the feature map obtained from the 1 / 2 sampling through the deformable convolution, so that the added feature map contains both fine-grained information and structural information on a macro scale. The feature map obtained by repeating this operation on the original image block makes the feature map have richer spatial information. Finally, the three feature maps are extended into one-dimensional vectors and spliced ​​together, and sent to the linear layer for feature compression. The Encoder module is composed of normalization, multi-head attention mechanism, residual connection and linear layer. Four Encoder modules are used for model training and prediction. The output of the last Encoder module is sent to the linear layer for decoding and the output is used as the result of target recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It is a flow chart of the military target recognition method based on visual Transformer of the present invention.

[0013] Figure 2 It is the Huber Loss function curve diagram of the present invention.

[0014] Figure 3 It is the loss curve of the model training process in the verification experiment of the present invention.

[0015] Figure 4 It is the accuracy curve on the training set in the verification experiment of the present invention.

[0016] Figure 5 It is a partial recognition effect diagram on the test set in the verification experiment of the present invention.

[0017] Figure 6 It is a structural schematic diagram of the computer device of the present invention. DETAILED DESCRIPTION

[0018] Visual Transformer (ViT) can process input images of any size without complex data preprocessing, which makes the model training and reasoning process more efficient. In addition, ViT has proven its strong performance in natural language processing tasks, which makes it also show great potential and advantages in the field of image recognition. Deformable convolution learns the sampling position of convolution, so that the model can adapt to local changes in the input data, so as to better understand the structure and characteristics of the input data, thereby improving the performance and generalization ability of the model. Therefore, a military target recognition algorithm based on visual Transformer is proposed by combining deformable convolution with VIT.

[0019] The technical solution of the present invention is further described in detail below through specific implementation methods.

[0020] Example 1 This embodiment provides a military target recognition method based on visual Transformer, including the following steps: After the image to be recognized is divided into several image blocks, it is sent to the improved visual Transformer for processing to obtain the target recognition result; like Figure 1 As shown, the improved visual Transformer downsamples each image block by 1 / 2 and 1 / 4 respectively to obtain 1 / 4 scale representation and 1 / 2 scale representation of each image block; specifically, this embodiment takes a 264×264×3 image as an example, and divides the 264×264×3 image into several 6×6 image blocks, each of which has a size of 44×44×3.

[0021] Deformable convolution is used to extract features from each image block and its 1 / 4 scale representation and 1 / 2 scale representation, resulting in image blocks of 22×22×3 and 11×11×3.

[0022] The feature map extracted from the 1 / 4 scale representation of the image block, that is, the 11×11×3 image block is used as the first feature map.

[0023] Pixel shuffle is used to upsample the feature map extracted from the 1 / 4 scale representation of the image block, i.e., the 11×11×3 image block, and the upsampled feature map is added to the feature map extracted from the 1 / 2 scale representation of the image block, i.e., the 22×22×3 image block, and the added feature map is used as the second feature map.

[0024] The second feature map is upsampled using Pixel shuffle, the upsampled feature map is added to the feature map extracted from the image block, and the added feature map is used as the third feature map.

[0025] The first feature map, the second feature map and the third feature map are extended into one-dimensional vectors and concatenated to obtain a 7623-dimensional feature vector, and then the 7623-dimensional feature vector is sent to the first linear module for feature compression, and the feature vector is normalized to 4096 dimensions. In a specific implementation, the first linear module includes a linear layer.

[0026] The compressed feature vector is sent to the decoding module for feature learning, and the output of the decoding module is sent to the second linear module for decoding output to obtain a 16+4-dimensional target recognition result, where 16 dimensions are the category of the target and the remaining 4 dimensions are the position of the target.

[0027] In a specific implementation, the second linear module includes two linear layers. When the output of the decoding module is sent to the second linear module for decoding output, the first linear layer is used to reduce the dimension of the 4096-dimensional feature vector to 1024 dimensions, and then the second linear layer is used to reduce the dimension of the 1024-dimensional feature vector to 16+4 dimensions.

[0028] In a specific implementation, the decoding module includes four sequentially connected Encoder modules, and the Encoder module includes a normalization layer I, a multi-head attention layer, a residual connection layer I, a normalization layer II, a linear layer and a residual connection layer II connected in sequence, wherein the input of the residual connection layer I also includes a compressed feature vector, and the input of the residual connection layer II also includes the output of the residual connection layer I.

[0029] It should be noted that when training the improved visual Transformer, the cross entropy loss is selected as the category loss function, and the Huber loss function is selected as the regression estimation loss function of the target box.

[0030] Compared with the MAE loss function, the Huber loss function can converge faster. Compared with the MSE loss function, it is insensitive to outliers and abnormal values, the gradient changes are relatively smaller, and it is not easy for the gradient to explode or disappear during training. Its mathematical formula is as follows:

[0031] in, x represents the predicted value of the model, y Represents the true value.

[0032] like Figure 2 As shown, this is the Huber Loss function curve.

[0033] Verification experiment: The existing military and civilian dataset was used for verification. The dataset contains 23,000 images, including motorcycles, cars, ordinary people, soldiers, civilian ships, civilian trucks, trains, civilian aircraft, tanks, warships, fighters, armored vehicles, buses, helicopters, camouflage vehicles, and artillery vehicles, a total of 16 types of targets. 20,000 images were randomly divided for training, and 3,000 images were used for evaluation and testing. The loss during model training is as follows: Figure 3 As shown in the figure, the loss curve shows that the model converges very quickly, and the rate of loss decreases steadily after 20 iterations.

[0034] The test accuracy during training is as follows Figure 4 As shown in Figure 1. Some of the recognition results of the test set are shown in Figure 1. Figure 5 shown.

[0035] The above experiments prove that the military target recognition algorithm based on visual Transformer has a good effect on the recognition of military and civilian targets, with an accuracy of 97.63% on the test set. It has high practical value, not only improving the efficiency of reconnaissance and early warning, but also enhancing the accuracy of intelligence analysis, providing strong data support for command decision-making, and assisting missiles and other weapon systems to autonomously identify, lock and strike targets, greatly improving combat efficiency and strike accuracy, and providing key technical support for intelligent warfare.

[0036] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0037] Example 2 Based on the same inventive concept, the embodiment of the present application also provides a visual transformer-based military target recognition device for implementing the visual transformer-based military target recognition method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the visual transformer-based military target recognition device provided below can refer to the limitations of the visual transformer-based military target recognition method above, and will not be repeated here.

[0038] like Figure 1 As shown, the military target recognition device based on visual Transformer includes: An image segmentation module is used to segment the image to be identified into a number of image blocks; A 1 / 2 downsampling module is used to downsample each image block by 1 / 2 to obtain a 1 / 2 scale representation of each image block; A 1 / 4 downsampling module is used to downsample each image block by 1 / 4 to obtain a 1 / 4 scale representation of each image block; A first feature map acquisition module, comprising a deformable convolution module I, configured to extract a feature map from a 1 / 4 scale representation of an image block as a first feature map; A second feature map acquisition module, comprising a deformable convolution module II, a pixel shuffle upsampling module I and a feature addition module I, wherein the pixel shuffle upsampling module upsamples the first feature map, the deformable convolution module II is used to extract a feature map from a 1 / 2 scale representation of an image block, and the feature addition module I is used to add feature maps output by the deformable convolution module II and the pixel shuffle upsampling module to obtain a second feature map; A third feature map acquisition module, comprising a deformable convolution module III, a pixel shuffle upsampling module II and a feature addition module II, wherein the pixel shuffle upsampling module II upsamples the second feature map, the deformable convolution module III is used to extract the feature map from the original image, and the feature addition module II is used to add the feature maps output by the deformable convolution module III and the pixel shuffle upsampling module II to obtain a third feature map; A feature splicing module, used for extending the first feature map, the second feature map and the third feature map into a one-dimensional vector for splicing; The first linear module is used to compress the concatenated vector and send it to the linear layer for feature compression; A decoding module is used to perform feature learning on the compressed feature vector; The second linear module is used to reduce the dimension of the output of the decoding module to obtain the target recognition result.

[0039] Example 3 This embodiment has provided a computer device, which may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a military target recognition method based on a visual Transformer is realized. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0040] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0041] Example 4 On the basis of the above embodiments, this embodiment provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the military target recognition method based on visual Transformer as described in Example 1 is implemented.

[0042] Example 5 On the basis of the above embodiments, this embodiment provides a computer program product, including a computer program, which implements the following steps when executed by a processor: dividing the image to be recognized into a plurality of image blocks, and sending the blocks to the improved visual Transformer for processing to obtain a target recognition result; Among them, the improved visual Transformer downsamples each image block by 1 / 2 and 1 / 4 respectively to obtain 1 / 4 scale representation and 1 / 2 scale representation of each image block; Use deformable convolution to extract features from each image patch and its 1 / 4 scale representation and 1 / 2 scale representation; The feature map extracted from the 1 / 4 scale representation of the image block is used as the first feature map; Use pixel shuffle to upsample the feature map extracted from the 1 / 4 scale representation of the image block, add the upsampled feature map to the feature map extracted from the 1 / 2 scale representation of the image block, and use the added feature map as the second feature map; Use pixel shuffle to upsample the second feature map, add the upsampled feature map to the feature map extracted from the image block, and use the added feature map as the third feature map; The first feature map, the second feature map, and the third feature map are extended into one-dimensional vectors, concatenated, and sent to the first linear module for feature compression; The compressed feature vector is sent to the decoding module for feature learning, and the output of the decoding module is sent to the second linear module for decoding output to obtain the target recognition result.

[0043] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0044] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0045] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

[0046] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or some technical features can be replaced by equivalents without departing from the spirit of the technical solution of the present invention, which should be included in the scope of the technical solution for protection of the present invention.

Claims

1. A military target recognition method based on visual Transformer, characterized in that: The following steps are involved: After the image to be recognized is divided into several image blocks, it is sent to the improved visual Transformer for processing to obtain the target recognition result; Among them, the improved visual Transformer downsamples each image block by 1 / 2 and 1 / 4 respectively to obtain 1 / 4 scale representation and 1 / 2 scale representation of each image block; Use deformable convolution to extract features from each image patch and its 1 / 4 scale representation and 1 / 2 scale representation; The feature map extracted from the 1 / 4 scale representation of the image block is used as the first feature map; Use pixel shuffle to upsample the feature map extracted from the 1 / 4 scale representation of the image block, add the upsampled feature map to the feature map extracted from the 1 / 2 scale representation of the image block, and use the added feature map as the second feature map; Use pixel shuffle to upsample the second feature map, add the upsampled feature map to the feature map extracted from the image block, and use the added feature map as the third feature map; The first feature map, the second feature map and the third feature map are extended into a one-dimensional vector, concatenated, and sent to the first linear module for feature compression; The compressed feature vector is sent to the decoding module for feature learning, and the output of the decoding module is sent to the second linear module for decoding output to obtain the target recognition result.

2. According to claim 1, a military target recognition method based on visual Transformer is characterized in that: The decoding module includes four encoder modules connected in sequence, and the encoder module includes a normalization layer I, a multi-head attention layer, a residual connection layer I, a normalization layer II, a linear layer and a residual connection layer II connected in sequence, wherein the input of the residual connection layer I also includes a compressed feature vector, and the input of the residual connection layer II also includes the output of the residual connection layer I.

3. A military target recognition method based on visual Transformer according to claim 1 or 2, characterized in that: The first linear module includes one linear layer; the second linear module includes two linear layers.

4. The method for military target recognition based on visual Transformer according to claim 3 is characterized in that: When training the improved visual Transformer, the cross entropy loss is selected as the category loss function, and the Huber loss function is selected as the regression estimation loss function of the target box. The formula is: , in, x represents the predicted value of the model, y Represents the true value.

5. A military target recognition device based on visual Transformer, characterized in that: include: An image segmentation module is used to segment the image to be identified into a number of image blocks; A 1 / 2 downsampling module is used to downsample each image block by 1 / 2 to obtain a 1 / 2 scale representation of each image block; A 1 / 4 downsampling module is used to downsample each image block by 1 / 4 to obtain a 1 / 4 scale representation of each image block; A first feature map acquisition module, comprising a deformable convolution module I, configured to extract a feature map from a 1 / 4 scale representation of an image block as a first feature map; A second feature map acquisition module, comprising a deformable convolution module II, a pixel shuffle upsampling module I and a feature addition module I, wherein the pixel shuffle upsampling module upsamples the first feature map, the deformable convolution module II is used to extract a feature map from a 1 / 2 scale representation of an image block, and the feature addition module I is used to add feature maps output by the deformable convolution module II and the pixel shuffle upsampling module to obtain a second feature map; A third feature map acquisition module, comprising a deformable convolution module III, a pixel shuffle upsampling module II and a feature addition module II, wherein the pixel shuffle upsampling module II upsamples the second feature map, the deformable convolution module III is used to extract the feature map from the original image, and the feature addition module II is used to add the feature maps output by the deformable convolution module III and the pixel shuffle upsampling module II to obtain a third feature map; A feature splicing module, used for extending the first feature map, the second feature map and the third feature map into a one-dimensional vector for splicing; The first linear module is used to compress the concatenated vector and send it to the linear layer for feature compression; A decoding module is used to perform feature learning on the compressed feature vector; The second linear module is used to reduce the dimension of the output of the decoding module to obtain the target recognition result.

6. The military target recognition device based on visual Transformer according to claim 5, characterized in that: The Encoder module includes a normalization layer I, a multi-head attention layer, a residual connection layer I, a normalization layer II, a linear layer and a residual connection layer II connected in sequence, wherein the input of the residual connection layer I also includes a compressed feature vector, and the input of the residual connection layer II also includes the output of the residual connection layer I.

7. A military target recognition device based on visual Transformer according to claim 5 or 6, characterized in that: The first linear module includes one linear layer; the second linear module includes two linear layers.

8. A computer device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; The processor is used to implement the military target recognition method based on visual Transformer as described in any one of claims 1 to 4 when executing the program stored in the memory.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the military target recognition method based on visual Transformer described in any one of claims 1 to 4 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the military target recognition method based on visual Transformer described in any one of claims 1 to 4 is implemented.