Visual abnormal state detection method for circuit board

The method enhances circuit board inspection by decomposing and reconstructing images using convolutional layers and attention wavelet transforms to improve clarity and accuracy under dark lighting conditions, addressing inefficiencies and errors in traditional manual and automated methods.

CN119251135AActive Publication Date: 2025-01-03WUHAN MARINE MACHINERY PLANT
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411052784.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2025-01-03
Estimated Expiration
2044-08-02

AI Technical Summary

Technical Problem

Traditional manual inspection of circuit board surface defects is inefficient and prone to human error, while existing automated visual inspection methods under normal lighting result in reflections and poor image clarity under low light conditions.

Method used

A method involving multiple convolutional layers and module groups to decompose, extract, and reconstruct circuit board images into sub-bands, using attention wavelet transforms and residual modules to enhance brightness and clarity, particularly under dark lighting conditions.

Benefits of technology

Improves image clarity and detail retention, enhancing the accuracy and stability of circuit board inspection by correcting dark-light images to normal brightness and reducing gradient issues.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251135A_ABST
    Figure CN119251135A_ABST
Patent Text Reader

Abstract

The invention discloses a method for detecting a visual abnormal state of a circuit board. The method comprises the following steps of: 1, acquiring a dark light picture; 2, acquiring a dark light feature map, decomposing the dark light feature map into a plurality of sub-bands with different frequencies, reconstructing all the sub-bands into a complete dark light feature map, and at the moment, obtaining illumination parameters; a third step of obtaining a dark light feature map, decomposing the dark light feature map into a plurality of sub-bands with different frequencies, performing brightness improvement on all the sub-bands according to illumination parameters, reconstructing all the sub-bands into a feature map with normal brightness, and outputting a picture with normal brightness; the circuit board picture shot under the dark light condition is corrected into the circuit board picture with normal brightness, so that the picture definition is relatively high; in the process, multiple times of screening are carried out to reserve key features in the sub-bands, so that the effective details of the picture are more. Therefore, the circuit board is good in picture definition, and the effective details of the picture are more.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a circuit board detection method, belonging to the technical field of visual state abnormality detection, and in particular to a circuit board visual abnormality detection method. Background Art

[0002] After the circuit board is manufactured, the surface defects of the electronic components on the circuit board need to be inspected to ensure the quality of the circuit board. However, the traditional manual inspection method requires a lot of manpower and time. It is not only inefficient, but also easily affected by human factors, resulting in false detection and missed detection. At present, a visual inspection method has emerged that takes pictures of the circuit board and then inspects the pictures.

[0003] A Chinese patent application with application number 202410437300.X and application date April 12, 2024 discloses a circuit board detection system and detection method, the detection system comprising a fixed frame a, rotating disks are rotatably provided at both ends of the fixed frame a, a belt is sleeved between the two rotating disks, a plurality of clamping units are provided between the two belts, and a detection unit is provided above the fixed frame a; the detection unit comprises a connecting frame a installed on the fixed frame a, and a linear drive member a is installed on the connecting frame a; although this design uses a camera to shoot the circuit board for visual inspection, thereby solving the problem of time-consuming and labor-intensive manual inspection, it still has the following defects:

[0004] If the circuit board is photographed under normal lighting conditions, there will be reflections on the surface of the circuit board, and the details of the electronic components on the surface of the circuit board cannot be retained in the reflections, so the circuit board needs to be photographed under low light conditions; but when this design is used under low light conditions, the brightness of the photographed circuit board image is darker, which will result in poor clarity of the photographed circuit board image.

[0005] The information disclosed in this background technology section is only intended to increase the understanding of the overall background of the application, and should not be regarded as acknowledging or suggesting in any form that the information constitutes the prior art already known to ordinary technicians in this field. Summary of the invention

[0006] The purpose of the present invention is to overcome the problem of poor clarity of circuit board images in the prior art and to provide a circuit board visual abnormal state detection method with better circuit board image clarity.

[0007] To achieve the above objectives, the technical solution of the present invention is:

[0008] A method for detecting visual abnormality of a circuit board comprises the following steps:

[0009] Step 1: First take a photo of the circuit board to get a dark light picture;

[0010] Step 2: First, the first convolutional layer convolves the dark light image to obtain a dark light feature map, and then starts the image calculation process. The image calculation process is as follows: the first image decomposition module group decomposes the dark light feature map into multiple sub-bands of different frequencies, and then the first image decomposition module group performs dimensionality reduction and feature extraction on all sub-bands to screen and retain key features in the sub-bands, and then the image stitching module group performs dimensionality reduction and feature extraction on all sub-bands to further screen and retain key features in the sub-bands, and then the image stitching module group reconstructs all sub-bands into a complete dark light feature map. At this time, multi-scale illumination parameters are obtained by the image calculation process;

