Coal and rock image super-resolution reconstruction method and device based on Transformer

By combining local convolution blocks and global replacement self-attention blocks, an iterative up-and-down sampling layer is constructed to extract context information at different scales, which solves the problem of insufficient detail recovery capabilities of coal and rock image super-resolution methods in the existing technology in complex environments, and achieves High-quality, high-resolution image generation.

CN118411291BActive Publication Date: 2024-09-06LINYI UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410888412.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-09-06
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

Existing coal and rock image super-resolution methods are difficult to meet the demand for intuitive presentation of image details and information in complex environments, and their ability to aggregate information in adjacent areas is weak, and the fusion attention mechanism is insufficient to improve performance.

Method used

The coal and rock image super-resolution reconstruction method based on Transformer is used, combined with the local convolution block (LCB) and the global replacement self-attention block (GPSAB), to construct the iterative up and down sampling layer (IUDL), and perform deep processing through the iterative up and down sampling block (IUDB). Feature extraction, and use dense connections and DenseNet networks to extract context information at different scales to generate high-resolution images.

Benefits of technology

It improves the ability to restore details of coal and rock images in complex environments, enhances the model's ability to perceive the image structure and content, avoids over-fitting problems, and generates high-resolution images with excellent quality, which is suitable for coal and rock environments with limited resources. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118411291B
    Figure CN118411291B
Patent Text Reader

Abstract

The present invention provides a method and device for super-resolution reconstruction of coal and rock images based on Transformer, which belongs to the field of image processing technology. Specifically, the following steps are included: constructing a local convolution block LCB module; combining LCB with a global permutation self-attention block GPSAB to obtain more comprehensive feature information; constructing an iterative up-down sampling layer IUDL; combining GPSAB, LCB and IUDL to construct an iterative up-down sampling block IUDB. The scheme of the present invention can not only understand the complex and advanced image features extracted by the deep network, but also pay attention to the simple but fine image features captured by the shallow network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing, and in particular relates to a coal rock image super-resolution reconstruction method based on Transformer. Background Art

[0002] With the rapid development of computer technology and digital image processing technology, the intelligent and information construction of coal mines has achieved remarkable results. The accuracy of coal and rock image recognition limits the development of intelligent coal mines. Image super-resolution is a long-standing problem that aims to restore high-resolution images from degraded low-resolution inputs. Image super-resolution can be applied to the field of coal and rock, and its research can improve the enhancement of low-resolution coal and rock images.

[0003] In 2020, a Transformer-based image super-resolution reconstruction method emerged. Compared with the previous CNN-based method, the Transformer-based method utilizes self-attention. This network can benefit from the self-attention mechanism and utilize long-range information. Image super-resolution has achieved certain success using the Transformer method. However, with people's pursuit of clearer and higher-level images, the current image super-resolution is difficult to meet people's vivid expression of images of complex environments and intuitive presentation of required image information. Therefore, a better Transformer method is a new development trend.

[0004] The following problems need to be solved in the super-resolution reconstruction technology of coal mine images:

[0005] 1) Coal and rock images have high requirements for details, and some methods have weak ability to aggregate information from adjacent areas;

[0006] 2) Most existing methods make limited use of image input pixels, and the fused attention mechanism does not improve performance enough; Summary of the invention

[0007] In view of the above problems, the present invention provides a method and device for super-resolution reconstruction of coal and rock images based on Transformer.

[0008] The technical solution adopted by the present invention to overcome the technical problems is:

[0009] In a first aspect, the present invention provides a coal rock image super-resolution reconstruction method based on Transformer, comprising the following steps:

[0010] 1) Construct a local convolution block LCB module, which contains a 1×1 convolution, a DW depth-separable convolution, a SE convolution, and finally restore the number of channels through a 1×1 convolution;

[0011] 2) Combine the LCB module with the global permutation self-attention block GPSAB, where GPSAB contains a permutation self-attention PSA module and FFN convolution;

[0012] 3) Construct an iterative up- and down-sampling layer IUDL;

[0013] 4) Combine GPSAB, LCB and IUDL to construct iterative up-down sampling block IUDB; after the image feature F0 passes through GPSAB and LCB, it passes through IUDL to complete a deep feature extraction, that is, after one IUDB, F1 is obtained, and F1 is the result of passing through N blocks of IUDB. N Perform convolution and operation to obtain the deep feature extraction result F D .

