Rain line removal device in industrial inspection

Through the combination of multi-stage feature extraction and attention module, combined with Laplace loss and structural similarity loss function, the problem of poor rain removal effect in single-stage is solved, and the accurate extraction of rain line information and the generation of clear rain-free images are achieved. .

CN113920029BActive Publication Date: 2024-11-05CHANGZHOU MICROINTELLIGENCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111219319.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-20
Publication Date
2024-11-05
Estimated Expiration
2041-10-20

AI Technical Summary

Technical Problem

The single-stage rain removal method in existing industrial detection has poor effect, resulting in blurred image and loss of detailed information, affecting the performance of machine vision algorithms.

Method used

Using a progressive rain removal structure, through multi-stage feature extraction, each time, the feature extraction is further performed based on the previous extraction result, and the channel attention module and the residual channel attention module are used for speech information screening and residual learning, combined with Lapula This loss and structural similarity loss function improve feature extraction effect.

Benefits of technology

The rain line information is accurately extracted, and the rain removal effect is improved. The edges of the generated image tend to be real labels, and the angle of the human eye is more similar to the real labels, which solves the problem of poor rain removal effect in a single stage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113920029B_ABST
    Figure CN113920029B_ABST
Patent Text Reader

Abstract

The present invention provides a rain line removal device in industrial detection, which relates to the field of industrial detection technology. The device includes: first to third channels connected in series; wherein the first to third channels include: a semantic information extraction module and a feature screening module, the feature screening modules of the first and second channels include: a channel attention module and a convolution module, and the feature screening module of the third channel includes: a residual channel attention module and a convolution module. The present invention adopts a progressive rain removal structure, and each time further performs feature extraction based on the last extraction result, which solves the problem of poor single-stage rain removal effect. The first two stages mainly use the channel attention module to further screen voice information, and the last stage mainly uses the residual channel attention module, which can perform residual learning on the semantic information extracted by the channel attention module in the first two stages, further improving the feature extraction effect, so that the rain line information that needs to be removed can be accurately extracted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of industrial detection, and in particular to a rain line removal device in industrial detection. Background Art

[0002] Rain is a common dynamic severe weather. Raindrops fall randomly at a high speed and are randomly distributed in the air. In the image, raindrops mainly appear in the shape of rain lines, which can easily cause image blur and loss of detail information. Some areas of the image may even be randomly blocked, which will affect the performance of machine vision algorithms. At present, most machine vision algorithms used in industrial sites process images. If the images are not de-rained, the efficiency and accuracy of detection will be seriously affected.

[0003] At present, the main image deraining method is single-stage deraining. The single-stage deraining method is to make the rain map in the data set and the corresponding real image into a training set, and send it to the single-stage network for training. The single-stage model is usually a coarse-to-fine mode, that is, firstly perform rough deraining through the coarse network, and then send the deraining result to the fine network for high-precision deraining. The effect on public data sets is average. Summary of the invention

[0004] To solve the above technical problems, the first purpose of the present invention is to propose a rain line removal device for industrial inspection. The device adopts a progressive rain removal structure, and each time it further performs feature extraction based on the previous extraction result, which solves the problem of poor single-stage rain removal effect. The first two stages mainly use the channel attention module to further screen the voice information, which can efficiently extract the features on the channel. The last stage mainly uses the residual channel attention module, which can perform residual learning on the semantic information extracted by the channel attention module in the first two stages, further improving the feature extraction effect, so that the rain line information that needs to be removed can be accurately extracted.

[0005] The technical solution adopted by the present invention is as follows:

[0006] An embodiment of the present invention proposes a rain line removal device in industrial inspection, comprising: a first channel, an input end of the first channel is used to receive an image to be inspected, and the first channel is used to extract features from the image to be inspected and generate a first feature map; a second channel, an input end of the second channel is connected to an output end of the first channel, and the second channel is used to extract features from the first feature map and generate a second feature map; a third channel, an input end of the third channel is connected to an output end of the second channel, and the third channel is used to extract features from the second feature map and generate a rain-removed image; wherein the first channel, the second channel and the third channel comprise: a semantic information extraction module and a feature screening module, the semantic information extraction module is used to extract semantic information on the channel, and the feature screening module is used to screen the semantic information extracted by the semantic information extraction module and generate a feature map, wherein the feature screening modules of the first channel and the second channel comprise: a channel attention module CAB (Channel Attention Block) and a convolution module, and the feature screening module of the third channel comprises: a residual channel attention module RCAB (Residual Channel Attention Block) and a convolution module.

