Small-size lens defect classification detection system and identification method thereof

The defect detection method supported by a multi-source imaging system and simulation dataset solves the problems of insufficient samples and low recognition accuracy in the detection of small-sized lenses, and achieves efficient and accurate defect identification and classification, which is suitable for modern industrial production.

CN121453812APending Publication Date: 2026-02-03XIAMEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511829526.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-05
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

Existing small-size lens defect detection technologies suffer from insufficient samples, unclear imaging, and low recognition accuracy, making it difficult to meet the modern industrial demand for high-precision and high-stability detection.

Method used

A defect detection method supported by a multi-source imaging system and simulation dataset is adopted. It combines various lighting methods and angles, enhances the defect visibility through grating stripes, and uses YOLO series algorithms for defect identification and classification.

Benefits of technology

It significantly improves the identification accuracy and generalization ability of small-sized lens defects, reduces the rate of missed detections and false detections, and meets the inspection needs of large-scale industrial production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121453812A_ABST
    Figure CN121453812A_ABST
Patent Text Reader

Abstract

The small-size lens defect classification detection system comprises a light source imaging system, a defect simulation data set and a defect detection and identification system, the light source imaging system comprises a first light source located under the lens, a second light source surrounding the horizontal periphery of the lens, a third light source projecting from the side of the lens at a low angle and having an irradiation angle lower than that of the second light source, and an image acquisition device for acquiring front or cylindrical surface images of the lens; generating lens defect images in batches by the defect simulation data set; the defect detection and identification system takes a lens defect image and a real image collected by the light source imaging system as training data, and after model training, defect identification and classification are carried out on the lens image collected by the light source imaging system in real time. The defect imaging contrast ratio is effectively improved through multi-light-source combined illumination, the problem that defect samples are scarce is solved in combination with simulation data, and efficient, accurate and automatic detection of multiple defects of a small-size lens is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine vision and optical inspection technology, and mainly to a small-sized lens defect classification and detection system and its identification method. Background Technology

[0002] In modern industrial fields such as consumer electronics, automotive electronics, and optical instruments, small-sized lenses are core optical components. Their appearance defects (such as scratches, dirt, air bubbles, and haze) directly affect the imaging quality and equipment reliability of optical systems. Therefore, efficient and accurate defect detection of small-sized lenses has become a key link in industrial production. As downstream applications continue to demand higher precision from optical devices, traditional manual visual inspection can no longer meet the high-speed inspection needs of large-scale production. Automated and intelligent defect detection technologies have become an inevitable trend in the industry.

[0003] Current mainstream defect detection solutions for small-sized lenses mainly rely on single-light source imaging and traditional algorithm recognition, which has significant technical limitations. On the one hand, small-sized lenses are mostly complex structures combining toroidal cylinders and domes, and single-light source illumination is difficult to adapt to the imaging requirements of different types of defects. This results in low contrast and difficulty in displaying weak feature defects such as air marks and micro-scratches, which are prone to being missed. On the other hand, the proportion of defective lenses in actual production is extremely low, the number of real defect samples is small, and the labeling cost is high. This leads to insufficient training data for machine learning-based detection models, poor generalization ability, and an inability to effectively cope with the identification challenges of small-sized, low-contrast, and dark-colored defects.

[0004] Furthermore, the platforms of existing detection systems are mostly designed with fixed angles, making it difficult to adapt to the illumination angles of multiple light sources and the shooting angles of image acquisition devices. This results in blind spots and shooting dead angles in areas such as lens edges and cylindrical surfaces. At the same time, traditional detection algorithms do not classify images for different lighting backgrounds and have insufficient feature fusion capabilities. Information loss is prone to occur during the extraction of small defect features, further reducing detection accuracy and efficiency, and failing to meet the urgent needs of modern industry for high-precision and high-stability detection.

[0005] In summary, developing a small-sized lens defect classification and detection system that integrates multi-source imaging, simulation dataset support, and optimized algorithm detection is of great technical value in overcoming the current technical bottlenecks in small-sized lens detection, such as insufficient samples, unclear imaging, and low recognition accuracy. Summary of the Invention

[0006] To address the technical problems of insufficient training data for detection models, unclear imaging, and low recognition accuracy in existing technologies, this application proposes a small-sized lens defect classification and detection system and its recognition method.