[0014] Based on the above Transformer-based coal rock image super-resolution reconstruction method, 1) it includes the following specific processes:

[0015] 1) Includes the following specific processes:

[0016] 1.1) After the image feature F0 passes through GPSAB, the feature map F is obtained 01 , and then pass through a 1×1 convolution;

[0017] 1.2) Perform DW convolution on the image after 1×1 convolution;

[0018] 1.3) The image passes through the SEnet model;

[0019] 1.4) The image is passed through a 1×1 convolution to generate the output image; the image features and the output image are connected through a residual connection.

[0020] Based on the above Transformer-based coal rock image super-resolution reconstruction method, 2) includes the following specific processes:

[0021] 2.1) Spatial self-attention operation; Assumption represents the input features, where and is the width and height of the input, is the number of channels, and through linear projection Embedded in query, key-value matrix , , In the calculation of query and keyword generation, the size is The spatial attention map of ; perform spatial attention to obtain the intermediate aggregation result, the calculation process is as follows:

[0022]

[0023] in , Linear projection matrices representing queries, keys, and values, respectively;

[0024] 2.2) Rotation operation: Rotate the input query and key matrix to obtain the transposed query and key matrix. , , and rotate the value matrix to get the value matrix , used for subsequent channel self-attention, the obtained size is The channel-by-channel attention map models the channel-by-channel relationship, and the calculation process is as follows:

[0025]

[0026]

[0027] in, represents the spatial attention output, represents the spatial output matrix, represents the transpose of the key matrix, , , are the input embedding matrices of channel self-attention, which are embedded from the previous spatial self-attention or directly from , , Copied, Represents a rotation operation around a spatial axis;

[0028] 2.3) Aggregation operation; output through channel attention The final polymerization , the calculation process is as follows:

[0029]

[0030]

[0031] in, is the inverse rotation of the rotation operation around the spatial axis, Represents the channel output matrix. In the aggregation operation, it integrates the element results of spatial matrix operations and channel matrix operations to achieve full-axis interaction.

[0032] Based on the above Transformer-based coal rock image super-resolution reconstruction method, 3) includes the following specific processes:

[0033] 3.1) Extracting contextual information of different scales; This module uses the connection method of the DenseNet network. The resolution of the input feature map and the output feature map is the same, the number of channels is increased, and then Image Reconstruction is connected to the back for image reconstruction;

[0034] 3.2) Dense connection: The dense connection operation can combine the shallow information and deep information of the image while ensuring that the overall image remains unchanged. Compared with the bicubic interpolation operation, this operation does not require additional calculation parameters in the process of image reconstruction, which can reduce the number of parameters while avoiding overfitting problems. For dense connection, all data in the shallow network are the results of shallow operations, and all data in the deep network are the results of deep operations. Dense connection includes the results of operations at different depths.

[0035] In dense connections, all previous layers are connected as input:

[0036]

[0037] in, represents the result of dense connection of layer l, and D represents upsampling or downsampling operation;

[0038] 3.3) Low-resolution path extracts context information; a 3×3 convolution followed by a 1×1 convolution is used to form a shallow feature extraction of image super-resolution, and the shallow image is used as the input F0 for deep feature extraction and image reconstruction. The upsampling operation is used to obtain the feature map of the image. , and then downsample to get the feature map of the image , and obtain the feature map by upsampling it , by back-projection using , Downsampling to get a new feature map . Repeat this process t times to obtain deep feature map information. ,in, yes arrive The result after dense connection downsampling. Final result Is arrive Finally, the ImageReconstruction operation is used to generate the HR high-resolution image. The upsampling operation is defined as follows:

[0039]

[0040] in, is the upsampling spatial convolution operator, is an upsampling operator with scaling factor s, is the deconvolution layer in the upsampling at stage t, is the feature map in stage t-1 The feature map obtained by upsampling; the downsampling operation is defined as follows:

[0041]

[0042] in, is the downsampling spatial convolution operator, is a downsampling operator with scaling factor s, is the deconvolution layer in the downsampling at stage t, is the feature map in stage t-1 The feature map obtained by downsampling;

