Pollutant detection method and device, detector and storage medium

By combining multispectral illumination and imaging components with a deep learning model, a contaminant detection method has been developed, which solves the problem that single-wavelength inspection is insufficient to identify contaminant components in optical elements, and enables rapid and accurate contaminant identification and cleaning guidance.

CN122016841APending Publication Date: 2026-05-12JIHUA LAB
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIHUA LAB
Filing Date
2025-12-22
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing methods for inspecting optical components using single-wavelength oblique illumination are insufficient to identify the specific components of contaminants, which may lead to incorrect cleaning operations and damage to the optical coating.

Method used

The detector, which employs multispectral illumination and imaging components, acquires multi-band spectral images and uses a deep learning model to extract and identify features from the spectral images, thereby identifying contaminant components on the surface of optical components.

Benefits of technology

It enables rapid identification of contaminant components during on-site assembly and adjustment, providing a basis for precise cleaning operations and avoiding misjudgment and damage to the optical film.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122016841A_ABST
    Figure CN122016841A_ABST
Patent Text Reader

Abstract

The invention discloses a pollutant detection method and device, a detector and a storage medium, and relates to the technical field of device detection.The method is applied to the detector provided with a multispectral illumination component and an imaging component, and the method comprises the steps that image collection is conducted on an illuminated to-be-detected optical element through the imaging component, and multiband spectral images are obtained; the multispectral illumination part is used for lighting an optical element to be detected in the detector according to a multispectral band; performing feature extraction on the spectral image to obtain a current spectral vector; the current spectral vector is recognized through a preset pollution detection model, a pollution detection result is obtained, and the preset pollution detection model is a deep learning model obtained through training on the basis of sample spectral images of various pollutants. Compared with existing single-wavelength visual detection, the method has the advantages that the trained preset pollution detection model can be used for quickly identifying the components of the pollutants in the on-site installation and adjustment link, and a basis is provided for precise cleaning operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of device testing technology, and in particular to a method, apparatus, detector and storage medium for detecting contaminants. Background Technology

[0002] Currently, in the precision assembly and adjustment of high-end optical systems (such as the assembly and debugging of lithography machine objectives, space camera primary mirrors, and high-energy laser resonator mirrors), the surface cleanliness of optical components is a key factor affecting the final performance. Micron- and even nano-scale contaminants, such as dust, fibers, skin oils, silicone oil vapor condensates, and saliva droplets, can all increase system scattering loss, decrease the modulation transfer function, or form damage points under strong laser light. Therefore, to effectively control the surface cleanliness of optical components, rapid contamination detection is generally required at the assembly and adjustment site.

[0003] Current methods for contamination screening during on-site assembly and adjustment typically involve manual visual inspection under high-intensity lighting or observation using a single wavelength (such as white light or a specific color light) under oblique illumination. For example, an LED flashlight is used to illuminate the lens surface at a certain angle to observe for bright spots or hazy areas caused by contaminant scattering. However, this method struggles to identify the specific components of the contaminants, and subsequent incorrect cleaning operations may damage the optical coating. Summary of the Invention

[0004] The main objective of this application is to provide a method, apparatus, detector, and storage medium for detecting pollutants, aiming to solve the technical problem that traditional single-wavelength oblique illumination inspection of optical elements is difficult to identify pollutant components.

[0005] To achieve the above objectives, this application proposes a pollutant detection method, which is applied to a detector equipped with a multispectral illumination component and an imaging component, the method comprising: The imaging component acquires an image of the optical element under test that is illuminated by the light, and obtains a multi-band spectral image. The multi-spectral illumination component is used to illuminate the optical element under test placed in the detector according to the multi-spectral band. Feature extraction is performed on the spectral image to obtain the current spectral vector corresponding to the spectral image; The pollution detection result is obtained by identifying the current spectral vector through a preset pollution detection model, which is a deep learning model trained on sample spectral images of various pollutants.

[0006] In one embodiment, the step of extracting features from the spectral image to obtain the current spectral vector corresponding to the spectral image includes: The spectral image is flat-field corrected based on a preset whiteboard image to obtain a corrected spectral image. The whiteboard image is a reference image obtained by taking a picture of a diffuse reflection standard whiteboard. The relative reflectance value of each pixel in the corrected spectral image is extracted. The relative reflectance values ​​of each pixel are arranged in order of wavelength of the multispectral bands to obtain a multidimensional vector, and the multidimensional vector is used as the current spectral vector of each pixel.

[0007] In one embodiment, the step of performing flat-field correction on the spectral image based on a preset whiteboard image to obtain a corrected spectral image includes: The lens of the imaging component is covered, and an image is acquired through the lens to obtain a dark field image; The difference between the spectral image and the dark field image is used to obtain a spectral image with uniform illumination. The uniformly illuminated spectral image is flat-field corrected based on a preset whiteboard image to obtain a corrected spectral image.

[0008] In one embodiment, the step of identifying the current spectral vector using a preset pollution detection model to obtain a pollution detection result includes: Using the number of bands of the multispectral illumination component, the current spectral vector is used to construct a data cube containing spatial and spectral information; The data cube is truncated to obtain spectral data blocks of a preset size; The spectral data block is identified by a preset contamination detection model to obtain the contamination detection result of the optical element under test.