[0007] According to one aspect of the present invention, a small-sized lens defect classification and detection system is proposed, comprising a light source imaging system, a defect simulation dataset, and a defect detection and recognition system; the light source imaging system includes a first light source located directly below the lens, a second light source surrounding the horizontal outer periphery of the lens, a third light source projecting from the side of the lens at a low angle with an illumination angle lower than that of the second light source, and an image acquisition device for acquiring frontal or cylindrical images of the lens; the defect simulation dataset generates lens defect images in batches; the defect detection and recognition system uses the lens defect images and real images acquired by the light source imaging system as training data, and after model training, performs defect recognition and classification on the lens images acquired in real time by the light source imaging system.

[0008] This system integrates multiple lighting methods and matching lighting angles, configuring appropriate light source illumination schemes for different types of defects (such as dirt, air marks, scratches, and haze), thereby significantly improving the contrast and visibility of defects in images. Simultaneously, it generates lens defect images in batches using a defect simulation dataset, effectively addressing the issues of limited real defect samples and high annotation costs. This provides ample training data for the detection model, enhancing its generalization ability.

[0009] Preferably, the light source imaging system further includes grating stripes, which are disposed between the first light source and the lens, and defects on the lens can be transformed into bending or breakage marks on the grating stripes.

[0010] More preferably, the light source imaging system includes the following illumination methods: for dirt defects, the first light source is turned on, and imaging is performed through the image acquisition device; for air marks and minor scratches defects, the first light source is turned on, and the grating stripes are set between the first light source and the lens, and imaging is performed through the image acquisition device; for surface scratches defects, the second light source and the first light source are turned on, and imaging is performed through the image acquisition device; for haze defects, the third light source is turned on, and imaging is performed through the image acquisition device.

[0011] Preferably, the light source imaging system further includes an adjustable angle platform, through which the lens can achieve bidirectional angle adjustment of the horizontal and vertical axes.

[0012] Preferably, the light source imaging system further includes a light-shielding baffle, which is disposed on the third light source to form a dark field lighting environment.

[0013] Preferably, the steps for batch generating lens defect images from the defect simulation dataset are as follows:

[0014] A1. Construct a 3D model of the lens to provide a basic model for subsequent defect generation and rendering;

[0015] A2. Design and generate different lens defect types;

[0016] A3. Based on the lens 3D model constructed in A1, integrate the various defects generated in A2 to construct a high-fidelity rendering environment, simulate lens defects and automatically configure materials, lighting and shooting angle, and finally output the rendered image and corresponding defect annotation data for model training.

[0017] More preferably, the generation rules for lens defects in A2 specifically include: scratch defects are simulated by random curves to simulate scratch trajectories, and the position, length, and direction parameters of the scratch trajectories are recorded for output annotation; dirt defects are simulated by randomly generating irregular shapes and then combining blur and transparency effects to simulate local occlusion or contamination areas; air mark defects are generated by programmatic interface control to generate defect geometry, and the defect geometry and the three-dimensional lens model in A1 are cut in Boolean mode so that the three-dimensional lens model produces a physical depression or hollowing at the position of the defect geometry.

[0018] According to a second aspect of the present invention, a method for identifying defects in a small-sized lens classification and detection system is provided, comprising the following steps:

[0019] S1. The defect detection and identification system uses the lens defect images generated by the defect simulation dataset as the main body, and combines them with the real lens defect images collected by the light source imaging system to form training samples, and preprocesses the training samples.

[0020] S2. Input the preprocessed training samples into the training model for training;

[0021] S3. Place the lens in the light source imaging system, turn on the corresponding light source according to the preset illumination mode and acquire the image. After preprocessing, the image is input into the training model for detection, and the lens image with defect markings is output to complete defect identification and classification.

[0022] Preferably, the specific steps of S2 are as follows: perform a two-dimensional discrete Fourier transform on the preprocessed training samples and calculate the spectral variance; classify the training samples into raster background images and non-raster background images according to the variance difference, and use them to train training models adapted to the two types of backgrounds respectively; the raster background images include images corresponding to air marks and minor scratches, and the non-raster background images include images corresponding to dirt, surface scratches, and haze defects.

[0023] Preferably, the preprocessing includes flipping, sharpening, and denoising.

[0024] Compared with the prior art, this application has the following beneficial effects:

