Image Stain Detection Method and System Based on Convolutional Neural Network

Through the image dirty detection system based on convolutional neural network, the problems of slow detection speed and poor support for high pixels in the prior art are solved, and efficient and accurate image dirty detection is achieved.

CN114359253BActive Publication Date: 2025-06-03SHINE OPTICS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210033444.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-12
Publication Date
2025-06-03
Estimated Expiration
2042-01-12

AI Technical Summary

Technical Problem

The prior art detects the dirty image of the camera module, which is slower, cannot keep up with the increasing detection demand, and has poor support for high pixels, resulting in low detection efficiency and low accuracy.

Method used

The image dirty detection system based on convolutional neural network is adopted. The convolutional neural network model is trained to detect dirty in the image, and the preliminary verification and batch verification modules are used to ensure the accuracy and efficiency of the detection results.

Benefits of technology

The speed of image detection is significantly improved, from second to millisecond level, improving detection efficiency, and supporting detection of high-pixel images while ensuring accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114359253B_ABST
    Figure CN114359253B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of image detection, and specifically discloses an image stain detection method and system based on a convolutional neural network. The system includes: a training module for inputting the images in the training image set into a convolutional neural network model for training; a preliminary verification module for obtaining the images of defective camera modules, inputting them into the convolutional neural network model after training, and judging whether the accuracy rate meets a preset standard based on the detection results of the convolutional neural network model; a batch verification module for obtaining the images of camera modules on the production line, inputting them into the trained convolutional neural network model, comparing the detection results output by the convolutional neural network model with the original detection results on the production line, and judging whether the fitting degree exceeds a first threshold. If it exceeds, the convolutional neural network model is marked as verified. By adopting the technical solution of the present invention, the detection efficiency can be improved while ensuring the accuracy rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image detection, and particularly relates to an image stain detection method and system based on a convolutional neural network. Background Art

[0002] The stain of an image, also known as POG, Blemish, or defect, is caused by dust and dirt on the camera filter, internal lens of the lens, and the surface, which are imaged on the chip. The stain of an image has always been a very common and important problem in the manufacturing of camera modules.

[0003] In order to achieve stain detection, texture analysis methods, detection methods based on edge segmentation, etc. are often used at present. These methods include steps such as enhancing the target image area, segmenting and extracting the stain, calibrating the position and calculating the size of the stain area, and extracting and classifying the stain features. However, the above methods also have the following problems:

[0004] 1. The detection speed is relatively slow. Currently, the time required to detect one camera module is about 3 seconds, which is slow and inefficient, and cannot meet the increasing detection requirements of camera modules.

[0005] 2. The support for high pixels is poor. Currently, the pixels of camera modules have exceeded 50 million, and some are even as high as 100 million pixels. For such high-pixel camera modules, due to more pixels and larger data volume to be transmitted, the detection time required will be more, resulting in further reduced efficiency. Even some detection methods do not support high pixels and need to be downscaled. For example, 4 pixel points are combined into 1 pixel point, and the image pixels are reduced before detection. During the combination process, it is easy to mask the dirt points of individual pixels, resulting in inaccurate detection.

[0006] For the above reasons, there is a need for an image stain detection method and system based on a convolutional neural network that can improve the detection efficiency while ensuring the accuracy. Summary of the Invention

[0007] One of the purposes of the present invention is to provide an image stain detection method and system based on a convolutional neural network, which can improve the detection efficiency while ensuring the accuracy.

[0008] To solve the above technical problems, the present application provides the following technical solutions:

[0009] An image stain detection system based on a convolutional neural network, comprising:

[0010] An acquisition module, configured to obtain a training image set, and all the images in the training image set have stain marks;

[0011] A training module, which pre-stores a convolutional neural network model and is used to input the images in the training image set into the convolutional neural network model for training to obtain a convolutional neural network model with training completed;