[0009] In one embodiment, the step of identifying the spectral data block using a preset contamination detection model to obtain the contamination detection result of the optical element under test includes: The spectral data block is input into a preset contamination detection model, which includes a downsampling layer, a feature extraction layer, an attention layer, and an output layer. The downsampling layer is used to downsample the spectral data block to obtain a downsampled data block; the feature extraction layer is used to extract features from the downsampled data block to obtain joint spatial and spectral features. The attention layer is used to perform attention weighting on the spatial and spectral joint features to obtain weighted spatial and spectral joint features; the output layer is used to identify the weighted spatial and spectral joint features to obtain pollution detection results.

[0010] In one embodiment, before the step of acquiring an image of the illuminated optical element under test through the imaging component to obtain a multi-band spectral image, the method further includes: Acquire sample spectral images of various contaminants in optical components, and extract features from the sample spectral images to obtain the corresponding sample spectral vectors; The sample spectral vectors are labeled to obtain pollutant category labels; A preset pollution detection model is obtained by training the model using the sample spectral vector and the pollutant category label.

[0011] In one embodiment, the step of acquiring an image of the illuminated optical element under test through the imaging component to obtain a multi-band spectral image includes: Calibrate the test area of ​​the optical element under test; The multispectral illumination component illuminates the area to be detected sequentially according to the multispectral bands. Under illumination in each spectral band, the imaging component acquires images of the illuminated area to be detected, resulting in a multi-band spectral image.

[0012] Furthermore, to achieve the above objectives, this application also proposes a pollutant detection device, which includes: The image acquisition module is used to acquire images of the illuminated optical element under test through the imaging component to obtain multi-band spectral images. The multi-spectral illumination component is used to illuminate the optical element under test placed in the detector according to the multi-spectral band. The feature extraction module is used to extract features from the spectral image to obtain the current spectral vector corresponding to the spectral image; The model recognition module is used to identify the current spectral vector through a preset pollution detection model to obtain pollution detection results. The preset pollution detection model is a deep learning model trained based on sample spectral images of various pollutants.

[0013] In addition, to achieve the above objectives, this application also proposes a detector, which is equipped with a multispectral illumination component and an imaging component; The detector further includes a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the pollutant detection method as described above.

[0014] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the pollutant detection method described above.

[0015] One or more technical solutions proposed in this application have at least the following technical effects: The pollutant detection method of this application is applied to a detector equipped with a multispectral illumination component and an imaging component. The method includes: acquiring an image of an optical element under test that is illuminated by the imaging component to obtain a multi-band spectral image; the multispectral illumination component is used to illuminate the optical element under test placed in the detector according to the multispectral bands; extracting features from the spectral image to obtain a current spectral vector corresponding to the spectral image; and identifying the current spectral vector through a preset pollution detection model to obtain a pollution detection result. The preset pollution detection model is a deep learning model trained based on sample spectral images of various pollutants.

[0016] This application first acquires multi-band spectral images through the imaging component of the detector, and then uses a pre-trained pollution detection model to directly identify the spectral vectors of the spectral images. Compared with the existing single-wavelength visual inspection, this application can quickly identify the components of pollutants through the model when conducting pollution screening in the on-site assembly and adjustment process, providing a basis for precise cleaning operations at the assembly and adjustment site. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating Embodiment 1 of the pollutant detection method of this application; Figure 2 This is a flowchart illustrating Embodiment 2 of the pollutant detection method of this application; Figure 3 This is a flowchart illustrating Example 3 of the pollutant detection method of this application; Figure 4 The overall flowchart for testing optical components provided in this application; Figure 5 This is a block diagram of the module structure of the pollutant detection device according to an embodiment of this application; Figure 6 This is a schematic diagram of the hardware operating environment involved in the detector in the embodiments of this application.

[0020] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0021] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0022] The main solution proposed in this application is as follows: Currently, in the precision assembly and adjustment process of high-end optical systems (such as the assembly and debugging of lithography machine objectives, space camera primary mirrors, and high-energy laser resonator mirrors), the surface cleanliness of optical components is a key factor affecting the final performance. This is because micron- or even nano-scale contaminants, such as dust, fibers, skin oils, silicone oil vapor condensates, and saliva droplets, can all lead to increased system scattering loss, decreased modulation transfer function, or the formation of damage points under strong laser light. Therefore, in order to effectively control the surface cleanliness of optical components, rapid contamination detection is generally required at the assembly and adjustment site.

[0023] Current methods for contamination screening during on-site assembly and adjustment typically involve manual visual inspection under high-intensity lighting or observation using a single wavelength (such as white light or a specific color light) under oblique illumination. For example, an LED flashlight is used to illuminate the lens surface at a certain angle to observe for bright spots or hazy areas caused by contaminant scattering. However, this method struggles to identify the specific components of the contaminants, and subsequent incorrect cleaning operations may damage the optical coating.