[0011] Step 3: First, the second convolutional layer convolves the dark light picture to obtain a dark light feature map, and then the second image decomposition module group decomposes the dark light feature map into multiple sub-bands of different frequencies, and then the second image decomposition module group performs dimensionality reduction and feature extraction on all sub-bands to screen and retain the key features in the sub-bands, and then the image correction module group performs dimensionality reduction and feature extraction on all sub-bands to further screen and retain the key features in the sub-bands, and then the image correction module group converts the spatial domain of all sub-bands into the frequency domain to highlight the features that need dark light repair in the sub-bands, and then the image correction module group enhances the brightness of the features that need dark light repair in all sub-bands according to multi-scale illumination parameters, and then obtains sub-bands with normal illumination information, and then converts the sub-bands from the frequency domain to the spatial domain, and then the image correction module group reconstructs all sub-bands into feature maps with normal brightness, and then the third convolutional layer performs dimensionality reduction and feature extraction on the feature map to further increase the features, and then outputs a picture of normal brightness.

[0012] In the second step, the first image decomposition module group includes three first image decomposition modules, each of which decomposes the dark light feature map into multiple sub-bands of different frequencies, and then the first image decomposition module performs dimensionality reduction and feature extraction on all sub-bands.

[0013] In the second step, the first image decomposition module includes a first attention wavelet transform module and a first residual module. The first image decomposition module decomposes the dark-light feature map into multiple sub-bands of different frequencies. The first image decomposition module performs dimensionality reduction and feature extraction on all sub-bands. The first residual module performs dimensionality reduction and feature extraction on all sub-bands.

[0014] In the second step, the image stitching module group includes three image stitching modules, each image stitching module performs dimensionality reduction and feature extraction on all sub-bands, and then the image stitching module reconstructs all sub-bands into a complete dark-light feature map.

[0015] The image stitching module includes a stitching residual module and a stitching attention inverse wavelet transform module. The image stitching module performs dimensionality reduction and feature extraction on all sub-bands. The image stitching module reconstructs all sub-bands into a complete dark-light feature map. The stitching attention inverse wavelet transform module reconstructs all sub-bands into a complete dark-light feature map.

[0016] In the third step, the second image decomposition module group includes three second image decomposition modules, each of which decomposes the dark light feature map into multiple sub-bands of different frequencies, and then the second image decomposition module performs dimensionality reduction and feature extraction on all sub-bands.

[0017] In the third step, the second image decomposition module includes a second attention wavelet transform module and a second residual module. The second image decomposition module decomposes the dark-light feature map into multiple sub-bands of different frequencies. The second image decomposition module performs dimensionality reduction and feature extraction on all sub-bands. The second residual module performs dimensionality reduction and feature extraction on all sub-bands.

[0018] In the third step, the image correction module group includes three image correction modules, and the image correction modules all perform dimensionality reduction and feature extraction on all sub-bands, and then the image correction modules convert the spatial domains of all sub-bands into frequency domains to highlight the features in the sub-bands that need dark light restoration, and then the image correction modules enhance the brightness of the features in all sub-bands that need dark light restoration according to the illumination parameters, and then obtain the sub-bands with normal illumination information, and then convert the sub-bands from the frequency domain into the spatial domain, and then the image correction modules reconstruct all sub-bands into feature maps with normal brightness.

[0019] In the third step, the image correction module includes a correction residual module, a frequency feature transformation module and a correction attention inverse wavelet transformation module. The image correction module performs dimensionality reduction and feature extraction on all sub-bands; the image correction module converts the spatial domain of all sub-bands into the frequency domain; the frequency feature transformation module converts the spatial domain of all sub-bands into the frequency domain; the image correction module enhances the brightness of the features that need dark light repair in all sub-bands according to the lighting parameters; the image correction module reconstructs all sub-bands into feature maps with normal brightness; the correction attention inverse wavelet transformation module reconstructs all sub-bands into feature maps with normal brightness.

[0020] In the second step, a residual connection is set between the first image decomposition module group and the image stitching module group; in the third step, a residual connection is set between the second image decomposition module group and the image correction module group.

[0021] Compared with the prior art, the present invention has the following beneficial effects:

[0022] 1. In a circuit board visual abnormal state detection method of the present invention, the method comprises the following steps: the first step: first obtain a dark light picture of the circuit board; the second step: first convolve the dark light picture by the first convolution layer to obtain a dark light feature map, then decompose the dark light feature map into a plurality of sub-bands of different frequencies by the first image decomposition module group, and then reconstruct the plurality of sub-bands of different frequencies into a complete dark light feature map by the image stitching module group, at this time, obtain multi-scale illumination parameters; the third step: first convolve the dark light picture by the second convolution layer to obtain a dark light feature map, then decompose the dark light feature map into a plurality of sub-bands of different frequencies by the second image decomposition module group, then correct and reconstruct the sub-bands according to the multi-scale illumination parameters by the image correction module group to obtain a feature map with normal brightness, then convolve the feature map by the third convolution layer to further increase the features, and then output a picture of normal brightness. The advantages of the present invention also include:

[0023] First point: the present invention decomposes the feature map of the first image decomposition module group to obtain sub-bands of multiple frequencies, and then reconstructs the sub-bands of multiple frequencies by the image stitching module group to obtain multi-scale illumination parameters, and then decomposes the feature map of the second image decomposition module group to obtain sub-bands of multiple frequencies, and then the image correction module group performs brightness enhancement and reconstruction on the sub-bands according to the multi-scale illumination parameters to obtain a picture of normal brightness. Therefore, the present invention can correct the circuit board picture taken under dark light conditions to a circuit board picture of normal brightness, so the clarity of the circuit board picture is better;

[0024] Second point: The first image decomposition module group, the image stitching module group, the second image decomposition module group, and the image correction module group will all perform dimensionality reduction and feature extraction on the sub-bands, which not only reduces unnecessary features in the feature map, but also screens and retains key features in the sub-bands, so the image has more effective details;

[0025] Third point: Because the present invention can improve the clarity of the picture, and the picture has more effective details, it is conducive to the accurate recognition of the circuit board in the subsequent program;

[0026] Therefore, the circuit board image of the present invention has better clarity and more effective details.

[0027] 2. In a circuit board visual abnormal state detection method of the present invention, in the first step, the first image decomposition module group includes three first image decomposition modules, each of which includes a first attention wavelet transform module and a first residual module, and the image stitching module group includes three image stitching modules, and the image stitching module includes a stitching residual module and a stitching attention wavelet inverse transform module. When applied, the first attention wavelet transform module first decomposes the dark light feature map into multiple sub-bands of different frequencies, and then the first residual module performs dimensionality reduction and feature extraction on all sub-bands to screen and retain the key features in the sub-bands, and the aforementioned process is repeated three times; then the stitching residual module performs dimensionality reduction and feature extraction on all sub-bands to screen and retain the key features in the sub-bands, and then the stitching attention wavelet inverse transform module reconstructs the sub-bands into a complete dark light feature map, and the aforementioned process is repeated three times; the number of repetitions is large, so a more accurate multi-scale illumination parameter can be obtained, and the correction effect of the sub-band in the third step can be improved. Therefore, the illumination parameters of the present invention are more accurate.

[0028] 3. In a circuit board visual abnormal state detection method of the present invention, in the second step, the second image decomposition module group includes a second image decomposition module, each second image decomposition module includes an attention wavelet transform module and a second residual module, the image correction module group includes three image correction modules, the image correction module includes a correction residual module, a frequency feature transformation module and an attention wavelet inverse transformation module, when applied, the second attention wavelet transform module first decomposes the dark light feature map into multiple sub-bands of different frequencies, and then the second residual module performs dimensionality reduction and feature extraction on all sub-bands to screen and retain the key features in the sub-bands, and repeats the above process three times; then the correction residual module performs dimensionality reduction and feature extraction on all sub-bands to screen and retain the key features in the sub-bands, and then the frequency feature transformation module performs brightness enhancement on the dark light features of the sub-bands to complete the illumination correction, and then the attention wavelet inverse transformation module reconstructs the sub-bands into images with normal brightness, and repeats the above process three times; the correction residual module, the frequency feature transformation module and the attention wavelet inverse transformation module gradually improve the reconstructed image accuracy during repeated processing. Therefore, the image accuracy of the present invention is high.

[0029] 4. In a circuit board visual abnormal state detection method of the present invention, in the second step, a residual connection is set between the first image decomposition module group and the image stitching module group; in the third step, a residual connection is set between the second image decomposition module group and the image correction module group. When applied, the residual connection can effectively solve the gradient disappearance and gradient explosion problems when the present invention is used, and improve the stability of the present invention during use. Therefore, the stability of the present invention is better. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1It is a structural schematic diagram of the present invention.

[0031] Figure 2 yes Figure 1 Schematic diagram of the structure of the first image decomposition module group.

[0032] Figure 3 yes Figure 2 Schematic diagram of the structure of the first image decomposition module.

[0033] Figure 4 yes Figure 1 Schematic diagram of the structure of the image stitching module group.

[0034] Figure 5 yes Figure 4 Schematic diagram of the structure of the image stitching module.

[0035] Figure 6 yes Figure 1 Schematic diagram of the structure of the second image decomposition module group.

[0036] Figure 7 yes Figure 6 Schematic diagram of the structure of the second image decomposition module.

[0037] Figure 8 yes Figure 1 Schematic diagram of the structure of the image correction module group.

[0038] Fig. 9 yes Figure 8 Schematic diagram of the structure of the image correction module.

[0039] Fig.10 It is a schematic diagram of the structure of the circuit board in Example 1.

[0040] Fig.11 yes Figure 3 Schematic diagram of the structure of the first residual module in .

[0041] Fig.12 It is a schematic diagram of the application results of the present invention.

[0042] In the figure: the first convolution layer 1, the first image decomposition module group 2, the first image decomposition module 21, the first attention wavelet transform module 211, the first residual module 212, the image stitching module group 3, the image stitching module 31, the stitching residual module 311, the stitching attention inverse wavelet transform module 312, the second convolution layer 4, the second image decomposition module group 5, the second image decomposition module 51, the second attention wavelet transform module 511, the second residual module 512, the image correction module group 6, the image correction module 61, the corrected residual module 611, the frequency feature transformation module 612, the corrected attention inverse wavelet transform module 613, the third convolution layer 7, the residual connection 8, the circuit board 9, the convolution layer 101, and the activation layer 102. DETAILED DESCRIPTION