[0043]

[0044] The projection unit in the back projection converts the previously calculated LR feature map as input and maps it to the intermediate HR graph , which is then mapped back to the LR map , the observed LR map and reconstructed The residual between Map it to HR again to generate a new intermediate residual map , the intermediate HR map and the intermediate residual mapping Sum and get the final HR mapping ;

[0045] Said through arrive Add to get the final result , the formula is defined as follows:

[0046]

[0047]

[0048] in, represents the upsampled feature map, represents the upsampled feature map, express t indivual ↓ represents downsampling.

[0049] In a second aspect, the present invention provides a coal rock image super-resolution reconstruction device based on Transformer, comprising the following units:

[0050] 1) Construction unit, used to construct the local convolution block LCB module;

[0051] 2) The first combining unit is used to combine the LCB module with the global permutation self-attention block GPSAB;

[0052] 3) Optimization unit, used to construct iterative up- and down-sampling layers IUDL;

[0053] 4) The second combining unit is used to combine the global permutation self-attention block GPSAB, the LCB module and the up-down sampling layer IUDL to construct the iterative up-down sampling block IUDB.

[0054] In the third aspect, the present invention provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the Transformer-based coal rock image super-resolution reconstruction method is executed.

[0055] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, executes a Transformer-based coal and rock image super-resolution reconstruction method.

[0056] The advantages of the present invention are:

[0057] Aiming at the complex environment of underground coal and rock, a Transformer-based image super-resolution reconstruction network is constructed to generate high-resolution coal and rock images. An iterative up- and down-sampling layer is proposed, which uses up-sampling and down-sampling to provide an error feedback mechanism for the projection error of each stage, constructs interconnected up- and down-sampling levels, and each sampling level represents different types of image degradation and high-resolution components. This idea is extended to allow features to be concatenated (dense DBPN) in the up- and down-sampling stages, enabling reconstruction, further improving super-resolution, and producing excellent results. By combining the global permutation attention block GPSAB with the local convolution block LCB, the model has different perception capabilities for image regions of different sizes, allowing them to better understand the image structure and content. Adding convolution blocks on the basis of GPSAB can achieve a more complex and optimized network structure design, enabling the network to better learn adaptive feature representations. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0059] Figure 1It is a schematic diagram of the network model structure in the present invention;

[0060] Figure 2 This is the GPSAB diagram of the global permutation self-attention module of the present invention;

[0061] Figure 3 LCB diagram of the local convolution module of the present invention;

[0062] Figure 4 It is the IUDL diagram of the iterative up and down sampling layers of the present invention. DETAILED DESCRIPTION

[0063] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0064] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.

[0065] Example 1

[0066] Combine the following Figures 1 to 4 A Transformer-based coal and rock image super-resolution reconstruction method implemented in the present invention is specifically described.

[0067] A coal rock image super-resolution reconstruction method based on Transformer, comprising the following steps:

[0068] 1) Construct a local convolution block LCB module, which contains a 1×1 convolution, a DW depth-separable convolution, a SE convolution, and finally restore the number of channels through a 1×1 convolution;

[0069] 2) Combine the LCB module with the global permutation self-attention block GPSAB, where GPSAB contains a permutation self-attention PSA module and FFN convolution;

[0070] 3) Construct an iterative up- and down-sampling layer IUDL;

[0071] 4) Combine GPSAB, LCB and IUDL to construct iterative up-down sampling block IUDB; after the image feature F0 passes through GPSAB and LCB, it passes through IUDL to complete a deep feature extraction, that is, after one IUDB, F1 is obtained, and F1 is the result of passing through N blocks of IUDB. N Perform convolution and operation to obtain the deep feature extraction result F D .

[0072] In this embodiment, 1) includes the following specific processes:

[0073] 1) Includes the following specific processes:

[0074] 1.1) After the image feature F0 passes through GPSAB, the feature map F is obtained 01 , and then pass through a 1×1 convolution;

[0075] 1.2) Perform DW convolution on the image after 1×1 convolution;

[0076] 1.3) The image passes through the SEnet model;

[0077] 1.4) The image is passed through a 1×1 convolution to generate the output image; the image features and the output image are connected through a residual connection.