[0012] A preliminary verification module, which is used to obtain the images of defective camera modules, input them into the convolutional neural network model with training completed, and judge whether the accuracy rate meets the preset standard based on the detection results of the convolutional neural network model. If it meets the standard, it is marked as a convolutional neural network model with training completed. If it does not meet the standard, the misjudged images are obtained, a misjudged image set is established, and the convolutional neural network model is trained again based on the misjudged image set until the accuracy rate meets the preset standard;

[0013] A batch verification module, which is used to obtain the images of camera modules on the production line, input them into the convolutional neural network model with training completed, and compare the detection results output by the convolutional neural network model with the original detection results on the production line to judge whether the fitting degree between the detection results of the convolutional neural network model and the original detection results on the production line exceeds the first threshold. If it exceeds, it is marked as a convolutional neural network model with verification passed.

[0014] The principle and beneficial effects of the basic solution are as follows:

[0015] In this solution, a convolutional neural network model is used to detect the dirt on the image, which can improve the detection speed of a single image from the second level to the millisecond level, thus greatly improving the detection efficiency. To solve the accuracy problem, this solution first uses a large number of images with dirt markings to train the convolutional neural network model, so that the convolutional kernels of the convolutional neural network model are initially formed. Then, the neural network model with training completed is separately and preliminarily verified, that is, the process on the production line is simulated, the images of defective camera modules are input into the convolutional neural network model, and it is judged whether it is correct based on the detection results of the convolutional neural network model. After multiple tests, the accuracy rate can be statistically calculated, so as to judge whether the accuracy rate meets the preset standard. If it meets the preset standard, for example, the accuracy rate is 99%, it proves that the convolutional neural network model already meets the usage requirements and is marked as a convolutional neural network model with training completed. If it does not meet the preset standard, training continues. At this time, if the convolutional neural network model with training completed is directly used on the production line, problems may occur. For example, the accuracy rate of the convolutional neural network model decreases and the misjudgment rate increases in actual production, which will affect the normal operation of the entire production line. Therefore, in this solution, in normal production detection, the original detection method of the production line is still retained, and the convolutional neural network model and the original detection method are used for inspection at the same time until the fitting degree between the detection results of the convolutional neural network model and the original detection results on the production line exceeds the first threshold, and then the convolutional neural network model is considered to have passed the verification, ensuring that after using the convolutional neural network model for detection, the accuracy rate is not affected and the production line can run smoothly without interruption.

[0016] Furthermore, the detection result includes the defect coordinates and the gray value at the coordinate position.

[0017] The position of the dirt can be determined through the defect coordinates.

[0018] Furthermore, it further includes a screening module that pre-stores an image determination standard. The image determination standard includes the regional division of the image and the control threshold for the corresponding region. The screening module is used to determine the region to which the defect coordinates belong, and then judge whether the gray value at the coordinate position exceeds the control threshold of the corresponding region. If it exceeds, it is judged as a defective image.

[0019] Because there is a shading phenomenon in the image of the camera module, that is, the light intensity received by the edge area of the image sensor of the camera module is smaller than that of the central area, resulting in the phenomenon that the brightness of the center and the four corners is inconsistent. Therefore, the requirements for intercepting the severity of dirt in different regions of the image are different. Therefore, different control thresholds are set for different regions in the image to distinguish and intercept.

[0020] Furthermore, the training image set includes several images with different pixels, different aspect ratios, and different color temperatures.

[0021] It can make the convolutional neural network model more adaptable.

[0022] Furthermore, the production line includes several stations, and each station includes a detection module. The batch verification module is used to obtain the images of the camera modules at the selected stations on the production line, input them into the trained convolutional neural network model, and compare the detection results output by the convolutional neural network model with the detection results of the original detection modules at the stations.

[0023] Furthermore, the batch verification module is also used to calculate the ratio of the speed of the detection results output by the convolutional neural network model at the selected stations on the current production line to the speed of the detection results output by the original detection modules at the selected stations on the current production line, and judge whether the ratio is greater than the second threshold;