[0025] (1) The small-size lens defect classification and detection system of this application utilizes a multi-light source targeted lighting design (first light source, second light source, third light source and grating stripes) and an adjustable angle loading platform to adapt to the imaging needs of different types of defects, eliminate blind spots and shooting dead angles, and make weak feature defects (dirt, small scratches, air marks, fog spots) clearly visible, laying the foundation for accurate detection.

[0026] (2) The small-size lens defect classification and detection system of this application can simulate multiple types of lens defects under real lighting conditions through the simulation defect simulation module, and can flexibly control the type, position, size and angle of the defect, and generate high-quality defect images and annotation data with one click. After being fused with the real images collected by the light source imaging system, it can effectively fill the gap of few real defect samples and high annotation cost, provide sufficient and diverse data support for model training, significantly improve the accuracy of AI recognition and the generalization ability of the detection model, and has high automation, high simulation degree and scalability.

[0027] (3) The small-size lens defect classification and detection system of this application integrates high-contrast imaging technology and machine vision processing algorithm. Specifically, it relies on YOLO series algorithms to train the defect detection model, realizing rapid, automated and intelligent defect detection. It not only replaces traditional manual visual inspection, significantly improves the level of automation of inspection, reduces manual intervention, but also greatly reduces the rate of missed detection and false detection, improves the detection speed and accuracy, and fully meets the actual needs of large-scale industrial production. Attached Figure Description

[0028] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments and, together with the description, serve to explain the principles of this application. Other embodiments and many anticipated advantages of these embodiments will be readily recognized as they become better understood through reference to the following detailed description. Elements in the drawings are not necessarily to scale. The same reference numerals refer to corresponding similar parts.

[0029] Figure 1 A schematic diagram of the overall structure of a light source imaging system according to an embodiment of this application is shown;

[0030] Figure 2 A schematic diagram of the structure of a third light source and a light-shielding baffle according to an embodiment of this application is shown;

[0031] Figure 3 A flowchart illustrating the construction of a defect simulation dataset according to an embodiment of this application is shown;

[0032] Figure 4A flowchart of an identification method for a small-sized lens defect classification and detection system according to an embodiment of this application is shown;

[0033] Figure 5 A flowchart of a different type of defect identification method according to an embodiment of this application is shown.

[0034] The attached figures are labeled as follows:

[0035] 1-First light source, 2-Second light source, 3-Third light source, 4-Image acquisition device, 5-Light shield, 6-Light source bracket, 7-Raster stripe. Detailed Implementation

[0036] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.

[0037] Where there is no conflict, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0038] A defect classification and detection system for small-sized lenses includes a light source imaging system, a defect simulation dataset, and a defect detection and recognition system.

[0039] Specifically, the overall structure of the light source imaging system is as follows: Figure 1 As shown, it includes a first light source 1, a second light source 2, a third light source 3, an image acquisition device 4, a light-shielding baffle 5, an adjustable angle platform, and a light source support 6.

[0040] Specifically, the first light source 1 is aligned with and focused on the back of the lens, primarily used for observing defects on the front of the lens (observed from top to bottom). The second light source 2 surrounds the horizontal periphery of the lens, facilitating multi-angle imaging. The combination of the two allows for comprehensive, three-dimensional analysis of defects across the entire lens area. The third light source 3 has a lower illumination angle than the second light source 2, projecting light from a low angle on the side of the lens to provide individual illumination for a specific defect. Furthermore, the third light source 3 can create different light fields by assembling and disassembling lamps of different brightness and color, facilitating the differentiation and integration of multiple defects that may exist on a single lens.

[0041] In a specific embodiment, multiple image acquisition devices 4 can be installed, respectively positioned above and to the side of the lens. The image acquisition device 4 positioned above is used to acquire images of the front of the lens, while the image acquisition device 4 positioned to the side is used to acquire images of the cylindrical surface of the lens. The acquired cylindrical images provide effective support for the identification of defects such as fog spots that are difficult to detect in the past.

[0042] Specifically, the light-shielding baffle 5 is installed in conjunction with the third light source 3, as shown in the reference. Figure 2 When the third light source 3 needs to be activated, the light-shielding baffle 5 and the third light source 3 move together above the first light source 1 to provide illumination for the lens. The light-shielding baffle 5 can reduce the brightness of the surrounding environment of the image acquisition device 4, enabling shooting in dark environments, thereby improving image contrast and identifying specific defects.