[0078] In this embodiment, 2) includes the following specific processes:

[0079] 2.1) Spatial self-attention operation; Assumption represents the input features, where and is the width and height of the input, is the number of channels, and through linear projection Embedded in query, key-value matrix , , In the calculation of query and keyword generation, the size is The spatial attention map of ; perform spatial attention to obtain the intermediate aggregation result, the calculation process is as follows:

[0080]

[0081] in , Linear projection matrices representing queries, keys, and values, respectively.

[0082] 2.2) Rotation operation: Rotate the input query and key matrix to obtain the transposed query and key matrix. , , and rotate the value matrix to get the value matrix , used for subsequent channel self-attention, the obtained size is The channel-by-channel attention map models the channel-by-channel relationship, and the calculation process is as follows:

[0083]

[0084]

[0085] in, represents the spatial attention output, represents the spatial output matrix, represents the transpose of the key matrix, , , are the input embedding matrices of channel self-attention, which are embedded from the previous spatial self-attention or directly from , , Copied, Represents a rotation operation about a spatial axis.

[0086] 2.3) Aggregation operation; output through channel attention The final polymerization , the calculation process is as follows:

[0087]

[0088]

[0089] in, is the inverse rotation of the rotation operation around the spatial axis, denotes the channel output matrix. Some normalization factors are omitted for simplicity. In particular, this design shows convincing properties to integrate the element-wise results of two matrix operations (i.e., spatial / channel matrix operations) to achieve full axis interaction.

[0090] In this embodiment, 3) includes the following specific processes:

[0091] 3.1) Extracting contextual information of different scales; This module uses the connection method of the DenseNet network. The resolution of the input feature map and the output feature map is the same, the number of channels is increased, and then Image Reconstruction is connected to the back for image reconstruction;

[0092] 3.2) Dense connection: The dense connection operation can combine the shallow information and deep information of the image while ensuring that the overall image remains unchanged. Compared with the bicubic interpolation operation, this operation does not require additional calculation parameters in the process of image reconstruction, which can reduce the number of parameters while avoiding overfitting problems. For dense connection, all data in the shallow network are the results of shallow operations, and all data in the deep network are the results of deep operations. Dense connection includes the results of operations at different depths.

[0093] In dense connections, all previous layers are connected as input:

[0094]

[0095] in, represents the result of dense connection of layer l, and D represents upsampling or downsampling operation;

[0096] 3.3) Low-resolution path extracts context information; a 3×3 convolution followed by a 1×1 convolution is used to form a shallow feature extraction of image super-resolution, and the shallow image is used as the input F0 for deep feature extraction and image reconstruction. The upsampling operation is used to obtain the feature map of the image. , and then downsample to get the feature map of the image , and obtain the feature map by upsampling it , by back-projection using , Downsampling to get a new feature map . Repeat this process t times to obtain deep feature map information. ,in, yes arrive The result after dense connection downsampling, the final result Is arrive Finally, the ImageReconstruction operation is used to generate the HR high-resolution image. The upsampling operation is defined as follows:

[0097]

[0098] in, is the upsampling spatial convolution operator, is an upsampling operator with scaling factor s, is the deconvolution layer in the upsampling at stage t, is the feature map in stage t-1 The feature map obtained by upsampling; the downsampling operation is defined as follows:

[0099]

[0100] in, is the downsampling spatial convolution operator, is a downsampling operator with scaling factor s, is the deconvolution layer in the downsampling at stage t, is the feature map in stage t-1 The feature map obtained by downsampling;

[0101]

[0102] The projection unit in the back projection converts the previously calculated LR feature map as input and maps it to the intermediate HR graph , which is then mapped back to the LR map , the observed LR map and reconstructed The residual between Map it to HR again to generate a new intermediate residual map , the intermediate HR map and the intermediate residual mapping Sum and get the final HR mapping ;

[0103] Said through arrive Add to get the final result , the formula is defined as follows:

[0104]

[0105]

[0106] in, represents the upsampled feature map, represents the upsampled feature map, express t indivual ↓ represents downsampling.