[0043] The present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0044] See also Figure 1 — Fig.12 , a circuit board visual abnormal state detection method, the method comprising the following steps:

[0045] Step 1: first take a picture of the circuit board 9 to obtain a dark light picture;

[0046] Step 2: First, the first convolution layer 1 convolves the dark light image to obtain a dark light feature map, and then starts the image calculation process. The image calculation process is: the first image decomposition module group 2 decomposes the dark light feature map into multiple sub-bands of different frequencies, and then the first image decomposition module group 2 performs dimensionality reduction and feature extraction on all sub-bands to screen and retain key features in the sub-bands, and then the image stitching module group 3 performs dimensionality reduction and feature extraction on all sub-bands to further screen and retain key features in the sub-bands, and then the image stitching module group 3 reconstructs all sub-bands into a complete dark light feature map. At this time, multi-scale illumination parameters are obtained by the image calculation process;

[0047] Step 3: First, the second convolution layer 4 convolves the dark light picture to obtain a dark light feature map, and then the second image decomposition module group 5 decomposes the dark light feature map into multiple sub-bands of different frequencies, and then the second image decomposition module group 5 performs dimensionality reduction and feature extraction on all sub-bands to screen and retain the key features in the sub-bands, and then the image correction module group 6 performs dimensionality reduction and feature extraction on all sub-bands to further screen and retain the key features in the sub-bands, and then the image correction module group 6 converts the spatial domains of all sub-bands into frequency domains to highlight the features that need dark light repair in the sub-bands, and then the image correction module group 6 enhances the brightness of the features that need dark light repair in all sub-bands according to multi-scale illumination parameters, and then obtains sub-bands with normal illumination information, and then converts the sub-bands from the frequency domain to the spatial domain, and then the image correction module group 6 reconstructs all sub-bands into feature maps with normal brightness, and then the third convolution layer 7 performs dimensionality reduction and feature extraction on the feature map to further increase the features, and then outputs a picture of normal brightness.

[0048] In the second step, the first image decomposition module group 2 includes three first image decomposition modules 21, each of which decomposes the dark light feature map into multiple sub-bands of different frequencies, and then the first image decomposition module 21 performs dimensionality reduction and feature extraction on all sub-bands.

[0049] In the second step, the first image decomposition module 21 includes a first attention wavelet transform module 211 and a first residual module 212. The first image decomposition module 21 decomposes the dark-light feature map into multiple sub-bands of different frequencies. The first image decomposition module 21 performs dimensionality reduction and feature extraction on all sub-bands. The first residual module 212 performs dimensionality reduction and feature extraction on all sub-bands.

[0050] In the second step, the image stitching module group 3 includes three image stitching modules 31, each image stitching module 31 performs dimensionality reduction and feature extraction on all sub-bands, and then the image stitching module 31 reconstructs all sub-bands into a complete dark-light feature map.

[0051] The image stitching module 31 includes a stitching residual module 311 and a stitching attention inverse wavelet transform module 312. The image stitching module 31 performs dimensionality reduction and feature extraction on all sub-bands. The image stitching module 31 reconstructs all sub-bands into a complete dark-light feature map. The stitching attention inverse wavelet transform module 312 reconstructs all sub-bands into a complete dark-light feature map.

[0052] In the third step, the second image decomposition module group 5 includes three second image decomposition modules 51, each of which decomposes the dark light feature map into multiple sub-bands of different frequencies, and then the second image decomposition module 51 performs dimensionality reduction and feature extraction on all sub-bands.

[0053] In the third step, the second image decomposition module 51 includes a second attention wavelet transform module 511 and a second residual module 512. The second image decomposition module 51 decomposes the dark-light feature map into multiple sub-bands of different frequencies. The second image decomposition module 51 performs dimensionality reduction and feature extraction on all sub-bands. The second residual module 512 performs dimensionality reduction and feature extraction on all sub-bands.

[0054] In the third step, the image correction module group 6 includes three image correction modules 61, and the image correction modules 61 perform dimensionality reduction and feature extraction on all sub-bands, and then the image correction modules 61 convert the spatial domains of all sub-bands into frequency domains to highlight the features in the sub-bands that need dark light restoration, and then the image correction modules 61 enhance the brightness of the features in all sub-bands that need dark light restoration according to the illumination parameters, and then obtain the sub-bands with normal illumination information, and then convert the sub-bands from the frequency domain into the spatial domain, and then the image correction modules 61 reconstruct all sub-bands into feature maps with normal brightness.