[0024] If it is greater than the second threshold, the batch verification module is also used to obtain the images of the camera modules at other stations on the current production line, input them into the trained convolutional neural network model, and compare the detection results output by the convolutional neural network model with the detection results of the detection modules at other stations on the current production line.

[0025] Since the passing rate of the camera module at the station on the production line is constant, and the detection speed by the convolutional neural network model is greater than that of the traditional detection module. When the traditional detection module is still in the process of detection, the convolutional neural network model has completed the detection and is in an idle state at this time. In this preferred solution, in order to fully verify the convolutional neural network model, after the convolutional neural network model completes the detection of an image of a certain camera module at the selected station on the current production line, it also obtains the images of a single camera module at other stations on the current production line for detection, and then detects the image of the next camera module at the selected station on the current production line. By repeating this process, two sets of tests can be completed, which verifies the convolutional neural network model more fully and ensures the accuracy rate of the convolutional neural network model.

[0026] The second object of the present invention is to provide an image dirt detection method based on a convolutional neural network, including the following steps:

[0027] S1. Obtain a training image set, and all the images in the training image set have dirt marks;

[0028] S2. Input the images in the training image set into the convolutional neural network model for training to obtain a convolutional neural network model with the training completed;

[0029] S3. Obtain the images of defective camera modules, input them into the convolutional neural network model with the training completed, and judge whether the correct rate meets the preset standard based on the detection results of the convolutional neural network model. If it meets the standard, mark it as the convolutional neural network model with the training completed and jump to S4. If it does not meet the standard, obtain the misjudged images, establish a misjudged image set, and retrain the convolutional neural network model based on the misjudged image set until the correct rate meets the preset standard;

[0030] S4. Obtain the images of the camera modules on the production line, input them into the convolutional neural network model with the training completed, and compare the detection results output by the convolutional neural network model with the original detection results on the production line to judge whether the fitting degree between the detection results of the convolutional neural network model and the original detection results on the production line exceeds the first threshold. If it exceeds, mark it as the convolutional neural network model with the verification passed.

[0031] This method uses a convolutional neural network model to detect the dirt on images, which can improve the detection speed of a single image from seconds to milliseconds, thus greatly enhancing the detection efficiency. To solve the accuracy problem, this solution first trains the convolutional neural network model with a large number of images marked with dirt, enabling the convolutional kernels of the convolutional neural network model to be initially formed. Then, the trained neural network model is preliminarily verified alone, that is, simulating the process on the production line, inputting the images of defective camera modules into the convolutional neural network model, and judging whether it is correct based on the detection results of the convolutional neural network model. After multiple tests, the accuracy rate can be statistically calculated to determine whether the accuracy rate meets the preset standard. If it meets the preset standard, such as an accuracy rate of 99%, it proves that the convolutional neural network model already meets the usage requirements and is marked as a trained convolutional neural network model. If it does not meet the preset standard, training continues. At this time, if the trained convolutional neural network model is directly used on the production line, problems may occur, such as a decrease in the accuracy rate and an increase in the misjudgment rate of the convolutional neural network model in actual production, affecting the normal operation of the entire production line. In this solution, the detection method of the original production line is retained, and the convolutional neural network model and the original detection method are used for inspection simultaneously until the fitting degree between the detection results of the convolutional neural network model and the original detection results of the production line exceeds the first threshold, then it is considered that the convolutional neural network model passes the verification, ensuring that after using the convolutional neural network model for detection, the accuracy is not affected and the production line can operate smoothly without stopping.

[0032] Further, in step S4, the detection results include the defect coordinates and the gray values at the coordinate positions.

[0033] The position of the dirt can be determined through the defect coordinates.