[0024] To address the aforementioned issues, this application first acquires multi-band spectral images using the imaging component of the detector, and then directly identifies the spectral vectors of the spectral images using a pre-trained pollution detection model. Compared to existing single-wavelength visual inspection, this application can quickly identify the components of pollutants through the model during pollution screening in the on-site assembly and adjustment process, providing a basis for precise cleaning operations at the assembly and adjustment site.

[0025] It should be noted that the executing entity of this application embodiment can be an electronic device with multi-band illumination, image acquisition, and pollutant identification functions, such as a laser confocal microscope or a detector that executes the pollutant detection method of this application. This embodiment is not limited to this. The following uses a detector as an example to describe this embodiment and the following embodiments.

[0026] Based on this, this application proposes a pollutant detection method according to a first embodiment, referring to... Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the pollutant detection method of this application. In this embodiment, the pollutant detection method is applied to a detector equipped with a multispectral illumination component and an imaging component, and the pollutant detection method may include steps S10 to S30: Step S10: The imaging component acquires an image of the optical element under test that is illuminated by the light to obtain a multi-band spectral image. The multi-spectral illumination component is used to illuminate the optical element under test placed in the detector according to the multi-spectral band.

[0027] It should be noted that the multispectral illumination component can be an illumination source constructed from a high-brightness, narrow-bandwidth LED array. This multispectral illumination component can emit multiple characteristic bands of ultraviolet, visible, and near-infrared light, which can illuminate the optical components under test and provide different wavelength illumination conditions for the imaging components.

[0028] It should also be noted that the imaging component can be a device that, in conjunction with a multispectral illumination component, captures images of reflected or scattered light from the optical element under test under different wavelengths of illumination.

[0029] For example, the imaging component may employ a high-resolution, high-dynamic-range CCD (charge-coupled device) camera that can be synchronized with the multispectral illumination component. When an LED of a certain band of the multispectral illumination component is lit, the camera synchronously triggers an exposure to capture an image of the component surface in that band.

[0030] In practical use, the detector can acquire high-precision spectral images of the surface of the optical component under test on-site at the assembly and adjustment site, and realize the subsequent pollutant detection process.

[0031] Understandably, the optical component under test can be an optical part whose surface cleanliness or contaminant status needs to be checked during the assembly and adjustment of an optical system. Examples include lenses, prisms, mirrors, filters, and windows. These types of optical components are extremely sensitive to surface contamination (such as dust, grease, and fibers), so contaminant detection is required before assembly and adjustment.

[0032] It can also be understood that a multi-band spectral image can refer to a set of images of the surface of the optical element under test acquired by an imaging component at each band, after the LED is lit sequentially by a multi-spectral illumination component according to a preset wavelength sequence (such as ultraviolet, visible light, near-infrared, etc.). This multi-band spectral image records the multi-dimensional spectral information formed by the reflection of each point on the surface of the optical element under test under different wavelengths of light.

[0033] In practical use, the optical element under test is placed in the detector. First, the detector illuminates the optical element under test with a multispectral illumination component according to a preset multispectral band, and then uses an imaging component to collect the reflected or scattered light from the optical element under test to obtain a multispectral image.

[0034] Step S20: Perform feature extraction on the spectral image to obtain the current spectral vector corresponding to the spectral image.

[0035] It should be noted that the current spectral vector can be the vector extracted from each pixel in the acquired spectral image across all spectral bands. This current spectral vector represents the spectral characteristics of the substance corresponding to the pixel in the spectral image, i.e., the spectral fingerprint.

[0036] In practical use, the detector extracts the spectral features of the substance corresponding to each pixel in the spectral image to obtain the current spectral vector in all bands.

[0037] Step S30: Identify the current spectral vector using a preset pollution detection model to obtain pollution detection results. The preset pollution detection model is a deep learning model trained on sample spectral images of various pollutants.

[0038] Understandably, the preset pollution detection model can be a deep learning model trained on sample spectral images of various pollutants. This model can automatically match and identify the current spectral vector, recognizing the type of pollutant or its probability distribution corresponding to the current spectral vector.

[0039] It is also understandable that the pollution detection results can be the pollutant type determination of the optical element under test output by the model. For example, it can generate a pollution component distribution map corresponding to all pixels, with different colors in the map clearly indicating the spatial distribution of different chemical pollutants.

[0040] In practical use, the detector can identify the current spectral vector through a preset pollution detection model, obtaining a pollution component distribution map corresponding to all pixels in the generated spectral image, which serves as the pollution detection result. Compared to existing single-wavelength visual detection, this embodiment can identify the type of pollutant to determine its chemical composition and accurately distinguish between different types of pollutants such as grease and dust. This allows for rapid identification of pollutants on optical components during on-site assembly and adjustment, providing a basis for precise cleaning operations at the assembly and adjustment site.

[0041] Furthermore, in order to obtain multi-band spectral images, in this embodiment, the step of acquiring images of the illuminated optical element under test through the imaging component to obtain multi-band spectral images includes: Calibrate the test area of ​​the optical element under test; The multispectral illumination component illuminates the area to be detected sequentially according to the multispectral bands. Under illumination in each spectral band, the imaging component acquires images of the illuminated area to be detected, resulting in a multi-band spectral image.