[0055] In the third step, the image correction module 61 includes a correction residual module 611, a frequency feature transformation module 612 and a correction attention inverse wavelet transform module 613. The image correction module 61 performs dimensionality reduction and feature extraction on all sub-bands. The correction residual module 611 performs dimensionality reduction and feature extraction on all sub-bands; the image correction module 61 converts the spatial domain of all sub-bands into the frequency domain. The frequency feature transformation module 612 converts the spatial domain of all sub-bands into the frequency domain; the image correction module 61 enhances the brightness of the features that need dark light repair in all sub-bands according to the illumination parameters. The frequency feature transformation module 612 enhances the brightness of the features that need dark light repair in all sub-bands according to the illumination parameters; the image correction module 61 reconstructs all sub-bands into feature maps with normal brightness. The correction attention inverse wavelet transform module 613 reconstructs all sub-bands into feature maps with normal brightness.

[0056] In the second step, a residual connection 8 is set between the first image decomposition module group 2 and the image stitching module group 3; in the third step, a residual connection 8 is set between the second image decomposition module group 5 and the image correction module group 6.

[0057] The supplementary description of the present invention is as follows:

[0058] The effect of the present invention on dark light pictures is improved as follows: Fig.12 The signal-to-noise ratio of the present invention is 28.32, and that of the prior art is 25.63. Compared with the prior art, the signal-to-noise ratio of the present invention is improved to a certain extent, that is, the available information in the dark-light picture is improved; the structural similarity of the present invention is 0.863, and the structural similarity in the prior art is 0.822. Compared with the prior art, the structural similarity of the present invention is improved to a certain extent, that is, the structural information about the circuit board 9 carried in the dark-light picture is improved; the fault detection accuracy of the present invention is 87.33%, and that of the prior art is 85.02%. Compared with the prior art, the fault detection accuracy of the present invention is improved to a certain extent, that is, the accuracy of detecting the circuit board 9 is improved.

[0059] Embodiment 1:

[0060] See also Figure 1 — Fig.12 , a circuit board visual abnormal state detection method, the method comprising the following steps:

[0061] Step 1: first take a picture of the circuit board 9 to obtain a dark light picture;

[0062] Step 2: First, the first convolution layer 1 convolves the dark light image to obtain a dark light feature map, and then starts the image calculation process. The image calculation process is: the first image decomposition module group 2 decomposes the dark light feature map into multiple sub-bands of different frequencies, and then the first image decomposition module group 2 performs dimensionality reduction and feature extraction on all sub-bands to screen and retain key features in the sub-bands, and then the image stitching module group 3 performs dimensionality reduction and feature extraction on all sub-bands to further screen and retain key features in the sub-bands, and then the image stitching module group 3 reconstructs all sub-bands into a complete dark light feature map. At this time, multi-scale illumination parameters are obtained by the image calculation process;

[0063] Step 3: First, the second convolution layer 4 convolves the dark light picture to obtain a dark light feature map, and then the second image decomposition module group 5 decomposes the dark light feature map into multiple sub-bands of different frequencies, and then the second image decomposition module group 5 performs dimensionality reduction and feature extraction on all sub-bands to screen and retain the key features in the sub-bands, and then the image correction module group 6 performs dimensionality reduction and feature extraction on all sub-bands to further screen and retain the key features in the sub-bands, and then the image correction module group 6 converts the spatial domains of all sub-bands into frequency domains to highlight the features that need dark light repair in the sub-bands, and then the image correction module group 6 enhances the brightness of the features that need dark light repair in all sub-bands according to multi-scale illumination parameters, and then obtains sub-bands with normal illumination information, and then converts the sub-bands from the frequency domain to the spatial domain, and then the image correction module group 6 reconstructs all sub-bands into feature maps with normal brightness, and then the third convolution layer 7 performs dimensionality reduction and feature extraction on the feature map to further increase the features, and then outputs a picture of normal brightness.

[0064] Embodiment 2:

[0065] The basic content is the same as that of Example 1, except that:

[0066] See also Figure 1 — Figure 5In the second step, the first image decomposition module group 2 includes three first image decomposition modules 21, each of which decomposes the dark-light feature map into multiple sub-bands of different frequencies, and then the first image decomposition module 21 performs dimensionality reduction and feature extraction on all sub-bands. In the second step, the first image decomposition module 21 includes a first attention wavelet transform module 211 and a first residual module 212. The first image decomposition module 21 decomposes the dark-light feature map into multiple sub-bands of different frequencies. The first image decomposition module 21 performs dimensionality reduction and feature extraction on all sub-bands. The first residual module 212 performs dimensionality reduction and feature extraction on all sub-bands. In the second step, the image stitching module group 3 includes three image stitching modules 31, each image stitching module 31 performs dimensionality reduction and feature extraction on all sub-bands, and then the image stitching module 31 performs dimensionality reduction and feature extraction on all sub-bands, and then the image stitching module 31 reconstructs all sub-bands into a complete dark-light feature map. The image stitching module 31 includes a stitching residual module 311 and a stitching attention inverse wavelet transform module 312, and the image stitching module 31 performs dimensionality reduction and feature extraction on all sub-bands. The stitching residual module 311 performs dimensionality reduction and feature extraction on all sub-bands, and the image stitching module 31 reconstructs all sub-bands into a complete dark-light feature map. The stitching attention inverse wavelet transform module 312 reconstructs all sub-bands into a complete dark-light feature map.