[0034] Further, it also includes step S5: determining the image area to which the defect belongs according to the defect coordinates in the detection results, and then judging whether the gray value at the coordinate position exceeds the control threshold of the corresponding area. If it exceeds, it is judged as a defective image.

[0035] Further, in step S5, the image is divided into several areas, and a control threshold is set separately for each area.

[0036] Because there is a shading phenomenon in the images of camera modules, that is, the light intensity received by the edge area of the image sensor of the camera module is smaller than that of the central area, resulting in the phenomenon of inconsistent brightness between the center and the four corners. Therefore, different areas of the image have different requirements for intercepting the severity of dirt. Thus, by setting different control thresholds for different areas in the image, they are intercepted and distinguished. Description of the Drawings

[0037] Figure 1 It is the logic block diagram of the image dirt detection system based on the convolutional neural network in the first embodiment;

[0038] Figure 2 Schematic diagram of the training image in the image dirt detection system based on convolutional neural network in the first embodiment;

[0039] Figure 3 Schematic diagram of the image area division in the image dirt detection system based on convolutional neural network in the first embodiment. Specific implementation manner

[0040] The following is a more detailed description through specific implementation manners:

[0041] First embodiment

[0042] As Figure 1 shown, the image dirt detection system based on convolutional neural network in this embodiment includes an acquisition module, a training module, a preliminary verification module, a batch verification module, and a screening module.

[0043] The acquisition module is used to obtain a training image set. As Figure 2 shown, the training image set contains a number of images with different pixels, different aspect ratios, and different color temperatures, and the images all have dirt marks; in this embodiment, the format of the images is BMP, and the range of pixels is 2 million - 64 million. The aspect ratios include 16:9 and 4:3, and the range of color temperature is 4500K - 6500K; the dirt is marked by a red frame; in other embodiments, it can also be adjusted according to the actual production camera module. For example, the range of pixels can be expanded to more than 100 million pixels. In this embodiment, the image refers to the image captured by the camera module in the working state (also called the lit state) facing the LED flat light source.

[0044] The training module pre-stores a convolutional neural network model, which is used to input the images in the training image set into the convolutional neural network model for training to obtain a trained convolutional neural network model. In this embodiment, the training of the images in the training image set is regarded as the end of training.

[0045] The preliminary verification module is used to obtain the images of defective camera modules, input them into the trained convolutional neural network model, and judge whether the correct rate meets the preset standard based on the detection results of the convolutional neural network model. If it meets the standard, it is marked as the trained convolutional neural network model. If it does not meet the standard, the misjudged images are obtained, a misjudged image set is established, and the convolutional neural network model is trained again based on the misjudged image set until the correct rate meets the preset standard.

[0046] Specifically, the trained convolutional neural network model is imported into the test program, the defective camera module is placed in the existing manual test device, the defective camera module is turned on, and the test program is run. The dirt judgment of the defective camera module image is completed through the test program, and the comparison test is continuously performed to record the accuracy, misjudgment rate, failure rate and test time. Misjudgments and failures are regarded as misjudgments, and their images are classified as misjudgment image sets. The neural network model is trained again to improve its confidence, and this process is repeated until the accuracy meets the preset standard, such as 99%.

[0047] The batch verification module is used to obtain images of the camera module on the production line, input the trained convolutional neural network model, compare the detection results output by the convolutional neural network model with the original detection results of the production line, and determine whether the fit between the detection results of the convolutional neural network model and the original detection results of the production line exceeds the first threshold. If it exceeds, it is marked as a verified convolutional neural network model. If not, the neural network model is trained again to improve its confidence. Specifically, a station on the production line is selected as the selected station. While retaining the original detection module at this selected station, the trained convolutional neural network model is imported and the test is continuously run. The detection results include the defect coordinates and the grayscale value of the coordinate position.