[0042] It should be noted that the area to be detected can be a specific region on the surface of the optical element under test where contaminants need to be detected. This area can be delineated using markers to clearly define the spatial location where the imaging component needs to collect spectra, thus avoiding the acquisition of invalid data.

[0043] For example, during lens assembly and adjustment, the central area or the easily contaminated edge zone can be calibrated as the area to be tested.

[0044] In practical use, the test area of ​​the optical element under test can be calibrated first. For the selected test area, the detector first controls the multispectral illumination component to illuminate the optical element according to the wavelength sequence (e.g., λ1, λ2, ..., λ). n ) Illuminate the LEDs of the spectral illumination component sequentially; in each wavelength band λ i Under illumination, the imaging component is controlled to acquire spectral images one by one. i (x, y). This spectral image records the intensity of reflected or scattered light at various points on the surface of the optical element under test under specific wavelength illumination. Ultimately, a set of multi-band spectral images is obtained, each corresponding to the other in the same spatial location. Through the coordinated operation of the multi-spectral illumination and imaging components, the reflectance characteristics of contaminants on the surface of the optical element under test in ultraviolet, visible, and near-infrared wavelengths can be acquired. Compared to traditional single-wavelength detection, it can accurately distinguish different types of contaminants, avoiding misjudgments caused by a single information dimension.

[0045] This application provides a pollutant detection method. The method is applied to a detector equipped with a multispectral illumination component and an imaging component. The imaging component acquires an image of the illuminated optical element under test, obtaining a multi-band spectral image. The multispectral illumination component illuminates the optical element placed in the detector according to the multispectral bands. Feature extraction is performed on the spectral image to obtain the current spectral vector corresponding to the spectral image. The current spectral vector is then identified using a preset pollutant detection model to obtain the pollutant detection result. The preset pollutant detection model is a deep learning model trained based on sample spectral images of various pollutants. This embodiment acquires multi-band spectral images through the detector's imaging component and then directly identifies the spectral vector of the spectral image using the trained preset pollutant detection model. Compared to existing single-wavelength visual inspection, this embodiment can quickly identify the components of pollutants during on-site assembly and adjustment, providing a basis for precise cleaning operations at the assembly and adjustment site.

[0046] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to the above embodiment can be referred to the above description, and will not be repeated hereafter. On this basis, a second embodiment of the dialogue method of this application is proposed, please refer to... Figure 2 , Figure 2 This is a schematic flowchart provided for Embodiment 2 of the pollutant detection method of this application. To extract features from the spectral image, such as... Figure 2 As shown, in this embodiment, the step of extracting features from the spectral image to obtain the current spectral vector corresponding to the spectral image may include: Step S21: Perform flat-field correction on the spectral image based on the preset whiteboard image to obtain the corrected spectral image. The whiteboard image is a reference image obtained by taking a picture of a diffuse reflection standard whiteboard.

[0047] It should be noted that the whiteboard image can refer to a reference image obtained by taking a picture of a diffuse reflectance standard whiteboard (such as barium sulfate or a fluoropolymer material with extremely high diffuse reflectance) using a multispectral illumination component and an imaging component. Because the diffuse reflectance standard whiteboard has uniform and known high reflectance characteristics, its image can be used as a benchmark to eliminate errors in the spectral image (such as differences in camera pixel response), ensuring the accuracy of the relative reflectance calculation of subsequent spectral images.

[0048] In practical use, the detector can divide the spectral image by the white board image to obtain the corrected spectral image, and normalize the signal of each pixel in each band to the reflectance of the reference white board (i.e., the reflectance of the pollutant relative to the standard white board).

[0049] Step S22: Extract the relative reflectance value of each pixel in the corrected spectral image.

[0050] Step S23: Arrange the relative reflectance values ​​of each pixel in the order of wavelength of the multispectral band to obtain a multidimensional vector, and use the multidimensional vector as the current spectral vector of each pixel.

[0051] Understandably, the relative reflectance value can refer to the reflectance intensity of each pixel in the corrected spectral image at a specific wavelength, that is, the ratio relative to the reflectance of the standard white board, and is used to reflect the characteristics of the pollutant itself.

[0052] For example, if the relative reflectance of a pixel at wavelength λ1 is 0.8, it means that its reflectivity is 80% of that of a standard white board. This value excludes imaging component errors and only reflects the spectral characteristics of the material.

[0053] It is also understandable that a multidimensional vector can be the vector representing each pixel in the corrected spectral image across all multispectral bands (e.g., λ1, λ2, ..., λ). nThe relative reflectance values ​​under wavelength are arranged in order to form an N-dimensional vector.

