A multi-stage optimization method for color coated steel plate images
Through the multi-stage optimization method of color-coated steel plate images, using technologies such as block embedding, feature pyramid, fully connected layer and atrous convolution, the problem of poor performance of ViT in dense prediction tasks is solved, and the color-coated steel plate is significantly improved. Image enhancement effects and model processing capabilities.
Patent Information
- Application Number
- CN202410924003.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-07-11
AI Technical Summary
The performance of the visual transformation model ViT in dense prediction tasks is not ideal, especially due to the lack of interaction of internal patch information and the limitation of feature scale diversity, resulting in poor detection results in color-coated steel plate image processing, and the existing technology increases There is additional pre-training cost.
A multi-stage optimization method for color-coated steel plate images is proposed, which gradually optimizes features through the block embedding and feature pyramid structure of the initialization module, the fully connected layer and atrous convolution of the shuffling module, and the downsampling and transposed convolution of the fusion module. A multi-stage optimization model is formed to improve image enhancement effects.
It significantly improves the enhancement effect of color-coated steel plate images, improves feature extraction precision and multi-scale feature capture capabilities, enhances image detail retention and global information integration, and improves the model's performance in processing complex backgrounds and details.
Smart Images

Figure CN118469885B
Abstract
Description
Technical Field
[0001] The invention belongs to the field of image enhancement, and in particular relates to a multi-stage optimization method for a color coated steel plate image. Background Art
[0002] Image enhancement has significant advantages in the detection of color coated steel plates. First, through image enhancement technology, the contrast and clarity of the image can be improved, making the detail information more prominent, which is crucial for detecting tiny defects and flaws, because these defects may be difficult to detect in the original image due to low contrast or noise interference. The enhanced image can more clearly show the subtle changes in the surface of the steel plate, allowing the detection algorithm to more accurately identify defects and improve the accuracy and reliability of detection.
[0003] Secondly, image enhancement can also effectively reduce the impact of changes in ambient lighting. In actual production environments, lighting conditions may change due to various reasons, such as changes in light source position and intensity. These changes will cause uneven image brightness and affect the detection effect. By applying image enhancement technology, the brightness and contrast of the image can be standardized, and the interference of lighting changes on the detection results can be reduced, thereby improving the robustness and stability of the detection system. In summary, image enhancement can not only improve image quality in the detection of color coated steel plates, but also significantly improve the detection effect and ensure quality control of the production process.
[0004] Although the visual transformation model ViT has achieved great success in the field of computer vision, it does not perform well in dense prediction tasks due to the lack of interaction of internal patch information and the limitation of feature scale diversity. Currently, most studies focus on designing deformers for vision-specific tasks to solve these problems, but this usually incurs additional pre-training costs. Summary of the invention
[0005] The invention provides a multi-stage optimization method for a color coated steel plate image, aiming to propose a multi-stage optimization model for a color coated steel plate image, wherein an initialization module enhances the fineness of feature extraction and the ability to capture multi-scale features by embedding patches and a feature pyramid structure; a shuffling module comprises a fully connected layer, a leaky ReLU activation function and a dilated convolution, and can effectively perform feature transformation and enhance feature expression capabilities; a fusion module combines downsampling and transposed convolution, and realizes effective fusion of multi-scale features, thereby improving the ability to retain image details and the integration effect of global information; a first-stage optimization module integrates a shuffling module and a fusion module, and improves the performance of the model in processing the color coated steel plate image by gradually optimizing features; a second-stage optimization module further optimizes features on the basis of the first-stage optimization, so that the feature representation is more robust and detailed; a third-stage optimization module further refines and enhances features, so that the model performs better in processing complex backgrounds and details; and the multi-stage optimization model for color coated steel plate images significantly improves the enhancement effect of color coated steel plate images by using multiple modules and a multi-stage optimization process.
[0006] The present invention aims to propose a multi-stage optimization model for a color coated steel plate image and provide a multi-stage optimization method for a color coated steel plate image, comprising the following steps:
[0007] S1, color coated steel plate image collection, photographing the color coated steel plate to obtain multiple clear color coated steel plate images, using Gaussian blur and randomly adding noise to obtain multiple blurred color coated steel plate images, and corresponding to the multiple clear color coated steel plate images to form multiple training pairs, thereby obtaining a color coated steel plate image dataset;
[0008] S2, build the initialization module, including patch embedding and feature pyramid;
[0009] S3, build a shuffle module, including a fully connected layer, a leaky ReLU activation function, and a dilated convolution;
[0010] S4, build a fusion module, including downsampling and transposed convolution;
[0011] S5. Construct a first-stage optimization module, including a shuffle module and a fusion module;
[0012] S6. Construct a two-stage optimization module, including a shuffle module and a fusion module;
[0013] S7, construct a three-stage optimization module, including a shuffle module and a fusion module;
[0014] S8. Construct a multi-stage optimization model for color coated steel plate images, including an initialization module, a first-stage optimization module, a second-stage optimization module, a third-stage optimization module, and a 3×3 convolution;
[0015] S9. Training and optimization of the multi-stage optimization model for color coated steel plate images. Use the color coated steel plate image dataset to train the multi-stage optimization model for color coated steel plate images. After the training is completed, the color coated steel plate image that needs to be optimized is obtained. The color coated steel plate image is input into the multi-stage optimization model for color coated steel plate images to obtain an enhanced color coated steel plate image.
[0016] Preferably, in step S2, for the initialization module, a single blurred color coated steel plate image is input , , , and 3 are single blurred color coated steel plate images The height, width and channels of a single blurred color coated steel plate image Input into Patch Embedding to get features , ,in yes and The product of is 8 squared, It is a feature Another dimension value of Patch Embedding, Patch Embedding includes image segmentation, flattening, linear projection and position encoding, and then a single blurred color coated steel plate image is Input into the feature pyramid to get the feature group , , , , the feature pyramid contains 3×3 convolution, 1×1 convolution, addition and upsampling, feature and feature groups is the output of the initialization module.
[0017] Preferably, in step S2, for the initialization module, the input image is divided into small blocks of fixed size and linearly transformed through block embedding and feature pyramid structure, and position encoding is added to retain spatial information. Then, a multi-scale feature map is generated through multi-layer convolution to fuse information at different scales, significantly improving the ability to capture details and global information.
[0018] Preferably, in step S3, for the shuffle module, given the input feature set , , , ,feature ,feature and Features The first dimension of is different, the second dimension is d, and the feature ,feature and Features Connect in the first dimension to get features , , then get the features , , , represents the first fully connected layer, represents the Leaky ReLU activation function, Represents the second fully connected layer, and then the features Split into features in the second dimension ,feature and Features , , , , for the features Use 7×7 hole convolution to get features , , for the features Use 5×5 hole convolution to get features , , for the features Use 3×3 dilated convolution to get features , , then the feature ,feature and Features Connect in the channel dimension to get features , , then get the features , , , represents the third fully connected layer, represents the Leaky ReLU activation function, Represents the fourth fully connected layer, and then the features Split in the first dimension to get feature groups , , , , feature group is the output of the shuffle module.
[0019] Preferably, in step S3, for the shuffling module, by connecting feature maps of different sizes, performing nonlinear transformation using a fully connected layer and a Leaky ReLU activation function, and capturing rich multi-scale information through multi-scale dilated convolutions, the diversity and expressiveness of the feature maps are enhanced, thereby improving the performance of the model in detail preservation and global perception.
[0020] Preferably, in step S4, for the fusion module, given the input feature set , , , ,feature ,feature and Features The first dimension of is different, the second dimension is d, and the input feature is given , , The values of , and Three cases, and then obtain the feature group , , , ,when The value is , , , , represents downsampling, when The value is , , , , represents transposed convolution, represents downsampling, when The value is , , , , represents the transposed convolution, and then the feature group The three features of are connected in the first dimension to obtain the feature , , then get the features , , represents instance normalization, represents the CBAM attention mechanism, represents a feed-forward neural network, , then the feature Split into feature groups along the first dimension , , , , then get the features ,feature and Features The dimensions are consistent, ,feature and feature groups is the output of the fusion module.
[0021] Preferably, in step S4, for the fusion module, by combining downsampling and transposed convolution, alignment and fusion of feature maps of different sizes are achieved, and attention mechanism and instance normalization are introduced to enhance feature expression ability and model robustness.
[0022] Preferably, in step S5, for a first-stage optimization module, including a shuffle module and a fusion module, the feature output of the initialization module is obtained. and feature groups , , , , ,feature ,feature and Features The first dimension of is different, the second dimension is d, and the feature Input to ViT block to get features , The ViT block contains a multi-head self-attention mechanism, residual connection, layer normalization and feed-forward neural network to group the features into Input to the shuffle module to get the feature group , , , , the feature group and Features Input to the fusion module to get the features , , the feature and Features Add element by element to get features , ,feature and feature groups is the output of the one-stage optimization module.
[0023] Preferably, in step S5, for the one-stage optimization module, a shuffling module and a fusion module are innovatively integrated to enhance feature representation through feature transformation and multi-scale feature alignment. At the same time, a ViT block is introduced to further optimize features through a multi-head self-attention mechanism and a feedforward neural network, and finally the fused features are added element by element to the initial features to ensure complete information transmission and feature diversity.
[0024] Preferably, in step S6, for the two-stage optimization module, including the shuffle module and the fusion module, the features output by the first-stage optimization module are obtained. and feature groups , , , , , the feature Downsampling to get features , , the feature Input to ViT block to get features , The ViT block contains a multi-head self-attention mechanism, residual connection, layer normalization and feed-forward neural network to transform the features He Zheng Group Input to the fusion module to obtain the feature group , , , , and then the feature group Input to the shuffle module to get the feature group , , , , and then the feature group and Features Input to the fusion module to get features , , the feature and Features Add element by element to get features , ,feature and feature groups is the output of the two-stage optimization module.
[0025] Preferably, in step S6, for the two-stage optimization module, a shuffling module and a fusion module are further introduced on the basis of the one-stage optimization, the features are optimized more finely through downsampling and ViT blocks, and the multi-head self-attention mechanism, residual connection, layer normalization and feedforward neural network are used again to improve the feature expression, and the integrity and robustness of the features are enhanced by element-by-element addition.
[0026] Preferably, in step S7, for the three-stage optimization module, including the shuffle module and the fusion module, the feature output of the two-stage optimization module is obtained. and feature groups , , , , , the feature Downsampling to get features , , the feature Input to ViT block to get features , The ViT block contains a multi-head self-attention mechanism, residual connection, layer normalization and feed-forward neural network to transform the features He Zheng Group Input to the fusion module to obtain the feature group , , , , and then the feature group Input to the shuffle module to get the feature group , , , , and then the feature group and Features Input to the fusion module to get features , , the feature and Features Add element by element to get features , ,feature and feature groups is the output of the three-stage optimization module.
[0027] Preferably, in step S8, for the multi-stage optimization model of color coated steel plate images, a single blurred color coated steel plate image is input To the initialization module, , , and 3 are single blurred color coated steel plate images The height, width and channels of the initialization module output features and feature groups , , , , , the feature and feature groups Input into the first-stage optimization module to obtain the features and feature groups , , , , , the feature and feature groups Input into the two-stage optimization module to obtain the features and feature groups , , , , , the feature and feature groups Input into the three-stage optimization module to obtain the features and feature groups , , , , , and then obtain the final feature , , the final feature Input to 3×3 convolution, represents transposed convolution, Represents downsampling to obtain a single enhanced color coated steel plate image , .
[0028] Preferably, in step S8, for the multi-stage optimization model of the color coated steel plate image, the initialization module is used to perform block embedding and feature pyramid extraction of multi-scale features, the first-stage optimization module integrates the shuffling and fusion modules to transform and align the fine-scale features, and introduces the ViT block for feature optimization, the second-stage optimization module further processes the mesoscale features, refines the feature expression through downsampling and ViT blocks, the third-stage optimization module optimizes the coarse-scale features, and continues to use the shuffling, fusion modules and ViT blocks for deep processing, and finally the multi-scale features optimized in each stage are added and fused element by element to ensure complete information transmission and feature diversity.
[0029] Compared with the prior art, the present invention has the following technical effects:
[0030] The technical solution provided by the present invention proposes a multi-stage optimization model for color coated steel plate images, wherein the initialization module enhances the fineness of feature extraction and the ability to capture multi-scale features by embedding patches and feature pyramid structures; the shuffling module includes a fully connected layer, a leaky ReLU activation function, and a dilated convolution, which can effectively perform feature transformation and enhance feature expression capabilities; the fusion module combines downsampling and transposed convolution to achieve effective fusion of multi-scale features, thereby improving the ability to retain image details and the integration effect of global information; the first-stage optimization module integrates the shuffling module and the fusion module, and improves the performance of the model in processing color coated steel plate images by gradually optimizing features; the second-stage optimization module further optimizes features on the basis of the first-stage optimization, making the feature representation more robust and detailed; the third-stage optimization module further refines and enhances features, making the model perform better in processing complex backgrounds and details; and the multi-stage optimization model for color coated steel plate images significantly improves the enhancement effect of color coated steel plate images by using multiple modules and a multi-stage optimization process. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a multi-stage optimization flow chart of a color coated steel plate image provided by the present invention.
[0032] Figure 2 It is a structural diagram of the multi-stage optimization model of the color coated steel plate image provided by the present invention.
[0033] Figure 3 It is a single blurred color coated steel plate image provided by the present invention.
[0034] Figure 4 It is a single enhanced color coated steel plate image provided by the present invention. DETAILED DESCRIPTION
[0035] The present invention aims to propose a multi-stage optimization method for color coated steel plate images, and proposes a multi-stage optimization model for color coated steel plate images, wherein the initialization module enhances the fineness of feature extraction and the ability to capture multi-scale features by embedding patches and feature pyramid structures; the shuffling module includes a fully connected layer, a leaky ReLU activation function, and a dilated convolution, and can effectively perform feature transformation and enhance feature expression capabilities; the fusion module combines downsampling and transposed convolution to achieve effective fusion of multi-scale features, and improves the image detail retention capability and the integration effect of global information; the first-stage optimization module integrates the shuffling module and the fusion module, and improves the performance of the model in processing color coated steel plate images by gradually optimizing features; the second-stage optimization module further optimizes features on the basis of the first-stage optimization, so that the feature representation is more robust and detailed; the third-stage optimization module further refines and enhances features, so that the model performs better in processing complex backgrounds and details; the multi-stage optimization model for color coated steel plate images significantly improves the enhancement effect of color coated steel plate images by using multiple modules and a multi-stage optimization process.
[0036] See also Figure 1 As shown, a multi-stage optimization method for a color coated steel plate image in an embodiment of the present application is:
[0037] S1, color coated steel plate image collection, photograph the color coated steel plate, obtain 230 clear color coated steel plate images, use Gaussian blur and randomly add noise to obtain 230 blurred color coated steel plate images, and form 230 training pairs corresponding to the 230 clear color coated steel plate images, so as to obtain a color coated steel plate image dataset;
[0038] S2, build an initialization module, including 1 patch embedding and 1 feature pyramid;
[0039] S3, build a shuffle module, which includes 4 fully connected layers, 2 Leaky ReLU activation functions and 3 dilated convolutions;
[0040] S4, build fusion module, including downsampling and transposed convolution;
[0041] S5. Construct a one-stage optimization module, including a shuffle module and a fusion module;
[0042] S6. Construct a two-stage optimization module, including one shuffle module and two fusion modules;
[0043] S7, construct a three-stage optimization module, including one shuffle module and two fusion modules;
[0044] S8. Construct a multi-stage optimization model for color coated steel plate images, including 1 initialization module, 1 one-stage optimization module, 1 two-stage optimization module, 1 three-stage optimization module and 3×3 convolution;
[0045] S9. Training and optimization of the multi-stage optimization model for color coated steel plate images. Use the color coated steel plate image dataset to train the multi-stage optimization model for color coated steel plate images. After the training is completed, the color coated steel plate image that needs to be optimized is obtained. The color coated steel plate image is input into the multi-stage optimization model for color coated steel plate images to obtain an enhanced color coated steel plate image.
[0046] Further, in step S2, for the initialization module, a single blurred color coated steel plate image is input , , , and 3 are single blurred color coated steel plate images The height, width and channels of a single blurred color coated steel plate image Input into Patch Embedding to get features , ,in yes and The product of is 8 squared, It is a feature Another dimension value of Patch Embedding, Patch Embedding includes image segmentation, flattening, linear projection and position encoding, and then a single blurred color coated steel plate image is Input into the feature pyramid to get the feature group , , , , the feature pyramid contains 3×3 convolution, 1×1 convolution, addition and upsampling, feature and feature groups is the output of the initialization module.
[0047] Further, in step S3, for the shuffle module, given the input feature set , , , ,feature ,feature and Features The first dimension of is different, the second dimension is d, and the feature ,feature and Features Connect in the first dimension to get features , , then get the features , , , represents the first fully connected layer, represents the Leaky ReLU activation function, Represents the second fully connected layer, and then the features Split into features in the second dimension ,feature and Features , , , , for the features Use 7×7 hole convolution to get features , , for the features Use 5×5 hole convolution to get features , , for the features Use 3×3 dilated convolution to get features , , then the feature ,feature and Features Connect in the channel dimension to get features , , then get the features , , , represents the third fully connected layer, represents the Leaky ReLU activation function, Represents the fourth fully connected layer, and then the features Split in the first dimension to get feature groups , , , , feature group is the output of the shuffle module.
[0048] Further, in step S4, for the fusion module, given the input feature set , , , ,feature ,feature and Features The first dimension of is different, the second dimension is d, and the input feature is given , , The values of , and Three cases, and then obtain the feature group , , , ,when The value is , , , , represents downsampling, when The value is , , , , represents transposed convolution, represents downsampling, when The value is , , , , represents the transposed convolution, and then the feature group The three features of are connected in the first dimension to obtain the feature , , then get the features , , represents instance normalization, represents the CBAM attention mechanism, represents a feed-forward neural network, , then the feature Split into feature groups along the first dimension , , , , then get the features ,feature and Features The dimensions are consistent, ,feature and feature groups is the output of the fusion module.
[0049] Furthermore, in step S5, for the first-stage optimization module, including the shuffle module and the fusion module, the features output by the initialization module are obtained. and feature groups , , , , ,feature ,feature and Features The first dimension of is different, the second dimension is d, and the feature Input to ViT block to get features , The ViT block contains a multi-head self-attention mechanism, residual connection, layer normalization and feed-forward neural network to group the features into Input to the shuffle module to get the feature group , , , , the feature group and Features Input to the fusion module to get the features , , the feature and Features Add element by element to get features , ,feature and feature groups is the output of the one-stage optimization module.
[0050] Further, in step S6, for the two-stage optimization module, including the shuffle module and the fusion module, the features output by the first-stage optimization module are obtained. and feature groups , , , , , the feature Downsampling to get features , , the feature Input to ViT block to get features , The ViT block contains a multi-head self-attention mechanism, residual connection, layer normalization and feed-forward neural network to transform the features He Zheng Group Input to the fusion module to obtain the feature group , , , , and then the feature group Input to the shuffle module to get the feature group , , , , and then the feature group and Features Input to the fusion module to get features , , the feature and Features Add element by element to get features , ,feature and feature groups is the output of the two-stage optimization module.
[0051] Further, in step S7, for the three-stage optimization module, including the shuffle module and the fusion module, the features output by the two-stage optimization module are obtained. and feature groups , , , , , the feature Downsampling to get features , , the feature Input to ViT block to get features , The ViT block contains a multi-head self-attention mechanism, residual connection, layer normalization and feed-forward neural network to transform the features He Zheng Group Input to the fusion module to obtain the feature group , , , , and then the feature group Input to the shuffle module to get the feature group , , , , and then the feature group and Features Input to the fusion module to get features , , the feature and Features Add element by element to get features , ,feature and feature groups is the output of the three-stage optimization module.
[0052] Further, in step S8, for the multi-stage optimization model of the color coated steel plate image, its structure is as follows: Figure 2 As shown, a single blurred color coated steel plate image is input To the initialization module, , 1280, 1280 and 3 are single blurred color coated steel plate images The height, width and channels of the initialization module output features and feature groups , , , , , the feature and feature groups Input into the first-stage optimization module to obtain the features and feature groups , , , , , the feature and feature groups Input into the two-stage optimization module to obtain the features and feature groups , , , , , the feature and feature groups Input into the three-stage optimization module to obtain the features and feature groups , , , , , and then obtain the final feature , , the final feature Input to 3×3 convolution, represents transposed convolution, Represents downsampling to obtain a single enhanced color coated steel plate image , .
[0053] Furthermore, a single blurred color coated steel plate image such as Figure 3 As shown, a single enhanced color coated steel plate image is Figure 4 As shown, it can be seen that compared with a single blurred color coated steel plate image, the single enhanced color coated steel plate image has clearer details at the same resolution.
[0054] Furthermore, the multi-stage optimization model for color coated steel plate images was written in Python language, using the Pytorch framework, referring to the ViT algorithm framework, trained using the Nvidia RTX 3090 GPU, using a training batch size of 8, a total training round number of 200, and an AdamW optimizer with a learning rate of 0.0001 and a weight decay of 0.05.
[0055] The above are only preferred embodiments of the present invention. It should be pointed out that a person skilled in the art can make several modifications and improvements without departing from the inventive concept of the present invention, and these all fall within the protection scope of the present invention.
Claims
1. A multi-stage optimization method for color coated steel plate images, characterized in that: The following steps are involved: S1, color coated steel plate image collection, photographing the color coated steel plate to obtain multiple clear color coated steel plate images, using Gaussian blur and randomly adding noise to obtain multiple blurred color coated steel plate images, and corresponding to the multiple clear color coated steel plate images to form multiple training pairs, thereby obtaining a color coated steel plate image dataset; S2, build the initialization module, including patch embedding and feature pyramid; S3, build a shuffle module, including a fully connected layer, a leaky ReLU activation function, and a dilated convolution; S4, build fusion module, including downsampling and transposed convolution; S5. Construct a first-stage optimization module, including a shuffling module and a fusion module; the first-stage optimization module specifically includes: obtaining the features output by the initialization module and feature groups , , , , ,feature ,feature and Features The first dimension of is different, the second dimension is d, and the feature Input to ViT block to get features , The ViT block contains a multi-head self-attention mechanism, residual connection, layer normalization and feed-forward neural network to group the features into Input to the shuffle module to get the feature group , , , , the feature group and Features Input to the fusion module to get the features , , the feature and Features Add element by element to get features , ,feature and feature groups is the output of the first-stage optimization module; S6. Construct a two-stage optimization module, including a shuffle module and a fusion module; the two-stage optimization module specifically includes: obtaining the features output by the first-stage optimization module and feature groups , , , , , the feature Downsampling to get features , , the feature Input to ViT block to get features , The ViT block contains a multi-head self-attention mechanism, residual connection, layer normalization and feed-forward neural network to transform the features He Zheng Group Input to the fusion module to obtain the feature group , , , , and then the feature group Input to the shuffle module to get the feature group , , , , and then the feature group and Features Input to the fusion module to get features , , the feature and Features Add element by element to get features , ,feature and feature groups is the output of the two-stage optimization module; S7, construct a three-stage optimization module, including a shuffle module and a fusion module; the three-stage optimization module specifically includes: obtaining the features output by the two-stage optimization module and feature groups , , , , , the feature Downsampling to get features , , the feature Input to ViT block to get features , The ViT block contains a multi-head self-attention mechanism, residual connection, layer normalization and feed-forward neural network to transform the features He Zheng Group Input to the fusion module to obtain the feature group , , , , and then the feature group Input to the shuffle module to get the feature group , , , , and then the feature group and Features Input to the fusion module to get features , , the feature and Features Add element by element to get features , ,feature and feature groups is the output of the three-stage optimization module; S8. Construct a multi-stage optimization model for color coated steel plate images, including an initialization module, a first-stage optimization module, a second-stage optimization module, a third-stage optimization module, and a 3×3 convolution; S9. Training and optimization of the multi-stage optimization model for color coated steel plate images. Use the color coated steel plate image dataset to train the multi-stage optimization model for color coated steel plate images. After the training is completed, the color coated steel plate image that needs to be optimized is obtained. The color coated steel plate image is input into the multi-stage optimization model for color coated steel plate images to obtain an enhanced color coated steel plate image.
2. The multi-stage optimization method for color coated steel plate images according to claim 1, characterized in that: In step S2, for the initialization module, a single blurred color coated steel plate image is input , , , and 3 are single blurred color coated steel plate images The height, width and channels of a single blurred color coated steel plate image Input into Patch Embedding to get features , ,in yes and The product of is 8 squared, It is a feature Another dimension value of Patch Embedding, Patch Embedding includes image segmentation, flattening, linear projection and position encoding, and then a single blurred color coated steel plate image is Input into the feature pyramid to get the feature group , , , , the feature pyramid contains 3×3 convolution, 1×1 convolution, addition and upsampling, feature and feature groups is the output of the initialization module.
3. The multi-stage optimization method for color coated steel plate images according to claim 1, characterized in that: In step S3, for the shuffle module, given the input feature set , , , ,feature ,feature and Features The first dimension of is different, the second dimension is d, and the feature ,feature and Features Connect in the first dimension to get features , , then get the features , , , represents the first fully connected layer, represents the Leaky ReLU activation function, Represents the second fully connected layer, and then the features Split into features in the second dimension ,feature and Features , , , , for the features Use 7×7 hole convolution to get features , , for the features Use 5×5 hole convolution to get features , , for the features Use 3×3 dilated convolution to get features , , then the feature ,feature and Features Connect in the channel dimension to get features , , then get the features , , , represents the third fully connected layer, represents the Leaky ReLU activation function, Represents the fourth fully connected layer, and then the features Split in the first dimension to get feature groups , , , , feature group is the output of the shuffle module.
4. The multi-stage optimization method for color coated steel plate images according to claim 1, characterized in that: In step S4, for the fusion module, given the input feature set , , , ,feature ,feature and Features The first dimension of is different, the second dimension is d, and the input feature is given , , The values of , and Three cases, and then obtain the feature group , , , ,when The value is , , , , represents downsampling, when The value is , , , , represents transposed convolution, represents downsampling, when The value is , , , , represents the transposed convolution, and then the feature group The three features of are connected in the first dimension to obtain the feature , , then get the features , , represents instance normalization, represents the CBAM attention mechanism, represents a feed-forward neural network, , then the feature Split into feature groups along the first dimension , , , , then get the features ,feature and Features The dimensions are consistent, ,feature and feature groups is the output of the fusion module.
5. The multi-stage optimization method for color coated steel plate images according to claim 1, characterized in that: In step S8, for the multi-stage optimization model of color coated steel plate images, a single blurred color coated steel plate image is input To the initialization module, , , and 3 are single blurred color coated steel plate images The height, width and channels of the initialization module output features and feature groups , , , , , the feature and feature groups Input into the first-stage optimization module to obtain the features and feature groups , , , , , the feature and feature groups Input into the two-stage optimization module to obtain the features and feature groups , , , , , the feature and feature groups Input into the three-stage optimization module to obtain the features and feature groups , , , , , and then obtain the final feature , , the final feature Input to 3×3 convolution, represents transposed convolution, Represents downsampling to obtain a single enhanced color coated steel plate image , .