[0043] In a specific embodiment, the first light source 1 is a backlight, the second light source 2 is a circular light source, the third light source 3 is a replaceable circular splicing light source, and the image acquisition device 4 is an industrial camera.

[0044] Specifically, the adjustable-angle platform can achieve bidirectional angle adjustment of the horizontal and vertical axes. By flexibly adjusting the placement angle of the lens, it can adapt to the illumination angle of multiple light sources and the shooting angle of the image acquisition device 4, effectively eliminating the light blind spots and shooting dead angles in areas such as the lens edge and cylindrical surface, ensuring that all parts of the lens can be clearly imaged, and providing a high-quality image foundation for subsequent defect detection.

[0045] Specifically, the light source imaging system also includes grating stripes 7, which are positioned between the first light source 1 and the lens. During imaging, when the first light source 1 is turned on and the grating stripes 7 are positioned between it and the lens, defects on the lens are transformed into bending or breakage marks on the grating stripes 7. This transformation significantly enhances the visibility of defects in the image, especially for weak feature defects such as air marks and micro-scratches, which can be more clearly identified through the bending or breakage marks of the grating stripes 7. Simultaneously, the placement of the grating stripes 7 does not affect the normal operation of other light sources (such as the second light source 2 and the third light source 3), which can be used independently or in combination to meet the imaging needs of different types of defects.

[0046] Specifically, based on the imaging characteristics of different types of defects in small-sized lenses, a variety of lighting schemes were designed to improve the image contrast, saturation, and display effect of defects and increase the number of identifiable defect types by focusing on multiple defect imaging methods and multiple shooting angles. The lighting schemes are as follows:

[0047] To address dirt defects, a backlighting method is employed: Dirt defects typically appear on the back of the lens. By aligning and focusing the first light source 1 onto the back of the lens, a transmissive illumination environment is created, and the image acquisition device 4 is used to acquire images. Because the dirty area has stronger light absorption than the transparent substrate, it appears as a darker color in the image under illumination, effectively improving the image contrast and recognizability of dirt defects.

[0048] To address airmarks and micro-scratches, a grating stripe backlighting method is employed: grating stripes 7 are positioned between the first light source 1 and the lens to create an illumination environment with periodically varying light intensity, and image acquisition is performed using the image acquisition device 4. Utilizing the principle of light diffraction, this method can transform airmarks and micro-scratches, which are difficult to detect with the naked eye, into bending and breakage marks on the grating stripes 7, significantly enhancing the image display effect of such micro-refractive structural defects and aiding in the identification of subtle defects.

[0049] To address surface scratch defects, a circular light source with forward illumination is employed: the second light source 2 is activated (while the first light source 1 is activated simultaneously to increase overall brightness), causing its light to surround the lens, creating a multi-angle and uniformly distributed illumination environment. Image acquisition is then performed via the image acquisition device 4. This approach enhances the reflective characteristics of surface defects such as scratches, thereby improving their clarity and recognition accuracy in the image.

[0050] To address hazy defects, a low-angle dark-field illumination method using a replaceable ring-shaped splicing light source is employed: a third light source 3 is placed below the lens, and a dark-field illumination environment is created using a light-shielding baffle 5 attached to this light source. Image acquisition is then performed using an image acquisition device 4. Hazy defects have a refractive index different from the transparent substrate and scatter direct light from all sides. Therefore, in a dark-field environment, the hazy defect area exhibits different brightness characteristics compared to the surrounding transparent substrate due to light scattering, significantly improving the contrast and visibility of hazy defects in the image. This illumination method is particularly suitable for detecting weak-contrast defects.

[0051] Specifically, the defect simulation dataset provides ample and high-quality data support for training small-sized lens defect detection models, effectively addressing the industry pain points of scarce real defect samples and high annotation costs. Constructed through standardized 3D modeling, diverse defect generation, and high-fidelity rendering processes, this dataset can accurately simulate lens defects of different types, sizes, and locations under real lighting conditions, batch-output simulated defect images with accurate annotation information, and flexibly adapt to the diverse data requirements of model training. Figure 3 For the flowchart of constructing the defect simulation dataset, refer to... Figure 3 The specific construction steps are as follows:

[0052] A1. Use 3D modeling software to design a 3D model of the lens that conforms to its actual size and appearance structure. Then, load the model in the rendering software and perform normalization processing. Save the processed model file to provide a basic model for subsequent defect generation and rendering.