[0007] The rain line removal device for industrial detection proposed in the present invention may also have the following additional technical features:

[0008] According to one embodiment of the present invention, the feature screening modules of the first channel and the second channel specifically include: a first convolution module, a first channel attention module, a second convolution module, a second channel attention module, a third convolution module, a fourth convolution module, a third channel attention module, a fifth convolution module, a fourth channel attention module, a sixth convolution module and a fifth channel attention module connected in series in sequence; the feature screening module of the third channel specifically includes: a first residual channel attention module, a second residual channel attention module, a third residual channel attention module and a seventh convolution module connected in series in sequence.

[0009] According to one embodiment of the present invention, between the output end of the first channel and the input end of the second channel, and between the output end of the second channel and the input end of the third channel, it also includes: an eighth convolution module and a sigmoid activation function layer connected in series.

[0010] According to one embodiment of the present invention, GRU (Gate Recurrent Unit) is used to share parameters between the feature screening modules of the first channel and the second channel, and GRU is used to share parameters between the feature screening modules of the second channel and the third channel.

[0011] According to one embodiment of the present invention, a jump connection module is used to share parameters among the first channel attention module, the second channel attention module, the third channel attention module, the fourth channel attention module and the fifth channel attention module in the feature screening module.

[0012] According to one embodiment of the present invention, the semantic information extraction module includes: a ninth convolution module, a sixth channel attention module and a long short-term memory network, the ninth convolution module is used to extract features and convert them into feature maps, the sixth channel attention module is used to extract semantic information on the channel based on contextual semantics, and the long short-term memory network is used to filter the semantic information.

[0013] According to an embodiment of the present invention, the semantic information extraction module further includes: an excitation compression module, and the excitation compression module is used to randomly discard the filtered semantic information according to corresponding weights.

[0014] According to one embodiment of the present invention, the loss function is constructed by using Laplace loss and structural similarity loss.

[0015] According to one embodiment of the present invention, the loss function is obtained according to the following formula:

[0016] L ssim =1-f ssim (I o ,I gt )+ε1;

[0017]

[0018] L total =λ1L ssim +λ2L lapla ;

[0019] Among them, L ssim represents the structural similarity loss, L lapla Denotes the Laplace loss, L total represents the loss function, I o represents the first image, I gt represents the second image, f ssim (I o ,I gt ) represents the calculation of the first image I o and the second image I gt The structural similarity value of ε1 represents a minimum value, Δf(I o ) represents the first image I o Perform Laplace operation, Δf(I gt ) represents the second image I gtPerform Laplace operation, ||·|| 2 represents the sum of squares of the variables, ε2 represents another minimum value, and λ1 and λ2 represent the weights of the loss function.

[0020] Beneficial effects of the present invention:

[0021] 1. The present invention adopts a progressive rain removal structure, each time further extracting features based on the previous extraction results, which solves the problem of poor single-stage rain removal effect. The first two stages mainly use the channel attention module to further screen the voice information, which can efficiently extract the features on the channel. The last stage mainly uses the residual channel attention module, which can perform residual learning on the semantic information extracted by the channel attention module in the first two stages, further improving the feature extraction effect, so that the rain line information that needs to be removed can be accurately extracted;

[0022] 2. A combination of Laplace loss and structural similarity loss is used in the network generation process. Laplace loss can make the edge of the generated image closer to the real label image, and structural similarity loss can make the generated image more similar to the real label from the perspective of the human eye. The combination of the two achieves a better effect;

[0023] 3. Parameter sharing operation and structural design are adopted. Parameter sharing includes two parts, namely intra-channel parameter sharing and inter-channel parameter sharing. The jump connection module SC is used for parameter sharing within the channel to solve the problem of feature weakening when the feature is transmitted over a long distance. The inter-channel parameter sharing adopts GRU, convolution layer and sigmoid activation function layer to enhance the shared features. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 is a schematic structural diagram of a rain line removal device in industrial inspection according to an embodiment of the present invention;