[0048] The screening module pre-stores the image judgment criteria, which include the image area division and the corresponding area card control threshold. In this embodiment, the image is divided into multiple gradient areas from the center to the periphery and the card control threshold is set respectively, such as Figure 3 As shown, for example, the image is divided into 10 levels (10 viewing areas) according to the distance from the periphery to the center. The screening module is used to determine the area to which the defect belongs based on the defect coordinates, and then determine whether the grayscale value of the coordinate position exceeds the card control threshold of the corresponding area. If it exceeds, it is judged as a bad image. In this embodiment, the card control threshold is a grayscale value, and the card control threshold of different camera modules can be set according to actual conditions.

[0049] Based on the above system, this embodiment also provides an image dirt detection method based on a convolutional neural network, comprising the following steps:

[0050] S1. Obtain a training image set, which includes images of different pixels, different aspect ratios, and different color temperatures, and all images have dirt marks. In this embodiment, the image format is BMP, and the pixel range is 2 million to 64 million. The aspect ratio includes 16:9 and 4:3, and the color temperature range is 4500K-6500K; dirt is marked by a red frame; in other embodiments, it can also be adjusted according to the actual production of the camera module, for example, the pixel range can be expanded to 100 million pixels.

[0051] S2. Input the images in the training image set into the convolutional neural network model for training to obtain the trained convolutional neural network model. In this embodiment, the completion of the training of the images in the training image set is regarded as the end of the training.

[0052] S3. Obtain the images of the defective camera modules, input them into the trained convolutional neural network model, and determine whether the accuracy rate meets the preset standard based on the detection results of the convolutional neural network model. If it meets the standard, mark it as the trained convolutional neural network model. If it does not meet the standard, obtain the misjudged images, establish a misjudged image set, and retrain the convolutional neural network model based on the misjudged image set until the accuracy rate meets the preset standard.

[0053] S4. The batch verification module is used to obtain the images of the camera modules on the production line, input them into the trained convolutional neural network model, and compare the detection results output by the convolutional neural network model with the original detection results on the production line to determine whether the fitting degree between the detection results of the convolutional neural network model and the original detection results on the production line exceeds the first threshold. If it exceeds, mark it as the convolutional neural network model that passes the verification. The detection results include the defect coordinates and the gray values at the coordinate positions.

[0054] S5. Determine the image area to which the defect belongs according to the defect coordinates, and then determine whether the gray value at the coordinate position exceeds the control threshold of the corresponding area. If it exceeds, it is judged as a defective image. In this embodiment, the image is divided into several areas and a control threshold is set separately for each area. Specifically, the image is divided into multiple gradient areas from the center to the periphery and the control thresholds are set respectively. For example, it is divided into 10 levels (10 field-of-view areas) according to the distance from the periphery to the center of the image. The control threshold is the gray value, and the control thresholds of different camera modules can be set according to the actual situation. In other embodiments, in step S3, step S5 can also be used to distinguish and intercept the dirt in different areas of the image.

[0055] The solution of this embodiment uses a convolutional neural network model to detect the dirt on the image, which can improve the detection speed of a single image from the second level to the millisecond level (about 900 milliseconds), thus greatly improving the detection efficiency. To solve the accuracy problem, this solution first uses a large number of images with dirt markings to train the convolutional neural network model, so that the convolutional kernels of the convolutional neural network model are initially formed. Then, the trained neural network model is preliminarily verified separately, that is, the process on the production line is simulated, and the image of the defective camera module is input into the convolutional neural network model. Based on the detection results of the convolutional neural network model, it is judged whether it is correct. After multiple tests, the accuracy rate can be counted, so as to judge whether the accuracy rate meets the preset standard. If the preset standard is met, for example, the accuracy rate is 99%, it proves that the convolutional neural network model already meets the usage requirements and is marked as the trained convolutional neural network model. If the preset standard is not met, training continues. At this time, if the trained convolutional neural network model is directly used on the production line, problems may occur. For example, the accuracy rate of the convolutional neural network model decreases and the misjudgment rate increases in actual production, affecting the normal operation of the entire production line. In this solution, the detection method of the original production line is retained, and the convolutional neural network model and the original detection method are used for inspection at the same time. It is not until the fitting degree between the detection results of the convolutional neural network model and the original detection results of the production line exceeds the first threshold that the convolutional neural network model is considered to pass the verification, ensuring that after using the convolutional neural network model for detection, the accuracy is not affected and the production line can run smoothly without stopping.