[0054] For example, for a pixel (x0, y0), its relative reflectance values ​​across all N spectral bands can be extracted and arranged in wavelength order to form an N-dimensional vector: R(λ)=[R(λ1),R(λ2),...,R(λ n This vector, R(λ), is the current spectral vector of the pollutant and is used to uniquely identify its pollutant category. i ) represents the wavelength λ of that pixel. i The reflectance intensity is calculated. This N-dimensional vector R(λ) is the spectral fingerprint of the pollutant corresponding to that pixel.

[0055] Furthermore, this current spectral vector can be represented in two ways: one is a spectral curve, where the vector R(λ) is plotted as a continuous curve with wavelength λ on the x-axis and reflectance R on the y-axis; the other is an eigenvector, which is a mathematical object containing N eigenvalues: [r1, r2, r3, ..., r n It can also take other forms of expression, which are not limited in this embodiment.

[0056] This embodiment uses a whiteboard image to perform flat-field correction on the spectral image, which can eliminate the systematic error of differences in camera pixel response in the imaging component, so that the corrected spectral image can truly reflect the spectral characteristics of the substance and avoid misjudgment caused by instrument deviation.

[0057] Furthermore, to further improve the accuracy of the corrected spectral image, in this embodiment, the step of performing flat-field correction on the spectral image based on a preset whiteboard image to obtain the corrected spectral image includes: The lens of the imaging component is covered, and an image is acquired through the lens to obtain a dark field image; The difference between the spectral image and the dark field image is used to obtain a spectral image with uniform illumination. The uniformly illuminated spectral image is flat-field corrected based on a preset whiteboard image to obtain a corrected spectral image.

[0058] It should be noted that dark-field images are images captured by the imaging unit under conditions where the lens is covered and there is no external light. The pixel values ​​of dark-field images mainly reflect inherent errors in the imaging unit, such as dark current and readout noise, and do not contain optical information of the object being detected.

[0059] In this embodiment, before performing flat-field correction on the spectral image, external light can be completely blocked from entering the lens of the imaging component by physical shielding (such as a lens cap or lens hood). Then, image acquisition is performed through the lens to obtain a dark-field image, thereby acquiring the dark current noise signal of the imaging component itself. Next, the difference between the spectral image and the dark-field image can effectively eliminate inherent errors such as dark current and readout noise of the imaging component, making the pixel values ​​of the spectral image closer to the true reflected light intensity.

[0060] Based on the first and / or second embodiments of this application, in the third embodiment of this application, the content that is the same as or similar to that in embodiments one and two above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 , Figure 3 This is a flowchart illustrating Embodiment 3 of the pollutant detection method of this application. To obtain pollutant detection results, such as… Figure 3 As shown, in this embodiment, the step of identifying the current spectral vector using a preset pollution detection model to obtain the pollution detection result may include: Step S31: Using the number of bands of the multispectral illumination component, construct data from the current spectral vector to obtain a data cube containing spatial and spectral information.

[0061] It should be noted that the number of bands can be the number of different wavelengths of light emitted independently by a multispectral lighting component. For example, if a multispectral lighting component uses 10 LEDs with different wavelengths (such as 400nm, 450nm, ..., 700nm), then the number of bands is 10. Each band corresponds to a specific wavelength used to capture the reflectance characteristics of pollutants at that wavelength. The more bands, the higher the spectral resolution, and the more finely the components of pollutants can be distinguished.

[0062] Step S32: Truncate the data cube to obtain a spectral data block of a preset size.

[0063] Step S33: Identify the spectral data block using a preset contamination detection model to obtain the contamination detection result of the optical element under test.

[0064] It should also be noted that a data cube can be a three-dimensional data structure containing both spatial and spectral information, composed of both spatial (X, Y coordinates) and spectral (wavelength λ) dimensions. Specifically, the spectral vector of each pixel is used as spectral dimension data and combined with the spatial coordinates (rows and columns) of that pixel in the image to form a data cube that fuses spatial and spectral dimensions.

[0065] For example, if the image resolution is 1000×1000 pixels and the number of bands is 10, then the data cube size is 1000×1000×10, and each voxel represents the reflectance value of a spatial location at a specific wavelength.

[0066] In practical use, for a pixel to be analyzed, a spectral data block of size HxWxN (i.e., the preset size) can be extracted centered on that pixel. Here, H (height) and W (width) represent the spatial dimensions of a small neighborhood; N (number of channels) represents the number of bands in the spectral image. This spectral data block contains not only the spectral information of the central pixel but also the spatial context information of its surrounding pixels. This spectral data block is then used as input to a preset contamination detection model, directly outputting the final contamination detection result.

[0067] The embodiments of this application utilize data cubes to simultaneously preserve the spatial distribution of pollutants (such as particle size and location) and spectral characteristics (such as compositional differences), avoiding the limitations of single-dimensional analysis.

[0068] Furthermore, in the process of the model identifying the spectral data block, in this embodiment, the step of identifying the spectral data block using a preset contamination detection model to obtain the contamination detection result of the optical element under test includes: The spectral data block is input into a preset contamination detection model, which includes a downsampling layer, a feature extraction layer, an attention layer, and an output layer. The downsampling layer is used to downsample the spectral data block to obtain a downsampled data block; the feature extraction layer is used to extract features from the downsampled data block to obtain joint spatial and spectral features. The attention layer is used to perform attention weighting on the spatial and spectral joint features to obtain weighted spatial and spectral joint features; the output layer is used to identify the weighted spatial and spectral joint features to obtain pollution detection results.

[0069] Specifically, downsampling layers can use max pooling or average pooling layers. Pooling layers reduce computation by decreasing the spatial size of features in spectral data blocks; they also expand the receptive field of subsequent feature extraction layers, allowing them to see a wider area; and they enhance the translation invariance of the model, meaning that pollutants can be identified regardless of their location.

[0070] For the feature extraction layer, a 3D convolution kernel can be used. The convolution kernel slides along the three dimensions of the data cube: height, width, and spectral depth, which can simultaneously extract spatial-spectral joint features.

[0071] For the attention layer, a channel attention mechanism (such as the SENet module) can be embedded in the model. This module automatically learns the weights of each spectral channel and strengthens the bands that are most important to the current recognition task, while suppressing unimportant or noisy bands, to obtain weighted joint spatial and spectral features.

[0072] In the output layer, the final extracted weighted spatial and spectral joint features can be flattened and fed into one or more fully connected layers for integration. Finally, a softmax activation function can be used to output a probability vector. For example, [P(dust)=0.02, P(grease)=0.95, P(fiber)=0.03, P(clean)=0.00] indicates that the center pixel has a 95% probability of being grease.

[0073] Finally, the coverage area and proportion of various pollutants can be statistically analyzed to generate a comprehensive report. By analyzing the composition of pollutants, staff can be assisted in tracing pollution sources and thus proactively controlling pollution.

[0074] The model in this embodiment compresses the data scale through a downsampling layer, jointly learns spatial-spectral features through a feature extraction layer, and enhances key signals through an attention layer, forming a feature processing flow from coarse to fine, which further improves the accuracy of pollutant detection.

[0075] Furthermore, considering model training, in this embodiment, before the step of acquiring an image of the illuminated optical element under test through the imaging component to obtain a multi-band spectral image, the method further includes: Acquire sample spectral images of various contaminants in optical components, and extract features from the sample spectral images to obtain the corresponding sample spectral vectors; The sample spectral vectors are labeled to obtain pollutant category labels; A preset pollution detection model is obtained by training the model using the sample spectral vector and the pollutant category label.

[0076] It should be noted that the sample spectral vector can be a one-dimensional vector extracted from the sample spectral image to characterize the pollutant features.

[0077] Understandably, the pollutant category label can be a manual or automatic annotation of the pollutant type corresponding to the sample spectral vector, used to supervise the model's learning of the mapping relationship between pollutant features and categories. For example, if a sample spectral vector comes from an oil-contaminated area, its label is "oil"; if it comes from a non-contaminated area, the label is "non-contaminated." This embodiment does not impose any restrictions on this.

[0078] During model training, sample spectral vectors can be used as input and pollutant category labels as output. The model parameters are adjusted using a stochastic gradient descent algorithm to make the model output as close as possible to the true labels. For example, a CNN (Convolutional Neural Network) model can be trained using 1000 sets of sample spectral vectors (each set containing vector values ​​and corresponding labels). Initially, the model's prediction accuracy for oil is 60%. After updating the weights through backpropagation, the accuracy gradually increases to 95%, ultimately resulting in a highly accurate preset pollution detection model.

[0079] Since this embodiment uses sample spectral images as raw data, it transforms them into structured sample spectral vectors and category labels through feature extraction and annotation for model training. Model learning can avoid the subjectivity of human detection relying on experience.

[0080] For example, to help understand the implementation flow of the pollutant detection methods in the above embodiments of this application, please refer to... Figure 4 , Figure 4 This application provides an overall flowchart for testing optical components; specifically: During the on-site assembly and adjustment process, if the user begins contamination detection of optical components, the user can perform a self-test on the detector. After the self-test is successful, the optical component to be tested is placed in the detector. The multispectral illumination component then illuminates the optical component according to multispectral bands. The imaging component then acquires an image of the illuminated optical component, obtaining a multi-band spectral image. Next, feature extraction is performed on the spectral image to obtain the corresponding current spectral vector. Finally, a preset contamination detection model is used to identify the current spectral vector, yielding the contamination detection result. This result reflects the composition of the contaminants. It can then be determined whether the contamination exceeds the standard in the optical component. If it does, the optical component needs to be cleaned, and after cleaning, it is placed back in the detector for verification. This process continues until the contaminants in the optical component no longer exceed the standard, indicating that the optical component meets the usage standards. A test report is then generated, contamination detection and cleaning of this optical component is complete.

[0081] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the pollutant detection method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0082] This application also provides a pollutant detection device; please refer to... Figure 5 , Figure 5 This is a block diagram of the module structure of the pollutant detection device according to an embodiment of this application; in this embodiment, the pollutant detection device includes: The image acquisition module 501 is used to acquire images of the illuminated optical element under test through the imaging component to obtain multi-band spectral images. The multi-spectral illumination component is used to illuminate the optical element under test placed in the detector according to the multi-spectral band. Feature extraction module 502 is used to extract features from the spectral image to obtain the current spectral vector corresponding to the spectral image; The model recognition module 503 is used to recognize the current spectral vector through a preset pollution detection model to obtain pollution detection results. The preset pollution detection model is a deep learning model trained based on sample spectral images of various pollutants.

[0083] In this embodiment, the image acquisition module first acquires multi-band spectral images, and then the feature extraction module extracts the current spectral vector. Finally, the model recognition module uses a trained preset pollution detection model to directly identify the spectral vector of the spectral image. Compared with the existing single-wavelength visual inspection, this application can quickly identify the components of pollutants through the model when conducting pollution screening in the on-site assembly and adjustment process, providing a basis for precise cleaning operations at the assembly and adjustment site.

[0084] In one implementation, the feature extraction module 502 is further configured to perform flat-field correction on the spectral image based on a preset whiteboard image to obtain a corrected spectral image, wherein the whiteboard image is a reference image obtained by taking a picture of a diffuse reflection standard whiteboard; extract the relative reflectance value of each pixel in the corrected spectral image as a unit; arrange the relative reflectance values ​​of each pixel in the wavelength order of the multispectral bands to obtain a multidimensional vector, and use the multidimensional vector as the current spectral vector of each pixel.

[0085] In one implementation, the feature extraction module 502 is further configured to cover the lens of the imaging component and acquire an image through the lens to obtain a dark field image; subtract the spectral image from the dark field image to obtain a uniformly illuminated spectral image; and perform flat-field correction on the uniformly illuminated spectral image based on a preset whiteboard image to obtain a corrected spectral image.

[0086] In one implementation, the model recognition module 503 is further configured to construct data from the current spectral vector using the number of bands of the multispectral illumination component, to obtain a data cube containing spatial and spectral information; to truncate the data cube to obtain a spectral data block of a preset specification; and to identify the spectral data block using a preset contamination detection model to obtain the contamination detection result of the optical element under test.

[0087] In one implementation, the model recognition module 503 is further configured to input the spectral data block into a preset pollution detection model, the preset pollution detection model including a downsampling layer, a feature extraction layer, an attention layer, and an output layer; the downsampling layer is configured to downsample the spectral data block to obtain a downsampled data block; the feature extraction layer is configured to extract features from the downsampled data block to obtain spatial and spectral joint features; the attention layer is configured to perform attention weighting on the spatial and spectral joint features to obtain weighted spatial and spectral joint features; the output layer is configured to recognize the weighted spatial and spectral joint features to obtain a pollution detection result.

[0088] In one implementation, the model recognition module 503 is further configured to acquire sample spectral images of various pollutants in optical elements, extract features from the sample spectral images to obtain corresponding sample spectral vectors, label the sample spectral vectors to obtain pollutant category labels, and perform model learning training using the sample spectral vectors and the pollutant category labels to obtain a preset pollution detection model.

[0089] In one implementation, the image acquisition module 501 is also used to calibrate the test area of ​​the optical element under test; to illuminate the test area sequentially by the multispectral illumination component according to the multispectral bands; and to acquire images of the illuminated test area by the imaging component under the illumination of each spectral band to obtain a multispectral image.

[0090] Other embodiments or specific implementations of the pollutant detection device of this application can be found in the above-described method embodiments, and will not be repeated here.

[0091] The pollutant detection device provided in this application, employing the pollutant detection method described in the above embodiments, can solve the technical problem that traditional single-wavelength oblique illumination inspection of optical elements is difficult to identify pollutant components. Compared with the prior art, the beneficial effects of the pollutant detection device provided in this application are the same as those of the pollutant detection method provided in the above embodiments, and other technical features of the pollutant detection device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0092] This application provides a detector, which is equipped with a multispectral illumination component and an imaging component; The detector further includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the pollutant detection methods in the above embodiments.