[0025] Figure 2 is a schematic structural diagram of a rain line removal device in industrial inspection according to another embodiment of the present invention;

[0026] Figure 3 4 is a schematic diagram of the structure of a semantic information extraction module according to an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] Figure 1 is a schematic diagram of the structure of a rain line removal device in industrial detection according to an embodiment of the present invention. Figure 1 As shown, the device includes: a first channel 1, a second channel 2, and a third channel 3. The input end input1 of the first channel 1 is used to receive the image to be detected, and the first channel 1 is used to extract features of the image to be detected and generate a first feature map F1; the input end input2 of the second channel 2 is connected to the output end output1 of the first channel, and the second channel 2 is used to extract features from the first feature map F1 and generate a second feature map F2; the input end input3 of the third channel 3 is connected to the output end output2 of the second channel, and the third channel 3 is used to extract features from the second feature map F2 and generate a derained image F3.

[0029] Among them, the first channel 1, the second channel 2 and the third channel 3 include: a semantic information extraction module 11 and a feature screening module 12, the semantic information extraction module 1 is used to extract semantic information on the channel, and the feature screening module 12 is used to screen the semantic information extracted by the semantic information extraction module 11 and generate a feature map, wherein the feature screening module 12 of the first channel 1 and the second channel 2 includes: a channel attention module CAB and a convolution module, and the feature screening module of the third channel includes: a residual channel attention module RCAB and a convolution module.

[0030] Specifically, Figure 1 As shown, a multi-stage progressive deraining method is adopted. The input image to be detected is first subjected to efficient feature extraction through the CMB of the first channel 1, and then the generated feature map is passed to the subsequent feature screening module 12 of the first channel 1 until the first channel 1 outputs the initial deraining result, i.e., the first feature map F1. The first feature map F1 is then input into the second channel 2, and the second channel 2 and the third channel 3 are processed in the same way as above, and finally the final output result, i.e., the derained image, is output. That is, the network loop is performed three times, and each time the deraining work is further performed based on the result of the previous deraining, which solves the problem of poor effect of the current single-stage deraining. The image to be detected input by the present invention is a real rainy day data set.

[0031] Since the texture distribution of rain lines in the data set is relatively uneven and the data volume is large, it is necessary to efficiently extract rain line features therefrom. Therefore, the present invention proposes a feature screening module 12. The channels in the first two stages mainly use the channel attention module CAB, which can efficiently extract the features on the channels. The channels in the last stage always use the residual channel attention module RCAB. The residual channel attention module RCAB can perform residual learning on the features on the channels extracted by CAB in the first two channels, and can accurately extract the rain line information that needs to be removed. Finally, the final deraining result is output through the convolution module.

[0032] That is to say, the device adopts a progressive rain removal structure, each time further extracting features based on the previous extraction results, solving the problem of poor single-stage rain removal effect. The first two stages mainly use the channel attention module to further screen the voice information, which can efficiently extract the features on the channel. The last stage mainly uses the residual channel attention module, which can perform residual learning on the semantic information extracted by the channel attention module in the first two stages, further improving the feature extraction effect, so that the rain line information that needs to be removed can be accurately extracted.

[0033] According to one embodiment of the present invention, Figure 2 As shown, the feature screening module 12 of the first channel 1 and the second channel 2 specifically includes: a first convolution module Conv1, a first channel attention module CAB1, a second convolution module Conv2, a second channel attention module CAB2, a third convolution module Conv3, a fourth convolution module Conv4, a third channel attention module CAB3, a fifth convolution module Conv5, a fourth channel attention module CAB4, a sixth convolution module Conv6 and a fifth channel attention module CAB5 connected in series in sequence; the feature screening module 12 of the third channel 3 specifically includes: a first residual channel attention module RCAB1, a second residual channel attention module RCAB2, a third residual channel attention module RCAB3 and a seventh convolution module Conv7 connected in series in sequence.

[0034] Verified by relevant experiments, Figure 2 The structural feature extraction effect is outstanding, and the rain line information that needs to be removed can be accurately extracted.