[0056] Embodiment 2

[0057] The difference between this embodiment and Embodiment 1 is that in the system of this embodiment, the batch verification module is further used to calculate the ratio of the speed of the detection result output by the convolutional neural network model at the selected station on the current production line to the speed of the detection result output by the original detection module at the selected station on the current production line, and judge whether the ratio is greater than the second threshold;

[0058] If it is greater than the second threshold, the batch verification module is further used to obtain the images of the camera modules at other stations on the current production line, input them into the trained convolutional neural network model, and compare the detection results output by the convolutional neural network model with the detection results of the detection modules at other stations on the current production line to judge the fitting degree.

[0059] If it is greater than the third threshold, the batch verification module is further configured to obtain images of the camera modules at the selected stations on other production lines, input the images into the trained convolutional neural network model, and compare the detection results output by the convolutional neural network model with the detection results of the original detection modules at the selected stations on other production lines to determine the fitting degree. The third threshold is greater than the second threshold, and the second threshold and the third threshold can be determined according to the actual passing rate of the camera modules at the stations on the production line. In this embodiment, except for the detection of the selected stations on the current production line, under the condition of meeting the requirements, the convolutional neural network model only detects one of the other stations on the current production line or the selected stations on other production lines. In other words, when it is greater than the third threshold, only the selected stations on other production lines will be detected.

[0060] Since the passing rate of the camera modules at the stations on the production line is constant, and the detection speed by the convolutional neural network model is faster than that of the traditional detection module, when the detection module is still detecting, the convolutional neural network model has completed the detection and is in an idle state at this time. In order to fully verify the convolutional neural network model in this embodiment, after the convolutional neural network model completes the detection of the image of a certain camera module at the selected station on the current production line, according to the ratio of the speeds, it also obtains the images of a single camera module at other stations on the current production line or the selected stations on other production lines for detection, and then detects the image of the next camera module at the selected station on the current production line. By cycling in this way, two sets of tests can be completed, and the verification of the convolutional neural network model is more sufficient, ensuring the accuracy of the convolutional neural network model.

[0061] The above are only the embodiments of the present invention. The present invention is not limited to the fields involved in this embodiment. Common knowledge such as the specific structures and characteristics known in the art are not described in detail herein. Those of ordinary skill in the art know all the common technical knowledge in the technical field to which the invention belongs before the application date or the priority date, can know all the existing technologies in this field, and have the ability to apply the conventional experimental means before this date. Those of ordinary skill in the art can, under the inspiration given in this application, combine their own abilities to improve and implement this solution. Some typical known structures or known methods should not become obstacles for those of ordinary skill in the art to implement this application. It should be noted that for those skilled in the art, without departing from the structure of the present invention, several deformations and improvements can still be made, and these should also be regarded as the protection scope of the present invention, and these will not affect the implementation effect of the present invention and the practicality of the patent. The protection scope required by this application should be based on the content of its claims, and the specific implementation manners described in the specification can be used to explain the content of the claims.

Claims