[0093] The following is for reference. Figure 6 , Figure 6 This is a schematic diagram of the hardware operating environment involved in the detector in the embodiments of this application, which shows a schematic diagram of the detector suitable for implementing the embodiments of this application. Figure 6 The detector shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0094] like Figure 6 As shown, the detector may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the detector. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: an input device 1007 including, for example, an image sensor; an output device 1008 including, for example, a speaker; a storage device 1003 including, for example, a hard disk; and a communication device 1009. The communication device 1009 allows the detector to communicate wirelessly or wiredly with other devices to exchange data. Although a detector with various systems is shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems may be implemented or possessed alternatively.

[0095] The detector provided in this application, employing the pollutant detection method described in the above embodiments, can solve the technical problem that traditional single-wavelength oblique illumination inspection of optical elements is difficult to identify pollutant components. Compared with the prior art, the beneficial effects of the detector provided in this application are the same as those of the pollutant detection method provided in the above embodiments, and other technical features of the detector are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0096] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0097] The above description is merely a specific embodiment of this application, 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 technical scope 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.

[0098] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to perform the pollutant detection method in the above embodiments.

[0099] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, radio frequency (RF), etc., or any suitable combination thereof.

[0100] The aforementioned computer-readable storage medium may be included in the detector or may exist independently without being assembled into the detector.