[0053] A2. Design and Generation of Lens Defects: Scratch defects are simulated using randomly generated Bézier or spline curves to mimic realistic scratch trajectories. Line width, anti-aliasing, transparency, and distortion are set, and the curves are drawn on a transparent layer of the lens area to simulate visual disturbance effects. The position, length, and direction parameters of the scratch trajectory are recorded for output annotation. Dirt defects are generated by randomly generating irregular shapes, then using Gaussian blur, alpha mask, etc., to synthesize locally occluded or contaminated areas. The color of the dirt can be selected or sampled from a sample set to improve realism. Airmark defects are generated using the Blender Python API, and then the defect geometry and the lens 3D model are cut using Boolean operations, creating physical recesses or cutouts in the lens 3D model at the locations of the defect geometry.

[0054] A3. Import the lens 3D model created in A1 into the 3D modeling and rendering software, configure it with transparent glass material, and set parameters such as refractive index, roughness, and color to simulate the optical properties of real glass, thereby constructing a high-fidelity rendering environment; then, integrate various defects generated in A2 into the lens 3D model according to preset rules, and simulate imaging conditions under different detection scenarios by adjusting lighting parameters (such as light source position, intensity, and color) and shooting angles (tilt, rotation, and tilt); finally, use the rendering engine to output high-resolution images and automatically generate annotation files that match the defect location, type, and size to form a defect simulation dataset containing complete annotation information.

[0055] Specifically, the defect detection and identification system is built on a deep learning framework. It uses training samples formed by the defect simulation dataset and real images collected by the light source imaging system as a basis. It achieves efficient and accurate defect identification and classification through a deep learning-based target detection model. Its core process includes three major stages: sample preprocessing, model training and optimization, and real-time detection and result output.

[0056] In a specific embodiment, the deep learning-based target detection model is the YOLO series algorithm.

[0057] A method for identifying defects in a small-sized lens defect classification and detection system can be referenced. Figure 4 Specifically, it includes the following steps:

[0058] S1. The defect detection and recognition system primarily uses lens defect images generated from a defect simulation dataset, combined with real lens defect images acquired by a light source imaging system, to form training samples. To improve sample quality, preprocessing operations are performed on the training samples, including flipping, sharpening, and denoising, thereby enhancing image clarity and usability, reducing noise interference, and providing a higher-quality data foundation for subsequent model training.

[0059] S2. Input the preprocessed training samples into the training model for training. Specifically, first perform a two-dimensional discrete Fourier transform on the preprocessed training samples and calculate the spectral variance. Based on the variance difference, the training samples are distinguished into raster background images and non-raster background images. (Refer to...) Figure 5 The raster background image contains images corresponding to air bubbles and minor scratches, while the non-raster background image contains images corresponding to dirt, surface scratches, and haze. Training models adapted to different backgrounds are then trained using these two types of images respectively, enabling the models to more accurately identify different types of defects.

[0060] S3. During actual testing, the lens is placed in the light source imaging system, and the corresponding light source is turned on according to the preset illumination mode to acquire images. The acquired images are also preprocessed and then input into the trained model for detection. The model will quickly analyze the defect features in the image and output a lens image with defect markings, thereby completing the defect identification and classification task and providing a reliable basis for the quality inspection of small-sized lenses.

[0061] In a specific embodiment, the training model is a deep learning model built based on the YOLO series algorithms. This model is trained on a large number of simulated and real defect images with precise annotation information, enabling it to automatically learn and extract feature information of different types of defects. During training, the model continuously adjusts network parameters to minimize prediction errors, thereby improving the accuracy of identifying various defects. Simultaneously, to address the differences between grating background and non-grating background images, the model employs a divide-and-conquer strategy for optimization, ensuring stable detection performance under different imaging conditions. The final trained model possesses efficient and accurate defect recognition capabilities, and can output the type, location, and size information of defects in lens images in real time.

[0062] The system has demonstrated significant advantages in practical applications. Its highly automated inspection process drastically shortens the inspection cycle, improving efficiency several times over compared to traditional manual inspection methods, effectively meeting the urgent needs of large-scale industrial production for rapid quality inspection.