[0035] According to one embodiment of the present invention, Figure 2 As shown, between the output end of the first channel 1 and the input end of the second channel 2, and between the output end of the second channel 2 and the input end of the third channel 3, there are also: an eighth convolution module Conv8 and a sigmoid activation function layer connected in series.

[0036] According to one embodiment of the present invention, Figure 2 As shown, GRU is used to share parameters between the feature screening modules 12 of the first channel 1 and the second channel 2, and GRU is used to share parameters between the feature screening modules 12 of the second channel 2 and the third channel 3. The first channel attention module CAB1, the second channel attention module CAB2, the third channel attention module CAB3, the fourth channel attention module CAB4 and the fifth channel attention module CAB5 in the feature screening module 12 share parameters using a jump connection module SC.

[0037] Specifically, the connection between the modules of the feature screening module 12 is as follows: Figure 2As shown in the figure, since the rain line texture distribution in the dataset is relatively uneven and the data volume is large, the features transmitted from the input rain map are transmitted for a long time, and the feature loss is relatively serious. Therefore, parameter sharing operation and structural design are adopted. Parameter sharing includes two parts, namely intra-channel parameter sharing and inter-channel parameter sharing.

[0038] The parameter sharing within a channel segment is divided into two parts, such as Figure 2 As shown in the figure, the first part is the jump connection block SC between the channel attention modules CAB. The channel attention module CAB enables the features to be reused. During the reuse process, the features transmitted are enhanced on the channel by the channel attention module CAB, and then passed to the subsequent modules. When the features extracted by the network are transmitted far away, the features will be weakened. The jump connection module SC effectively solves this problem. The second part is the features before the last convolution module of the first channel 1 and the second channel 2 are jumped and passed to the current channel output end through the jump connection module SC.