[0101] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by the detector, the detector causes the detector to: acquire an image of the illuminated optical element under test through the imaging component to obtain a multi-band spectral image; the multi-spectral illumination component is used to illuminate the optical element under test placed in the detector according to the multi-spectral bands; extract features from the spectral image to obtain the current spectral vector corresponding to the spectral image; and identify the current spectral vector through a preset pollution detection model to obtain a pollution detection result. The preset pollution detection model is a deep learning model trained based on sample spectral images of various pollutants.

[0102] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0103] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0104] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0105] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described pollutant detection method. This solves the technical problem that traditional single-wavelength oblique illumination inspection of optical elements is difficult to identify pollutant components. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the pollutant detection method provided in the above embodiments, and will not be repeated here.

[0106] The above description is only a part of the embodiments of this application and does not limit the scope of protection of this application. All equivalent structural transformations made under the technical concept of this application and using the content of this application specification and drawings, or direct / indirect applications in other related technical fields, are included in the scope of protection of this application.

Claims

1. A method for detecting pollutants, characterized in that, The pollutant detection method is applied to a detector equipped with a multispectral illumination component and an imaging component, and the method includes: The imaging component acquires an image of the optical element under test that is illuminated by the light, and obtains a multi-band spectral image. The multi-spectral illumination component is used to illuminate the optical element under test placed in the detector according to the multi-spectral band. Feature extraction is performed on the spectral image to obtain the current spectral vector corresponding to the spectral image; The pollution detection result is obtained by identifying the current spectral vector through a preset pollution detection model, which is a deep learning model trained on sample spectral images of various pollutants.