[0063] The specific embodiments of this application have been described above, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0064] In the description of this application, it should be understood that the terms "upper," "lower," "inner," "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are used only for the convenience of describing this application and for simplification, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The simple fact that certain measures are recited in mutually different dependent claims does not indicate that combinations of these measures cannot be used for improvement. Any reference signs in the claims should not be construed as limiting the scope.

Claims

1. A defect classification and detection system for small-sized lenses, characterized in that, It includes a light source imaging system, a defect simulation dataset, and a defect detection and identification system; the light source imaging system includes a first light source located directly below the lens, a second light source surrounding the horizontal outer periphery of the lens, a third light source projecting from the side of the lens at a low angle with an illumination angle lower than that of the second light source, and an image acquisition device for acquiring frontal or cylindrical images of the lens. The defect simulation dataset is used to generate lens defect images in batches. The defect detection and identification system uses the lens defect image and the real image acquired by the light source imaging system as training data. After model training, it performs defect identification and classification on the lens image acquired in real time by the light source imaging system.

2. The small-size lens defect classification and detection system according to claim 1, characterized in that, The light source imaging system also includes grating stripes, which are disposed between the first light source and the lens. Defects on the lens can be converted into bending or breakage marks on the grating stripes.

3. The small-size lens defect classification and detection system according to claim 2, characterized in that, The light source imaging system includes the following illumination methods: for dirt defects, the first light source is turned on, and imaging is performed through the image acquisition device; for air marks and minor scratches defects, the first light source is turned on, and the grating stripes are set between the first light source and the lens, and imaging is performed through the image acquisition device; for surface scratches defects, the second light source and the first light source are turned on, and imaging is performed through the image acquisition device; for haze defects, the third light source is turned on, and imaging is performed through the image acquisition device.

4. The small-size lens defect classification and detection system according to claim 1, characterized in that, The light source imaging system also includes an adjustable angle platform, through which the lens can achieve bidirectional angle adjustment of the horizontal and vertical axes.

5. The small-size lens defect classification and detection system according to claim 1, characterized in that, The light source imaging system also includes a light-shielding baffle, which is disposed on the third light source to form a dark field lighting environment.

6. The small-size lens defect classification and detection system according to claim 1, characterized in that, The steps for batch generating lens defect images from the defect simulation dataset are as follows: A1. Construct a 3D model of the lens to provide a basic model for subsequent defect generation and rendering; A2. Design and generate different lens defect types; A3. Based on the lens 3D model constructed in A1, integrate the various defects generated in A2 to construct a high-fidelity rendering environment, simulate lens defects and automatically configure materials, lighting and shooting angle, and finally output the rendered image and corresponding defect annotation data for model training.

7. The small-size lens defect classification and detection system according to claim 6, characterized in that, The specific rules for generating lens defects in A2 include: scratch defects are generated by simulating scratch trajectories using random curves, and the position, length, and direction parameters of the scratch trajectories are recorded for output annotation; dirt defects are generated by randomly generating irregular shapes, and then combined with blur and transparency effects to simulate local occlusion or contamination areas; air mark defects are generated by controlling the generation of defect geometry through a programmed interface, and the defect geometry and the three-dimensional lens model in A1 are cut in a Boolean manner, so that the three-dimensional lens model produces a physical depression or hollowing at the position of the defect geometry.

8. A method for identifying defects in a small-sized lens as described in any one of claims 1-7, characterized in that, Includes the following steps: S1. The defect detection and identification system uses the lens defect images generated by the defect simulation dataset as the main body, and combines them with the real lens defect images collected by the light source imaging system to form training samples, and preprocesses the training samples. S2. Input the preprocessed training samples into the training model for training; S3. Place the lens in the light source imaging system, turn on the corresponding light source according to the preset illumination mode and acquire the image. After preprocessing, the image is input into the training model for detection, and the lens image with defect markings is output to complete defect identification and classification.

9. The identification method of the small-size lens defect classification and detection system according to claim 8, characterized in that, The specific steps of S2 are as follows: perform a two-dimensional discrete Fourier transform on the preprocessed training samples and calculate the spectral variance. Based on the variance difference, the training samples are divided into raster background images and non-raster background images, which are used to train training models adapted to the two types of backgrounds respectively. The raster background images include images corresponding to air marks and minor scratches, and the non-raster background images include images corresponding to dirt, surface scratches, and haze defects.

10. The identification method of the small-size lens defect classification and detection system according to claim 8, characterized in that, The preprocessing includes flipping, sharpening, and denoising.