[0039] Inter-channel parameter sharing is also divided into two parts ( Figure 2 The first part is the output result of the current channel after passing through the eighth convolution module Conv8 and the sigmoid activation function layer, and before passing the feature to the feature screening module 12 of the next channel. The second part of parameter sharing is the parameter sharing of the corresponding modules between stages. GRU is added for feature screening during the sharing process, so that the features shared between channels are enhanced.

[0040] According to one embodiment of the present invention, Figure 3 As shown, the semantic information extraction module 11 may include: a ninth convolution module Conv9, a sixth channel attention module CAB6 and a long short-term memory network LSTM, the ninth convolution module Conv9 is used to extract features and convert them into feature maps, the sixth channel attention module CAB6 is used to extract semantic information on the channel based on contextual semantics, and the long short-term memory network LSTM is used to screen the semantic information.

[0041] Specifically, the working principle of the semantic information extraction module 11 is as follows: first, the ninth convolution module Conv9 is used, which can extract the rain line features of the input image to be detected and convert them into feature maps for subsequent network use. After the features extracted by the ninth convolution module Conv9 are passed to the sixth channel attention module CAB6, due to the large number of images, the amount of information such as rain lines is large, and most of this information is distributed on various channels of the image. The channel attention module has the ability to select relevant semantic information on the channel based on contextual semantics. At this time, the sixth channel attention module CAB6 is used to efficiently extract the semantic information on the channel. After extracting a large amount of semantic information, due to the large amount of rain line data, it is necessary to screen the rain lines and related feature information that block the foreground and background in the input rain image. The present invention uses a long short-term memory network LSTM to perform forgetting selection on the semantic information. The forget gate of LSTM can select important information and forget unimportant information. The long short-term memory network LSTM is expressed as follows:

[0042] i t =σ(W xi *X t +W hi *H t-1 +W ci ⊙C t-1 +b i ) (1)

[0043] f t =σ(W xf *X t +W hf *H t-1 +W cf ⊙C t-1 +b f ) (2)

[0044] C t =f t ⊙C t-1 +i t ⊙tanh(W xc *X t +W hc *H t-1 +b c ) (3)

[0045] o t =σ(W xo *X t +W ho *H t-1 +W co ⊙C t +b o ) (4)

[0046] Ht =o t ⊙tanh(C t ) (5)

[0047] Where X t represents the features extracted by the first convolutional layer, C t Used to encode cell stage features and pass them to subsequent LSTM, C t-1 Indicates that the previous stage LSTM is used to encode the cell stage features, H t represents the output of LSTM, H t-1 represents the output of the LSTM in the previous stage, * and ⊙ represent the convolution operation and the corresponding element multiplication operation respectively, σ represents the sigmoid activation function, W xi Represents the weight from the previous layer to the input gate, W hi represents the weight from the hidden layer to the input layer, W ci represents the weight from the output layer to the input layer, b i represents the bias of the input layer, b f represents the bias of the hidden layer, W xf Represents the weight from the previous layer to the forget gate, W h represents the weight from the hidden layer to the forget gate, W cf represents the weight from the output layer to the forget gate, f t Represents the output result of the forget gate, i t represents the result of the input gate, tanh represents the tanh activation function, W xc Represents the weight from the previous layer to the output layer, W hc represents the weight from the hidden layer to the output layer, b c represents the bias of the output layer, o t represents the feature map of stage t, W xo represents the feature weight of the previous layer, W ho represents the feature weight of the hidden layer, W co represents the feature weight of the output layer, b o Represents the bias of the output layer.

[0048] In general, the semantic information extraction module 11 can extract the most needed features at the beginning for subsequent modules to perform further feature screening and extraction, until the rain line information to be removed can be accurately extracted, and the feature extraction effect is good.

[0049] Further, according to one embodiment of the present invention, Figure 3 As shown, the semantic information extraction module 11 may further include: an excitation compression module SE, and the excitation compression module SE is used to randomly discard the filtered semantic information according to corresponding weights.

[0050] Specifically, the amount of data after being filtered by the long short-term memory network LSTM is still large. The excitation compression module SE can randomly discard important features selected by the long short-term memory network LSTM according to the corresponding weights, further improving the expressiveness of feature extraction.

[0051] In an embodiment of the present invention, during the generation process of the network, the loss function L is constructed by using Laplace loss and structural similarity loss. total .

[0052] Furthermore, the loss function L is obtained according to the following formula: total :

[0053] L ssim =1-f ssim (I o ,I gt )+ε1;

[0054]

[0055] L total =λ1L ssim +λ2L lapla ;

[0056] Among them, L ssim represents the structural similarity loss, L lapla represents the Laplace loss, L total represents the loss function, I o represents the first image, I gt represents the second image, f ssim (I o ,I gt ) represents the calculation of the first image I o and the second image I gt The structural similarity value of ε1 represents a minimum value, Δf(I o ) represents the first image I o Perform Laplace operation, Δf(I gt ) represents the second image I gt Perform Laplace operation, ||·|| 2 represents the sum of squares of the variables, ε2 represents another minimum value, and λ1 and λ2 represent the weights of the loss function.

[0057] Specifically, a combination of Laplace loss and structural similarity loss is used in the network generation process. Laplace loss can make the edges of the generated image closer to the real label image, and structural similarity loss can make the generated image more similar to the real label from the perspective of the human eye. The combination of the two achieves better results.

[0058] The removal device proposed in the present invention has the characteristics of being transferable and learnable. By training and testing the model in the device on the sample data of the public data set, different models are obtained for different data sets, and finally the reasoning results of the corresponding test set are inferred. PSNR (Peak Signal to Noise Ratio) and SSIM (Structural Similarity) are used to comprehensively evaluate the model reasoning results. When the rain line removal device of the present invention is used to remove rain lines from an image, a clear rain-free image can be obtained.

[0059] In summary, according to the rain line removal device in industrial detection according to the embodiment of the present invention, a progressive rain removal structure is adopted, and each time feature extraction is further performed based on the previous extraction result, thereby solving the problem of poor single-stage rain removal effect. The first two stages mainly use the channel attention module to further screen the voice information, which can efficiently extract the features on the channel. The last stage mainly uses the residual channel attention module, which can perform residual learning on the semantic information extracted by the channel attention module in the first two stages, further improving the feature extraction effect, so that the rain line information to be removed can be accurately extracted; in the network generation process, a combination of Laplace loss and structural similarity loss is used, Laplace loss can make the edge of the generated image more close to the real label image, and structural similarity loss can make the generated image more similar to the real label from the perspective of the human eye, and the combination of the two achieves a better effect; parameter sharing operation and structural design are adopted, and parameter sharing includes two parts, namely, intra-channel parameter sharing and inter-channel parameter sharing. The jump connection module SC is used for parameter sharing in the channel, which can solve the problem of feature weakening when the feature is transmitted far away. The inter-channel parameter sharing adopts GRU, convolution layer and sigmoid activation function layer, so that the shared features are enhanced.

[0060] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. "Multiple" means two or more, unless otherwise clearly and specifically defined.

[0061] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, the technical personnel in this field can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction. In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. Furthermore, those skilled in the art may combine and associate different embodiments or examples and features of different embodiments or examples described in this specification without mutual contradiction.

[0062] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.

[0063] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0064] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0065] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0066] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0067] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.