1. Image dirt detection system based on convolutional neural network, It is characterized in that include: An acquisition module is used to obtain a training image set, where all images in the training image set have dirt marks; A training module, which has a pre-stored convolutional neural network model, is used to input images in a training image set into the convolutional neural network model for training, so as to obtain a convolutional neural network model after training; The preliminary verification module is used to obtain images of defective camera modules, input the trained convolutional neural network model, and judge whether the accuracy meets the preset standard based on the detection results of the convolutional neural network model. If it does, it is marked as a trained convolutional neural network model. If it does not, it obtains images with incorrect judgments, establishes a misjudged image set, and trains the convolutional neural network model again based on the misjudged image set until the accuracy meets the preset standard. A batch verification module is used to obtain images of the camera module on the production line, input the trained convolutional neural network model, compare the detection results output by the convolutional neural network model with the original detection results of the production line, and determine whether the fit between the detection results of the convolutional neural network model and the original detection results of the production line exceeds a first threshold. If so, mark the convolutional neural network model as a verified convolutional neural network model; The production line includes a plurality of stations, each of which includes a detection module; the batch verification module is used to obtain images of camera modules at selected stations of the production line, input the trained convolutional neural network model, and compare the detection results output by the convolutional neural network model with the detection results of the original detection module at the station; The batch verification module is also used to calculate the ratio of the speed at which the convolutional neural network model outputs the detection results at the station selected by the current production line to the speed at which the original detection module outputs the detection results at the station selected by the current production line, and determine whether the ratio is greater than a second threshold; If it is greater than the second threshold, the batch verification module is also used to obtain images of camera modules at other stations on the current production line, input the trained convolutional neural network model, and compare the detection results output by the convolutional neural network model with the detection results of the detection modules at other stations on the current production line.

2. According to claim 1, the image dirt detection system based on convolutional neural network, Features: The detection result includes the defect coordinates and the grayscale value of the coordinate position.

3. The image dirt detection system based on convolutional neural network according to claim 2, Features: It also includes a screening module, which pre-stores image judgment standards, and the image judgment standards include the area division of the image and the card control threshold of the corresponding area; the screening module is used to determine the area to which the defect belongs based on the defect coordinates, and then determine whether the grayscale value of the coordinate position exceeds the card control threshold of the corresponding area. If it exceeds, it is judged as a bad image.

4. The image dirt detection system based on convolutional neural network according to claim 1, Features: The training image set includes a number of images with different pixels, different aspect ratios and different color temperatures.

5. Image dirt detection method based on convolutional neural network, It is characterized in that Detect using the image dirt detection system based on convolutional neural network as described in any one of claims 1-4; the method includes the following steps: S1. Obtain a training image set, and all images in the training image set have dirt markings; S2. Input the images in the training image set into the convolutional neural network model for training to obtain a convolutional neural network model with training completed; S3. Obtain the images of defective camera modules, input them into the convolutional neural network model with training completed, and determine whether the accuracy rate meets the preset standard based on the detection results of the convolutional neural network model. If it meets the standard, mark it as the convolutional neural network model with training completed and jump to S4. If it does not meet the standard, obtain the misjudged images, establish a misjudged image set, and retrain the convolutional neural network model based on the misjudged image set until the accuracy rate meets the preset standard; S4. Obtain the images of camera modules on the production line, input them into the convolutional neural network model with training completed, and compare the detection results output by the convolutional neural network model with the original detection results on the production line to determine whether the fitting degree between the detection results of the convolutional neural network model and the original detection results on the production line exceeds the first threshold. If it exceeds, mark it as the convolutional neural network model with verification passed.

6. The method for detecting image dirt based on convolutional neural network according to claim 5, wherein: in the step S4, the detection results include the defect coordinates and the gray values at the coordinate positions.

7. The method for detecting image dirt based on convolutional neural network according to claim 6, wherein: it further includes step S5. Determine the image area to which the defect belongs according to the defect coordinates in the detection results, and then determine whether the gray value at the coordinate position exceeds the control threshold of the corresponding area. If it exceeds, it is determined as a defective image.

8. The method for detecting image dirt based on convolutional neural network according to claim 7, wherein: in the step S5, the image is divided into several areas, and a control threshold is set separately for each area.

Citation Information

Patent Citations

  • Camera module smudginess detection method and system

    CN104093016A

  • Camera anomaly detection and method and device

    CN107705334A