[0107] In this embodiment, GPSAB, LCB and IUDL are combined to construct an iterative up-down sampling block IUDB: the image features are extracted through shallow features and enter the IUDB, and the feature graph passes through a deep feature extraction module composed of multiple IUDBs. The model can learn more abstract representative features and use these features for more accurate image reconstruction. In this way, even high-level networks can receive more shallow image features through iterative up-down sampling layers, thereby recovering more detail pixels. At the same time, learning LR image features can drive the network to focus on the core part of reconstruction rather than overfitting on irrelevant details. In other words, making the network focus on reconstructing details by reducing the resolution helps the network learn a more generalized feature representation, thereby avoiding overfitting. In addition, since LR image features have fewer pixels and dimensions to process, the computational cost of LR image features is lower than that of processing HR image features. This change can make the network run faster and is more conducive to application in resource-constrained coal and rock environments.

[0108] In order to verify the effectiveness of the local convolutional block LCB and the iterative up-down sampling layer IUDL, as shown in Table 1, this paper conducts an ablation study on LCB and IUDL, and compares the following four models, namely the reference model A (SRFormer), model B (LCB and IUDL removed from DISFormer), model C (IUDL removed from DISFormer), and model D (DISFormer). These four models are compared on the datasets Set5, Set14, BSD100, Urban100, and Manga109, respectively, and the evaluation indicators are peak signal-to-noise ratio PSNR and structural similarity SSIM. In order to exclude the influence of other factors, the parameter settings of window size of 16×16 and magnification ratio of 4 are uniformly used. Among the four models, the peak signal-to-noise ratio PSNR and structural similarity SSIM of model C both exceed those of model B, verifying the effectiveness of LCB; the peak signal-to-noise ratio PSNR and structural similarity SSIM of model D are both greater than those of model C, verifying the effectiveness of IUDL. It can be seen that DISFormer with LCB and IUDL has the best performance, and this method achieves the best PSNR and SSIM on multiple data sets.

[0109] Table 1 Comparison results of four methods at ×4 scale

[0110]

[0111] Example 2

[0112] The present invention provides a coal rock image super-resolution reconstruction device based on Transformer, comprising the following units:

[0113] 1) Construction unit, used to construct the local convolution block LCB module;

[0114] 2) The first combining unit is used to combine the LCB module with the global permutation self-attention block GPSAB;

[0115] 3) Optimization unit, used to construct iterative up- and down-sampling layers IUDL;

[0116] 4) The second combining unit is used to combine the global permutation self-attention block GPSAB, the LCB module and the up-down sampling layer IUDL to construct the iterative up-down sampling block IUDB.

[0117] Example 3

[0118] The present invention provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the Transformer-based coal rock image super-resolution reconstruction method is executed.

[0119] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0120] Example 4

[0121] The present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, a Transformer-based coal-rock image super-resolution reconstruction method is executed.

[0122] Storage media include: USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks or optical disks, and other media that can store programs.