[0067] When applied, the first first attention wavelet transform module 211 first decomposes the dark-light picture feature map into multiple sub-bands of different frequencies, and then the first first residual module 212 performs dimensionality reduction and feature extraction on all sub-bands, and then the second first attention wavelet transform module 211 decomposes the dark-light picture feature map into multiple sub-bands of different frequencies, and then the second first residual module 212 performs dimensionality reduction and feature extraction on all sub-bands, and then the third first attention wavelet transform module 211 decomposes the dark-light picture feature map into multiple sub-bands of different frequencies, and then the third first residual module 212 performs dimensionality reduction and feature extraction on all sub-bands. At this time, sufficient sub-bands with rich frequencies can be obtained; Then, the first stitching residual module 311 performs dimensionality reduction and feature extraction on all sub-bands, and then the first stitching attention inverse wavelet transform module 312 reconstructs all sub-bands into a complete dark-light feature map. Then, the second stitching residual module 311 performs dimensionality reduction and feature extraction on all sub-bands, and then the second stitching attention inverse wavelet transform module 312 reconstructs all sub-bands into a complete dark-light feature map. Then, the third stitching residual module 311 performs dimensionality reduction and feature extraction on all sub-bands, and then the third stitching attention inverse wavelet transform module 312 reconstructs all sub-bands into a complete dark-light feature map. At this time, a large number of multi-scale illumination parameters can be obtained for use by the image correction module 61.

[0068] Embodiment 3:

[0069] The basic content is the same as that of Example 1, except that:

[0070] See also Figure 1 — Fig. 9In the third step, the second image decomposition module group 5 includes three second image decomposition modules 51, each of which decomposes the dark-light feature map into multiple sub-bands of different frequencies, and then the second image decomposition module 51 performs dimensionality reduction and feature extraction on all sub-bands. In the third step, the second image decomposition module 51 includes a second attention wavelet transform module 511 and a second residual module 512, each of which decomposes the dark-light feature map into multiple sub-bands of different frequencies, and then the second image decomposition module 51 performs dimensionality reduction and feature extraction on all sub-bands. The second residual module 512 performs dimensionality reduction and feature extraction on all sub-bands. In the third step, the image correction module group 6 includes three image correction modules 61, and the image correction modules 61 perform dimensionality reduction and feature extraction on all sub-bands, and then the image correction modules 61 convert the spatial domains of all sub-bands into frequency domains to highlight the features in the sub-bands that need dark light restoration, and then the image correction modules 61 enhance the brightness of the features in all sub-bands that need dark light restoration according to the illumination parameters, and then obtain the sub-bands with normal illumination information, and then convert the sub-bands from the frequency domain into the spatial domain, and then the image correction modules 61 reconstruct all sub-bands into feature maps with normal brightness. In the third step, the image correction module 61 includes a correction residual module 611, a frequency feature transformation module 612 and a correction attention inverse wavelet transform module 613. The image correction module 61 performs dimensionality reduction and feature extraction on all sub-bands. The correction residual module 611 performs dimensionality reduction and feature extraction on all sub-bands; the image correction module 61 converts the spatial domain of all sub-bands into the frequency domain. The frequency feature transformation module 612 converts the spatial domain of all sub-bands into the frequency domain; the image correction module 61 enhances the brightness of the features that need dark light repair in all sub-bands according to the illumination parameters. The frequency feature transformation module 612 enhances the brightness of the features that need dark light repair in all sub-bands according to the illumination parameters; the image correction module 61 reconstructs all sub-bands into feature maps with normal brightness. The correction attention inverse wavelet transform module 613 reconstructs all sub-bands into feature maps with normal brightness.

[0071] When applied, the first second attention wavelet transform module 511 first decomposes the dark-light feature map into multiple sub-bands of different frequencies, and then the first second residual module 512 performs dimensionality reduction and feature extraction on all sub-bands, and then the second second attention wavelet transform module 511 decomposes the dark-light feature map into multiple sub-bands of different frequencies, and then the second second residual module 512 performs dimensionality reduction and feature extraction on all sub-bands, and then the third second attention wavelet transform module 511 decomposes the dark-light feature map into multiple sub-bands of different frequencies, and then the third second residual module 512 performs dimensionality reduction and feature extraction on all sub-bands; at this time, enough and rich sub-bands can be obtained; then the first corrected residual module 611 performs dimensionality reduction and feature extraction on all sub-bands, and then the first frequency feature transformation module 612 converts the spatial domain of all sub-bands into the frequency domain, and then the first frequency feature transformation module 612 performs brightness enhancement on the features that need dark-light repair in all sub-bands according to multi-scale illumination parameters, and then the first corrected attention wavelet inversion module 612 performs brightness enhancement on the features that need dark-light repair in all sub-bands. The conversion module 613 reconstructs all sub-bands into feature maps with normal brightness, and then the second correction residual module 611 performs dimensionality reduction and feature extraction on all sub-bands, and then the second frequency feature conversion module 612 converts the spatial domain of all sub-bands into the frequency domain, and then the second frequency feature conversion module 612 enhances the brightness of the features that need dark light repair in all sub-bands according to the multi-scale illumination parameters, and then the second correction attention inverse wavelet transform module 613 reconstructs all sub-bands into feature maps with normal brightness, and then the third correction residual module 611 performs dimensionality reduction and feature extraction on all sub-bands, and then the third frequency feature conversion module 612 converts the spatial domain of all sub-bands into the frequency domain, and then the third frequency feature conversion module 612 enhances the brightness of the features that need dark light repair in all sub-bands according to the multi-scale illumination parameters, and then the third correction attention inverse wavelet transform module 613 reconstructs all sub-bands into feature maps with normal brightness; in the aforementioned process, the obtained feature map with normal brightness gradually becomes more refined.