2. The method as described in claim 1, characterized in that, The step of extracting features from the spectral image to obtain the current spectral vector corresponding to the spectral image includes: The spectral image is flat-field corrected based on a preset whiteboard image to obtain a corrected spectral image. The whiteboard image is a reference image obtained by taking a picture of a diffuse reflection standard whiteboard. The relative reflectance value of each pixel in the corrected spectral image is extracted. The relative reflectance values ​​of each pixel are arranged in order of wavelength of the multispectral bands to obtain a multidimensional vector, and the multidimensional vector is used as the current spectral vector of each pixel.

3. The method as described in claim 2, characterized in that, The step of performing flat-field correction on the spectral image based on a preset whiteboard image to obtain a corrected spectral image includes: The lens of the imaging component is covered, and an image is acquired through the lens to obtain a dark field image; The difference between the spectral image and the dark field image is used to obtain a spectral image with uniform illumination. The uniformly illuminated spectral image is flat-field corrected based on a preset whiteboard image to obtain a corrected spectral image.

4. The method as described in claim 1, characterized in that, The step of identifying the current spectral vector using a preset pollution detection model to obtain pollution detection results includes: Using the number of bands of the multispectral illumination component, the current spectral vector is used to construct a data cube containing spatial and spectral information; The data cube is truncated to obtain spectral data blocks of a preset size; The spectral data block is identified by a preset contamination detection model to obtain the contamination detection result of the optical element under test.

5. The method as described in claim 4, characterized in that, The step of identifying the spectral data block using a preset contamination detection model to obtain the contamination detection result of the optical element under test includes: The spectral data block is input into a preset contamination detection model, which includes a downsampling layer, a feature extraction layer, an attention layer, and an output layer. The downsampling layer is used to downsample the spectral data block to obtain a downsampled data block; the feature extraction layer is used to extract features from the downsampled data block to obtain joint spatial and spectral features. The attention layer is used to perform attention weighting on the spatial and spectral joint features to obtain weighted spatial and spectral joint features; the output layer is used to identify the weighted spatial and spectral joint features to obtain pollution detection results.

6. The method as described in claim 1, characterized in that, Before the step of acquiring an image of the illuminated optical element under test through the imaging component to obtain a multi-band spectral image, the method further includes: Acquire sample spectral images of various contaminants in optical components, and extract features from the sample spectral images to obtain the corresponding sample spectral vectors; The sample spectral vectors are labeled to obtain pollutant category labels; A preset pollution detection model is obtained by training the model using the sample spectral vector and the pollutant category label.

7. The method according to any one of claims 1 to 6, characterized in that, The step of acquiring an image of the illuminated optical element under test through the imaging component to obtain a multi-band spectral image includes: Calibrate the test area of ​​the optical element under test; The multispectral illumination component illuminates the area to be detected sequentially according to the multispectral bands. Under illumination in each spectral band, the imaging component acquires images of the illuminated area to be detected, resulting in a multi-band spectral image.

8. A pollutant detection device, characterized in that, The device includes: The image acquisition module is used to acquire images of the illuminated optical element under test through the imaging component to obtain multi-band spectral images. The multi-spectral illumination component is used to illuminate the optical element under test placed in the detector according to the multi-spectral band. The feature extraction module is used to extract features from the spectral image to obtain the current spectral vector corresponding to the spectral image; The model recognition module is used to identify the current spectral vector through a preset pollution detection model to obtain pollution detection results. The preset pollution detection model is a deep learning model trained based on sample spectral images of various pollutants.

9. A detector, characterized in that, The detector is equipped with a multispectral illumination component and an imaging component; The detector further includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the pollutant detection method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the pollutant detection method as described in any one of claims 1 to 7.