[0123] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A coal rock image super-resolution reconstruction method based on Transformer, characterized in that: The steps include: 1) Construct a local convolution block LCB module, which contains a 1×1 convolution, a DW depth-separable convolution, a SE convolution, and finally restore the number of channels through a 1×1 convolution; 2) Combine the LCB module with the global permutation self-attention block GPSAB, where GPSAB contains a permutation self-attention PSA module and FFN convolution; 3) Construct an iterative up- and down-sampling layer IUDL; 4) Combine GPSAB, LCB and IUDL to construct an iterative up-down sampling block IUDB; the original image feature LR is extracted through shallow features to obtain image feature F0, and the image feature F0 is extracted through GPSAB and LCB and then through IUDL to complete a deep feature extraction, that is, after a block of IUDB, the image feature F1 is obtained, and the image feature F1 is compared with the result F after N blocks of IUDB. N Perform convolution and operation to obtain the deep feature extraction result F D ; The step 3) extracts context information of different scales; this module uses the connection method of the DenseNet network, the resolution of the input feature map and the output feature map is the same, the number of channels is increased, and then Image Reconstruction is connected to the back to perform image reconstruction; it includes the following specific processes: 3.1) Dense connection; connect all previous layers as input: in, represents the result of dense connection of layer l, and D represents upsampling or downsampling operation; 3.2) Low-resolution path extracts context information; the original image feature LR is subjected to a 3×3 convolution and a 1×1 convolution to obtain the shallow image feature of the image super-resolution. The shallow image feature is used as the input F0 for deep feature extraction and image reconstruction, and the image feature map is obtained by upsampling operation. , and then downsample to get the feature map of the image , according to the feature map Upsampling to get feature map , by back-projection using , Downsampling to get a new feature map The above operation is repeated t times to obtain deep feature map information ,in, yes arrive The result after dense connection downsampling is obtained by arrive Add to get the final result Finally, the ImageReconstruction operation is used to generate the HR high-resolution image. The upsampling operation is defined as follows: in, is the upsampling spatial convolution operator, is an upsampling operator with scaling factor s, is the deconvolution layer in the upsampling at stage t, is the feature map obtained in stage t-1 in stage t The feature map obtained by upsampling; the downsampling operation is defined as follows: in, is the downsampling spatial convolution operator, is a downsampling operator with scaling factor s, is the deconvolution layer in the downsampling at stage t, is the feature map in stage t The feature map obtained by downsampling; The projection unit in the back projection converts the previously calculated LR feature map as input and maps it to the intermediate HR graph , which is then mapped back to the LR map , the observed LR map and reconstructed The residual between Map it to HR again to generate a new intermediate residual map , the intermediate HR map and the intermediate residual mapping Sum and get the final HR mapping ; Said through arrive Add to get the final result , the formula is defined as follows: in, represents the upsampled feature map, represents the upsampled feature map, express t indivual ↓ represents downsampling.

2. The coal rock image super-resolution reconstruction method based on Transformer according to claim 1 is characterized in that: 1) Includes the following specific processes: 1.1) After the image feature F0 passes through GPSAB, the feature map F is obtained 01 , and then pass through a 1×1 convolution; 1.2) Perform DW convolution on the image after 1×1 convolution; 1.3) The image after DW convolution passes through the SEnet model; 1.4) The image passed through the SEnet model generates an output image through a 1×1 convolution; the image features and the output image are connected through a residual connection to obtain the input of the IUDL module.

3. The coal rock image super-resolution reconstruction method based on Transformer according to claim 1 is characterized in that: 2) Includes the following specific processes: 2.1) Spatial self-attention operation; represents the input features, where and is the width and height of the input, is the number of channels, and through linear projection Embedded in query, key-value matrix , , In the calculation of query and keyword generation, the size is The spatial attention map of ; perform spatial attention to obtain the intermediate aggregation result, the calculation process is as follows: in , Linear projection matrices representing queries, keys, and values, respectively; 2.2) Rotation operation: Rotate the input query and key matrix to obtain the transposed query and key matrix. , , and rotate the value matrix to get the value matrix , used for subsequent channel self-attention, the obtained size is The channel-by-channel attention map models the channel-by-channel relationship, and the calculation process is as follows: in, represents the spatial attention output, represents the spatial output matrix, represents the transpose of the key matrix, , , is the input embedding matrix of channel self-attention, Represents a rotation operation around a spatial axis; 2.3) Aggregation operation; output through channel attention The final polymerization , the calculation process is as follows: in, is the inverse rotation of the rotation operation around the spatial axis, Represents the channel output matrix. In the aggregation operation, it integrates the element results of spatial matrix operations and channel matrix operations to achieve full-axis interaction.

4. A coal rock image super-resolution reconstruction device based on Transformer, characterized in that: Executing the coal rock image super-resolution reconstruction method based on Transformer as described in any one of claims 1 to 3, comprising: 1) Construction unit, used to construct the local convolution block LCB module; 2) The first combining unit is used to combine the LCB module with the global permutation self-attention block GPSAB; 3) Optimization unit, used to construct iterative up- and down-sampling layers IUDL; 4) The second combining unit is used to combine the global permutation self-attention block GPSAB, the LCB module and the up-down sampling layer IUDL to construct the iterative up-down sampling block IUDB.

5. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate through the bus. When the machine-readable instructions are executed by the processor, the Transformer-based coal rock image super-resolution reconstruction method as described in any one of claims 1 to 3 is performed.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the Transformer-based coal-rock image super-resolution reconstruction method as described in any one of claims 1 to 3.