[0068] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A rain line removal device for industrial detection, characterized in that: include: A first channel, wherein an input end of the first channel is used to receive an image to be detected, and the first channel is used to extract features of the image to be detected and generate a first feature map; a second channel, wherein an input end of the second channel is connected to an output end of the first channel, and the second channel is used to extract features from the first feature map and generate a second feature map; a third channel, wherein an input end of the third channel is connected to an output end of the second channel, and the third channel is used to extract features from the second feature map and generate a derained image; Among them, the first channel, the second channel and the third channel include: a semantic information extraction module and a feature screening module, the semantic information extraction module is used to extract semantic information on the channel, and the feature screening module is used to screen the semantic information extracted by the semantic information extraction module and generate a feature map, wherein the feature screening modules of the first channel and the second channel include: a channel attention module CAB and a convolution module, and the feature screening module of the third channel includes: a residual channel attention module RCAB and a convolution module.

2. The rain line removal device in industrial detection according to claim 1 is characterized in that: The feature screening modules of the first channel and the second channel specifically include: a first convolution module, a first channel attention module, a second convolution module, a second channel attention module, a third convolution module, a fourth convolution module, a third channel attention module, a fifth convolution module, a fourth channel attention module, a sixth convolution module and a fifth channel attention module which are connected in series in sequence; The feature screening module of the third channel specifically includes: a first residual channel attention module, a second residual channel attention module, a third residual channel attention module and a seventh convolution module which are connected in series in sequence.

3. The rain line removal device in industrial detection according to claim 1 is characterized in that: Between the output end of the first channel and the input end of the second channel, and between the output end of the second channel and the input end of the third channel, there is also a series-connected eighth convolution module and a sigmoid activation function layer.

4. The rain line removal device in industrial detection according to claim 3 is characterized in that: The feature screening modules of the first channel and the second channel use GRU to share parameters, and the feature screening modules of the second channel and the third channel use GRU to share parameters.

5. The rain line removal device in industrial detection according to claim 4, characterized in that: A jump connection module is used to share parameters among the first channel attention module, the second channel attention module, the third channel attention module, the fourth channel attention module and the fifth channel attention module in the feature screening module.

6. The rain line removal device in industrial detection according to claim 1, characterized in that: The semantic information extraction module includes: a ninth convolution module, a sixth channel attention module and a long short-term memory network. The ninth convolution module is used to extract features and convert them into feature maps. The sixth channel attention module is used to extract semantic information on the channel based on contextual semantics. The long short-term memory network is used to screen the semantic information.

7. The rain line removal device in industrial detection according to claim 5, characterized in that: The semantic information extraction module further includes: an excitation compression module, which is used to randomly discard the filtered semantic information according to corresponding weights.

8. The rain line removal device for industrial detection according to any one of claims 1 to 7, characterized in that: The loss function is constructed using Laplace loss and structural similarity loss.

9. The rain line removal device in industrial detection according to claim 8, characterized in that: The loss function is obtained according to the following formula: L ssim =1-f ssim (I o ,I gt )+ε1; L total =λ1L ssim +λ2L lapla ; Among them, L ssim represents the structural similarity loss, L lapla Denotes the Laplace loss, L total represents the loss function, I o represents the first image, I gt represents the second image, f ssim (I o , I gt ) represents the calculation of the first image I o and the second image I gt The structural similarity value of ε1 represents a minimum value, Δf(I o ) represents the first image I o Perform Laplace operation, Δf(I gt ) represents the second image I gt Perform Laplace operation, ||·|| 2 represents the sum of squares of the variables, ε2 represents another minimum value, and λ1 and λ2 represent the weights of the loss function.