[0072] Embodiment 4:

[0073] The basic content is the same as that of Example 1, except that:

[0074] See also Figure 1 — Fig.10In the second step, a residual connection 8 is provided between the first image decomposition module group 2 and the image stitching module group 3; in the third step, a residual connection 8 is provided between the second image decomposition module group 5 and the image correction module group 6. Preferably, the residual connection 8 provided between the first image decomposition module group 2 and the image stitching module group 3 is a residual connection 8 provided between the first residual module 212 and the stitching residual module 311, and the residual connection 8 provided between the second image decomposition module group 5 and the image correction module group 6 is a residual connection 8 provided between the second residual module 512 and the correction residual module 611.

[0075] When applied, when the spliced ​​residual module 311 has a gradient vanishing or gradient exploding problem, the first residual module 212 shares the sub-band with the spliced ​​residual module 311 to remove the influence of the gradient vanishing or gradient exploding problem; when the corrected residual module 611 has a gradient vanishing or gradient exploding problem, the second residual module 512 shares the sub-band with the spliced ​​residual module 311 to remove the influence of the gradient vanishing or gradient exploding problem.

[0076] Embodiment 5:

[0077] The basic content is the same as that of Example 1, except that:

[0078] See also Figure 1 — Fig.11 , the first residual module 212, the stitching residual module 311, the second residual module 512, and the modified residual module 611 have the same structure, the first residual module 212 includes a convolution layer 101, an activation layer 102 and a convolution layer 101; the frequency transformation feature module includes a convolution layer 101, an activation layer 102 and a convolution layer 101; the PReLU function used in the activation layer 102 is:

[0079]

[0080] Where α is a constant or a parameter for adaptive adjustment.

[0081] When applied, the convolution layer 101 is used to extract features, and then the PReLU function in the activation layer 102 performs nonlinear mapping on the features, thereby improving the accuracy of brightness enhancement of the features of dark light restoration; in order to prevent the overflow risk caused by excessive data when using this method, the original ReLU function is:

[0082]

[0083] Where α is a constant or a parameter for adaptive adjustment;

[0084] Optimized to PReLU function:

[0085]

[0086] Compared with the ReLU function, in the negative value domain, although the slope of the PReLU function is relatively small, it is a linear operation, α will not tend to zero, will not cause the Dead ReLU problem, and therefore will not cause overflow risk; α is a constant, or an adaptively adjusted parameter, so the PReLU function can update α during back propagation to improve the accuracy of α.

[0087] The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiment. Any equivalent modifications or changes made by ordinary technicians in this field based on the contents disclosed by the present invention should be included in the protection scope recorded in the claims.

Claims

1. A circuit board visual abnormal state detection method, characterized in that: The method comprises the following steps: Step 1: first photograph the circuit board (9) to obtain a dark light image; Step 2: First, the first convolution layer (1) performs convolution on the dark light image to obtain a dark light feature map, and then starts the image calculation process. The image calculation process is as follows: the first image decomposition module group (2) decomposes the dark light feature map into multiple sub-bands of different frequencies, and then the first image decomposition module group (2) performs dimensionality reduction and feature extraction on all sub-bands to screen and retain key features in the sub-bands, and then the image stitching module group (3) performs dimensionality reduction and feature extraction on all sub-bands to further screen and retain key features in the sub-bands, and then the image stitching module group (3) reconstructs all sub-bands into a complete dark light feature map. At this time, multi-scale illumination parameters are obtained by the image calculation process; Step 3: First, the second convolution layer (4) performs convolution on the dark light image to obtain a dark light feature map, and then the second image decomposition module group (5) decomposes the dark light feature map into multiple sub-bands of different frequencies. Then, the second image decomposition module group (5) performs dimensionality reduction and feature extraction on all sub-bands to screen and retain key features in the sub-bands. Then, the image correction module group (6) performs dimensionality reduction and feature extraction on all sub-bands to further screen and retain key features in the sub-bands. Then, the image correction module group (6) converts the spatial domain of all sub-bands into the frequency domain to highlight the features that need dark light repair in the sub-bands. Then, the image correction module group (6) increases the brightness of the features that need dark light repair in all sub-bands according to multi-scale illumination parameters, and then obtains sub-bands with normal illumination information. Then, the sub-bands are converted from the frequency domain to the spatial domain. Then, the image correction module group (6) reconstructs all sub-bands into feature maps with normal brightness. Then, the third convolution layer (7) performs dimensionality reduction and feature extraction on the feature map to further increase features, and then outputs a normal brightness image.

2. A circuit board visual abnormal state detection method according to claim 1, characterized in that: In the second step, the first image decomposition module group (2) includes three first image decomposition modules (21), each of which decomposes the dark-light feature map into a plurality of sub-bands of different frequencies, and then the first image decomposition module (21) performs dimensionality reduction and feature extraction on all sub-bands.

3. A circuit board visual abnormal state detection method according to claim 2, characterized in that: In the second step, the first image decomposition module (21) includes a first attention wavelet transform module (211) and a first residual module (212), and the first image decomposition module (21) decomposes the dark-light feature map into multiple sub-bands of different frequencies. The first image decomposition module (21) performs dimensionality reduction and feature extraction on all sub-bands. The first residual module (212) performs dimensionality reduction and feature extraction on all sub-bands.

4. A circuit board visual abnormal state detection method according to claim 3, characterized in that: In the second step, the image stitching module group (3) includes three image stitching modules (31), each image stitching module (31) performs dimensionality reduction and feature extraction on all sub-bands, and then the image stitching module (31) performs dimensionality reduction and feature extraction on all sub-bands, and then the image stitching module (31) reconstructs all sub-bands into a complete dark-light feature map.

5. A circuit board visual abnormal state detection method according to claim 4, characterized in that: The image stitching module (31) comprises a stitching residual module (311) and a stitching attention inverse wavelet transform module (312). The image stitching module (31) performs dimensionality reduction and feature extraction on all sub-bands. The image stitching module (31) reconstructs all sub-bands into a complete dark-light feature map. The stitching attention inverse wavelet transform module (312) reconstructs all sub-bands into a complete dark-light feature map.

6. A circuit board visual abnormal state detection method according to claim 1, characterized in that: In the third step, the second image decomposition module group (5) includes three second image decomposition modules (51), each of which decomposes the dark-light feature map into a plurality of sub-bands of different frequencies, and then the second image decomposition module (51) performs dimensionality reduction and feature extraction on all the sub-bands.

7. A circuit board visual abnormal state detection method according to claim 6, characterized in that: In the third step, the second image decomposition module (51) includes a second attention wavelet transform module (511) and a second residual module (512), and the second image decomposition module (51) decomposes the dark-light feature map into multiple sub-bands of different frequencies. The second image decomposition module (51) performs dimensionality reduction and feature extraction on all sub-bands, and the second residual module (512) performs dimensionality reduction and feature extraction on all sub-bands.

8. A circuit board visual abnormal state detection method according to claim 7, characterized in that: In the third step, the image correction module group (6) includes three image correction modules (61), and the image correction modules (61) perform dimensionality reduction and feature extraction on all sub-bands. The image correction modules (61) then convert the spatial domains of all sub-bands into frequency domains to highlight the features in the sub-bands that require dark light restoration. The image correction modules (61) then enhance the brightness of the features in all sub-bands that require dark light restoration according to the illumination parameters, and then obtain sub-bands with normal illumination information. The sub-bands are then converted from the frequency domain into the spatial domain, and then the image correction modules (61) reconstruct all sub-bands into feature maps with normal brightness.

9. A circuit board visual abnormal state detection method according to claim 8, characterized in that: In the third step, the image correction module (61) includes a correction residual module (611), a frequency feature conversion module (612) and a correction attention inverse wavelet transform module (613). The image correction module (61) performs dimensionality reduction and feature extraction on all sub-bands. The image correction module (61) converts the spatial domain of all sub-bands into the frequency domain. The frequency feature conversion module (612) converts the spatial domain of all sub-bands into the frequency domain. The image correction module (61) enhances the brightness of features that need dark light repair in all sub-bands according to illumination parameters. The frequency feature conversion module (612) enhances the brightness of features that need dark light repair in all sub-bands according to illumination parameters. The image correction module (61) reconstructs all sub-bands into feature maps with normal brightness. The correction attention inverse wavelet transform module (613) reconstructs all sub-bands into feature maps with normal brightness.

10. The circuit board visual abnormal state detection method according to claim 1, characterized in that: In the second step, a residual connection (8) is provided between the first image decomposition module group (2) and the image stitching module group (3); and in the third step, a residual connection (8) is provided between the second image decomposition module group (5) and the image correction module group (6).

Citation Information

Patent Citations

  • Defect detection method for parameter optimization based on space particle automatic attraction algorithm

    CN113689427A

  • Semiconductor silicon wafer detection method and device based on frequency decoupling supervision and medium

    CN116309612A

  • Defect detection method for carbon fiber prepreg based on fusion depth separable convolution YOLOv8

    CN118379276A

  • Apparatus and method for contrast enhancement using dominant brightness level and adaptive intensity transformation

    KR1020130066966A

  • Method for image processing and video compression

    US20180240221A1