Aspheric surface morphology measurement method and system based on deep learning
Through deep learning-based methods, morphology measurement of aspherical lenses is solved, and the problems of expensive equipment and complex operation in traditional methods are achieved, achieving high-precision and efficient aspherical morphology measurement.
Patent Information
- Application Number
- CN202411483473.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-10-23
AI Technical Summary
The three-dimensional morphology measurement method of traditional aspherical lens surfaces has problems such as expensive equipment, complex operation, and environmental sensitivity. Especially when dealing with aspherical lenses with large diameter, high curvature changes or fine structures, accuracy and efficiency are difficult to meet the needs.
Using the aspherical morphology measurement method based on deep learning, the simulated image data set is prepared, the deep learning network is trained, the optimal weight parameters are loaded, the multi-spot image data is centered, and the aspherical object is measured using the Fourier transform method. three-dimensional morphology.
The accuracy and efficiency of spot center positioning is improved, the network's ability to extract spot characteristics and suppress noise is enhanced, and high-precision measurement of the surface morphology of aspherical optical elements is achieved.
Smart Images

Figure CN119468972A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of optical measurement, and more specifically, to a method and system for measuring aspheric surface morphology based on deep learning. Background Art
[0002] In the fields of optical engineering, precision manufacturing, and optical instrument calibration, the three-dimensional surface topography measurement of aspheric lenses is crucial. Traditional measurement methods generally face challenges such as expensive equipment, complex operation, and sensitivity to the environment. In particular, when dealing with aspheric lenses with large apertures, high curvature changes, or fine structures, the accuracy and efficiency are difficult to meet the requirements.
[0003] In recent years, 3D shape measurement technology based on optical reflection principle and image processing has attracted attention due to its non-contact, fast and flexible characteristics. The key to 3D shape measurement technology lies in multi-spot center positioning. When facing the complex surface of aspheric lenses, the traditional spot center positioning method is easily affected by factors such as uneven illumination, spot deformation, image noise, etc., which leads to a decrease in positioning accuracy.
[0004] The rapid development of deep learning technology has provided new ideas for spot center positioning, and has demonstrated powerful capabilities in image processing, feature extraction, and predictive analysis. Studies have shown that deep learning models can automatically learn complex features in spot images and accurately locate the spot center. However, the multi-spot center positioning method based on deep learning is still in the research stage, and there are still problems such as high algorithm complexity and lack of real-time performance. Summary of the invention
[0005] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a method and system for aspheric surface morphology measurement based on deep learning to solve the above problems.
[0006] The above technical objectives of the present invention are achieved through the following technical solutions: A method for measuring aspheric surface morphology based on deep learning, comprising the following steps:
[0007] S1, preparing a simulation image data set, and dividing the image data set into a training set and a test set in a ratio of 8:2;
[0008] S2, loading the image data set into a deep learning network for training, and saving the optimal weight parameters;
[0009] S3, building a system to obtain multi-spot image data;
[0010] S4, loading the optimal weight parameter into the deep learning network, and then using the deep learning network to perform center positioning on the multi-spot image data;
[0011] S5. Use Fourier transform method to measure the three-dimensional morphology of non-spherical objects.
[0012] In one embodiment, the step S1 further includes:
[0013] S11, using a two-dimensional Gaussian function to generate a standard Gaussian spot;
[0014] S12, generating the standard Gaussian spot at different positions of the image, recorded as a standard Gaussian multi-spot image, and recording the center coordinates of each standard Gaussian spot;
[0015] S13, adding Gaussian noise and salt and pepper noise to the standard Gaussian multi-spot image, and recording it as a noisy multi-spot image;
[0016] S14, using the center coordinates of each standard Gaussian spot as a label and the noisy multi-spot image as corresponding data, dividing the noisy multi-spot image into a data set and a test set in a ratio of 8:2.
[0017] In one embodiment, the two-dimensional Gaussian function is:
[0018]
[0019] Among them, A is the total energy of the light spot, (x0, y0) is the center coordinate of the light spot, σ x and σ y They are the standard deviations along the x-axis and y-axis, respectively, and determine the width of the light spot in the corresponding directions.
[0020] In one of the embodiments, in step S2, the deep learning network includes a backbone part, an FPN-Neck part, and a detector part integrating a positioning attention module;
[0021] The step S2 specifically includes the following steps:
[0022] S21, inputting the simulation image data set into the backbone part, passing the input image through the first layer of Focus convolution, taking a value of each pixel for each image to be divided into four sub-images, and concentrating the information of each sub-image into the channel space, expanding the input channel by 4 times, and obtaining a spliced image with 12 channels;
[0023] Then, the stitched image is sequentially input into the first CBS module and the second CBS module, wherein the convolution layer of the first CBS module uses 16 convolution kernels of size 3x3 and stride 1 to expand the channels of the stitched image to 16 channels, and the convolution layer of the second CBS module uses 32 convolution kernels of size 3x3 and stride 2 to expand the channels of the stitched image to 32 channels and reduce the size of the stitched image by half;
[0024] The spliced image is passed through the C3 module to obtain a feature map Feature_C0;
[0025] S22, inputting the feature map Feature_C0 into the third CBS module of the trunk part, amplifying the shallow features by channel expansion, and then inputting it into the C3 module for feature learning, and outputting the feature map Feature_C1;
[0026] S23, the feature map Feature_C1 is passed through the fourth CBS module and the C3 module of the trunk part to obtain a feature map Feature_C2, and the feature map Feature_C2 is passed through the fifth CBS module and the C3 module of the trunk part, and then subjected to spatial pyramid pooling to obtain a feature map Feature_C3;
[0027] S24, taking the feature map Feature_C3 as the input of the multi-scale fusion feature FPN-Neck part, passing through the sixth CBS module of the neural network, and obtaining the feature map Feature_Up1 after upsampling operation;
[0028] S25, performing feature fusion on the feature map Feature_Up1 and the feature map Feature_C2 to obtain a fused feature map Feature_Fuse1, and then passing through the C3 module and the seventh CBS module of the neural network, and then performing an upsampling operation to obtain a feature map Feature_Up2;
[0029] S26, performing feature fusion on the feature map Feature_Up2 and the feature map Feature_C1 to obtain a fused feature map Feature_Fuse2, and then passing through the C3 module and the eighth CBS module of the neural network, and then performing an upsampling operation to obtain a feature map Feature_Up3;
[0030] S27, the feature map Feature_Up3 is feature-fused with the feature map Feature_C0 to obtain a feature map Feature_Fuse3, and then a feature map Feature_C4 is obtained by passing the convolution kernel size of 3*3 and the number of channels of 64 through the C3 module;
[0031] S28. Input the feature map Feature_C4 into the detector of the integrated positioning attention module to obtain a multidimensional array containing the coordinates of the center of the light spot.
[0032] In one of the embodiments, the detector integrated with the location attention module comprises a location attention module and a detection module;
[0033] The positioning attention module is composed of a channel attention module and a spatial attention module;
[0034] The execution steps of the channel attention module are:
[0035] Input feature map Get the one-dimensional channel weight matrix The one-dimensional channel weight matrix With the input feature map Multiply to generate a multi-scale feature map with channel attention
[0036] The execution steps of the spatial attention module are:
[0037] Input the feature map Get the spatial attention feature map containing position information The feature map With the characteristic diagram Multiply to get the feature map Defined as:
[0038]
[0039] The channel attention module generates a channel attention weight matrix by analyzing the channel correlation in the feature map. The specific formula is:
[0040]
[0041] F ex (F sq ,w)=σ(ω2δ(ω1F sq ))
[0042] F C (F,F ex )=F·F ex
[0043] Among them, i, j are the feature maps The i-th row and j-th column of , σ is the sigmoid activation function, δ is the ReLU activation function, ω1 and ω2 represent the weights of two different fully connected layers respectively;
[0044] The spatial attention module takes the input feature map The spatial mapping relationship is extracted from the image. Specifically, the relevant weights between different regions are captured through deep separable convolution, which reduces the computational overhead while retaining the channel correlation. The formula is defined as:
[0045]
[0046] Among them, DConv i×i Represents a depth-separable convolution with a convolution kernel size of i×i;
[0047] After the feature map Feature_C4 passes through the positioning attention module, the multi-scale features are input into the detection module;
[0048] The feature map The information is input into the CBS module and residual connections are introduced for cross-layer information flow. Finally, two parallel 1x1 convolutions are used to obtain the regression parameters and IoU values related to the detected target.
[0049] In one embodiment, in the step S2, it further includes: designing the loss function as a center loss function;
[0050] The center loss function is composed of the bounding box loss L ciou and confidence loss L conf Composition, which is defined as:
[0051] L=L ciou +L conf
[0052] Loss = (1-IoU) × L ciou +(1-IoU)×L ciou +IoU×L Center
[0053]
[0054] in, is the sample label, the point is 1, the background is 0, P i is the probability that the sample is predicted as a point;
[0055] B i is the predicted coordinate of the center of the i-th point, is the center coordinate of the label corresponding to the i-th point; IoU is the intersection over union ratio of the predicted box and the real box, p 2 (B,B gt ) represents the Euclidean distance between the predicted point and the true point, c is the diagonal length of the smallest outer rectangle containing the predicted value and the true value, α is the weight parameter, and v is used to measure the similarity of the aspect ratio between the predicted value and the true value. α and v are specifically defined as:
[0056]
[0057] Among them, w gt ,h gt and w, h are the width and height of the true box and the predicted box respectively.
[0058] In one embodiment, the step S3 comprises the following steps:
[0059] S31, installing the sensor on a dual-axis mobile platform;
[0060] S32, placing a rotating platform below the sensor;
[0061] S33, installing a computer, and electrically connecting the computer to the sensor, the dual-axis moving platform and the rotating platform respectively.
[0062] In one embodiment, the step S5 comprises the following steps:
[0063] S51, based on the center coordinates of each light spot of the multi-spot image, calculating the angle difference through the corresponding light spot coordinate positions on two adjacent multi-spot images;
[0064] S52. Reconstructing three-dimensional morphology information of the aspheric optical element based on the relationship between the Fourier series coefficient of the angle difference and the surface morphology.
[0065] An aspheric surface topography measurement system comprises a dual-axis moving platform, a sensor, a rotating platform and a computer;
[0066] Wherein, the sensor is arranged on the dual-axis moving platform;
[0067] The rotating platform is arranged below the sensor and corresponds to the sensor;
[0068] The computer is electrically connected to the sensor, the dual-axis moving platform and the rotating platform respectively.
[0069] The above-mentioned aspheric surface topography measurement method and system based on deep learning have the following beneficial effects:
[0070] First, it is more efficient and more accurate than traditional center positioning and deep learning positioning methods;
[0071] Second, spot feature extraction and feature fusion are performed to obtain high-level semantic information, improve the accuracy of spot center positioning detection, and enhance the network's ability to extract spot features and suppress noise;
[0072] Third, by increasing the weight of the point center loss in the later training stage, the positioning accuracy is further optimized, and the surface topography of the measured aspheric optical element is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 is a schematic flow chart of the measurement method in this embodiment;
[0074] Figure 2 is a schematic diagram of the structure of the deep learning network in this embodiment;
[0075] Figure 3 is a schematic diagram of the structure of the attention module in this embodiment;
[0076] Figure 4 Schematic diagram of the structure of the positioning attention module in this embodiment;
[0077] Figure 5 Schematic diagram of the structure of the detection module in this embodiment;
[0078] Figure 6 Schematic diagram of the structure of the measurement system in this embodiment;
[0079] Figure 7 is a comparison diagram of the light spot center positioning results of each method in this embodiment;
[0080] Figure 8 : is a comparison chart of the accuracy of each method in this embodiment;
[0081] Fig. 9 : is a stability comparison chart of each method in this embodiment;
[0082] Fig.10 3D shape measurement result diagram in this embodiment;
[0083] Fig.11 This is the effect diagram of generating a standard Gaussian spot in this embodiment.
[0084] In the figure: 1. Sensor; 2. Dual-axis moving platform; 3. Rotating platform; 4. Computer. DETAILED DESCRIPTION
[0085] The present invention is described in detail below in conjunction with the accompanying drawings and embodiments.
[0086] A deep learning-based aspheric surface topography measurement method, such as Figure 1 As shown, the following steps are included:
[0087] S1. Prepare a simulated image dataset and divide the image dataset into a training set and a test set in a ratio of 8:2;
[0088] S2, load the image dataset into the deep learning network for training and save the optimal weight parameters;
[0089] In this embodiment, the deep learning network of the present invention is trained for 300 epochs, using 4 batch sizes and a monotonically decreasing learning rate from 0.01 to 0.0001;
[0090] The SGD optimizer was selected for optimization, and its momentum decay and weight decay values were set to 0.937 and 0.0005. This optimization strategy enabled the model to avoid local minima, enhance training diversity, and prevent overfitting to the optimal result;
[0091] S3, building a system to obtain multi-spot image data;
[0092] S4, loading the optimal weight parameters into the deep learning network, and then using the deep learning network to perform center positioning on the multi-spot image data;
[0093] In this embodiment, the PyTorch deep learning framework is used on the PC side to realize the center positioning of the multi-spot image data through an integrated development environment called PyCharm;
[0094] S5. Use Fourier transform method to measure the three-dimensional morphology of non-spherical objects.
[0095] Step S1 also includes:
[0096] S11, using a two-dimensional Gaussian function to generate a standard Gaussian spot;
[0097] S12, generating standard Gaussian spots at different positions of the image, recorded as standard Gaussian multi-spot images, and recording the center coordinates of each standard Gaussian spot;
[0098] In this embodiment, if Fig.11 As shown, Matlab software is used to generate standard Gaussian spots at different positions on the image and record their center coordinates.
[0099] S13, adding Gaussian noise and salt and pepper noise to the standard Gaussian multi-spot image, and recording it as a noisy multi-spot image;
[0100] S14, using the center coordinates of each standard Gaussian spot as a label and the noisy multi-spot image as the corresponding data, the noisy multi-spot image is divided into a data set and a test set in a ratio of 8:2.
[0101] The two-dimensional Gaussian function is:
[0102]
[0103] Among them, A is the total energy of the light spot, (x0, y0) is the center coordinate of the light spot, σ x and σ y They are the standard deviations along the x-axis and y-axis, respectively, and determine the width of the light spot in the corresponding directions.
[0104] like Figure 3 , Figure 4 , Figure 5 , Figure 6 As shown, in step S2, the deep learning network includes a backbone part, an FPN-Neck part, and a detector part integrating a positioning attention module;
[0105] Step S2 specifically includes the following steps:
[0106] S21, input the simulation image data set into the backbone part, the input image passes through the first layer of Focus convolution, each image is divided into four sub-images by taking a value of one pixel every other pixel, and the information of each sub-image is concentrated in the channel space, the input channel is expanded by 4 times, and a spliced image with 12 channels is obtained;
[0107] Then the stitched image is input into the first CBS module and the second CBS module in sequence, wherein the convolution layer of the first CBS module uses 16 convolution kernels of size 3x3 and stride 1 to expand the channels of the stitched image to 16 channels, and the convolution layer of the second CBS module uses 32 convolution kernels of size 3x3 and stride 2 to expand the channels of the stitched image to 32 channels and reduce the size of the stitched image by half;
[0108] The spliced image passes through the C3 module to obtain the feature map Feature_C0;
[0109] S22, input the feature map Feature_C0 to the third CBS module of the trunk part, amplify the shallow features by channel expansion, and then input it into the C3 module for feature learning, and output the feature map Feature_C1;
[0110] S23, the feature map Feature_C1 is passed through the fourth CBS module and the C3 module of the trunk part to obtain the feature map Feature_C2, and the feature map Feature_C2 is passed through the fifth CBS module and the C3 module of the trunk part, and then subjected to spatial pyramid pooling to obtain the feature map Feature_C3;
[0111] S24, taking the feature map Feature_C3 as the input of the multi-scale fusion feature FPN-Neck part, passing through the sixth CBS module of the neural network, and obtaining the feature map Feature_Up1 after upsampling operation;
[0112] S25, feature fusion is performed on the feature map Feature_Up1 and the feature map Feature_C2 to obtain the fused feature map Feature_Fuse1, and then the fused feature map Feature_Up2 is obtained by upsampling through the C3 module and the seventh CBS module of the neural network;
[0113] S26, feature fusion is performed on the feature map Feature_Up2 and the feature map Feature_C1 to obtain the fused feature map Feature_Fuse2, and then the fused feature map Feature_Up3 is obtained by upsampling through the C3 module and the eighth CBS module of the neural network;
[0114] S27, feature map Feature_Up3 is feature-fused with feature map Feature_C0 to obtain feature map Feature_Fuse3, and then feature map Feature_C4 is obtained by passing it through the C3 module with a convolution kernel size of 3*3 and a channel number of 64;
[0115] S28. Input the feature map Feature_C4 into the detector of the integrated positioning attention module to obtain a multidimensional array containing the coordinates of the center of the light spot.
[0116] In this embodiment, if Figure 2 , Figure 3 , Figure 4 , Figure 5 As shown in the figure, the specific steps of preparing the simulated image dataset and loading it into the deep learning network for training are:
[0117] A standard Gaussian spot is generated using a two-dimensional Gaussian function, and based on the standard Gaussian spot at different positions of the image, an array Gaussian spot is generated and the true center coordinates of each array Gaussian spot are recorded, and a standard Gaussian multi-spot image is generated based on the above operations;
[0118] In order to make the standard Gaussian multi-spot image closer to the real imaging and increase the diversity of the data set, Gaussian noise with a variance less than or equal to 25 is added to the standard Gaussian multi-spot image to simulate the noise generated by the thermal motion of electronic components and circuit noise in the image sensor. In addition, salt and pepper noise with a density less than 0.025 is added to simulate defective pixels and damaged pixels in the image sensor, as well as pixels that may be lost during transmission, introducing irregular brightness changes and local information loss, so that the model can better learn to process local anomalies in the image;
[0119] Then, the prepared simulation image data set is used for model training at a ratio of 8:2, and the data set is loaded into the model for training;
[0120] The model training is mainly divided into three parts: the backbone part responsible for multi-scale feature extraction, the FPN-Neck part that integrates multi-scale features, and the detector part containing the positioning attention module. The specific training process is as follows:
[0121] In the main part:
[0122] The input image passes through the first layer of Focus convolution, specifically taking a value for every other pixel, which is similar to downsampling. In this way, it is divided into four sub-images. The four sub-images are similar but no information is lost. At the same time, the information is concentrated in the channel space, and the input channel is expanded by 4 times, that is, the channels of each sub-image in the channel dimension are spliced into 12 channels. Then the pictures are input into two CBS modules in turn. The convolution layer of the first CBS module uses 16 convolution kernels of size 3x3 and stride 1 to expand the channels of the image to 16 channels. The convolution layer of the second CBS module uses 32 convolution kernels of size 3x3 and stride 2 to expand the number of channels of the image to 32 channels and halve the image size. Finally, the feature map Feature_C0 is obtained through the C3 module, which reduces the number of parameters and improves the training speed.
[0123] The feature map Feature_C0 enters the C3 module after passing through the third CBS module, and uses channel expansion to amplify shallow features. By expanding the channel of the input features, high-dimensional to low-dimensional feature mapping is achieved, rich shallow information is obtained, and the feature map Feature_C1 is output;
[0124] The feature map Feature_C1 passes through the fourth CBS module and the C3 module to obtain the feature map Feature_C2, and then passes through the fifth CBS module and the C3 module, and then passes through the spatial pyramid pooling to obtain the multi-scale feature map Feature_C3;
[0125] In the FPN-Neck section:
[0126] Upsample represents the upsampling operation. The last feature map Feature_C3 of the backbone part responsible for multi-scale feature extraction enters the FPN-Neck part of multi-scale feature fusion. It first passes through the sixth CBS module of the neural network and undergoes the upsampling operation to obtain the feature map Feature_Up1.
[0127] The feature map Feature_Up1 is fused with the feature map Feature_C2 of the feature extraction part to obtain the fused feature map Feature_Fuse1. The fused feature map Feature_Fuse1 passes through the C3 module and the seventh CBS module of the neural network, and then undergoes an upsampling operation to obtain the feature map Feature_Up2.
[0128] The feature map Feature_Up2 is feature-fused with the feature map Feature_C1 of the feature extraction part to obtain the feature map Feature_Fuse2. The above operation is repeated to obtain the feature map Feature_Up3 through the C3 module, the eighth CBS module of the neural network and the upsampling operation.
[0129] Feature map Feature_Up3 is fused with feature map Feature_C0 to obtain feature map Feature_Fuse3, and then the feature map Feature_C4 is obtained through the C3 module with a convolution kernel size of 3*3 and a channel number of 64;
[0130] In the detector part with the localization attention module:
[0131] The feature map Feature_C4 finally obtained by the FPN-Neck part enters the positioning attention module, and then a multidimensional array containing the coordinate data of the center of the light spot is obtained.
[0132] like Figure 3 , Figure 4 and Figure 5 As shown, the detector (LAD) with integrated localization attention module includes a localization attention module (LAM) and a detection module (DM);
[0133] The localization attention module (LAM) consists of the channel attention module (CAM) and the spatial attention module (SAM);
[0134] The execution steps of the channel attention module (CAM) are:
[0135] Input feature map Get the one-dimensional channel weight matrix One-dimensional channel weight matrix With the input feature map Multiply to generate a multi-scale feature map with channel attention
[0136] The execution steps of the spatial attention module (SAM) are:
[0137] Input feature map Get the spatial attention feature map containing position information Feature Map With feature map Multiply to get the feature map Defined as:
[0138]
[0139] The channel attention module (CAM) generates a channel attention weight matrix by analyzing the channel correlation in the feature map. The specific formula is:
[0140]
[0141] F ex (F sq,w)=σ(ω2δ(ω1F sq ))
[0142] F C (F,F ex )=F·F ex
[0143] Among them, i and j are feature maps respectively. The i-th row and j-th column of , σ is the sigmoid activation function, δ is the ReLU activation function, ω1 and ω2 represent the weights of two different fully connected layers respectively;
[0144] The spatial attention module (SAM) extracts the input feature map The spatial mapping relationship is extracted from the image. Specifically, the relevant weights between different regions are captured through deep separable convolution, which reduces the computational overhead while retaining the channel correlation. The formula is defined as:
[0145]
[0146] Among them, DConv i×i Represents a depth-separable convolution with a convolution kernel size of i×i;
[0147] After the feature map Feature_C4 passes through the localization attention module (LAM), the multi-scale features are input into the detection module (DM);
[0148] The feature map The information is input into the CBS module and residual connections are introduced for cross-layer information flow. Finally, two parallel 1x1 convolutions are used to obtain the regression parameters and IoU values related to the detected target.
[0149] In step S2, it also includes: designing the loss function as a central loss function;
[0150] The center loss function is composed of the bounding box loss L ciou and confidence loss L conf Composition, which is defined as:
[0151] L=L ciou +L conf
[0152] Loss = (1-IoU) × L ciou +(1-IoU)×L ciou +IoU×L Center
[0153]
[0154] in, is the sample label, the point is 1, the background is 0, P iis the probability that the sample is predicted as a point; B i is the predicted coordinate of the center of the i-th point, is the center coordinate of the label corresponding to the i-th point; IoU is the intersection over union ratio of the predicted box and the real box, p 2 (B,B gt ) represents the Euclidean distance between the predicted point and the true point, c is the diagonal length of the smallest outer rectangle containing the predicted value and the true value, α is the weight parameter, and v is used to measure the similarity of the aspect ratio between the predicted value and the true value. α and v are specifically defined as:
[0155]
[0156] Among them, w gt ,h gt and w, h are the width and height of the true box and the predicted box respectively.
[0157] Step S3 includes the following steps:
[0158] S31, installing the sensor 1 on the dual-axis mobile platform 2;
[0159] S32, setting the rotating platform 3 below the sensor 1;
[0160] S33, installing the computer 4, and electrically connecting the computer 4 to the sensor 1, the two-axis moving platform 2 and the rotating platform 3 respectively.
[0161] In actual applications, the object to be measured is placed on the rotating platform 3, and the dual-axis mobile platform 2 is controlled by the computer 4 to move the sensor 1 to the top of the object to be measured. The rotating platform 3 is then controlled by the computer 4 to drive the object to be measured to rotate, and the sensor 1 is used to collect data to obtain a multi-spot image, which is then input into the deep learning network of the present invention for prediction to obtain the center data of each spot.
[0162] Step S5 includes the following steps:
[0163] S51, based on the center coordinates of each light spot in the multi-spot image, the angle difference is calculated through the corresponding light spot coordinate positions on two adjacent multi-spot images;
[0164] S52. Reconstruct the three-dimensional morphology information of the aspheric optical element based on the relationship between the Fourier series coefficient of the angle difference and the surface morphology.
[0165] In this embodiment, if Fig.10As shown in the figure, the Fourier transform method is used to measure the three-dimensional topography of aspheric objects. Specifically, a plano-convex cylindrical lens with a curvature radius of 500mm, 700mm and 1000mm is used as the workpiece to be measured. The angle difference information between two points on the aspheric optics is obtained through the spot center data. Finally, based on the relationship between the angle difference Fourier series coefficient and the surface topography, the three-dimensional topography information of the aspheric optical element is reconstructed. This is the measurement process of the surface of a plano-convex cylindrical lens with a curvature radius of 500mm, 700mm and 1000mm.
[0166] For the deviation PV value and STD value of the plano-convex cylindrical lens with different curvature radii reconstructed by using different spot center positioning methods, the analysis shows that for the workpieces with curvature radii of 500mm, 700mm and 1000mm, the PV value of the deep learning network of the present invention is improved by at least 31.64%, 44.87% and 31.09% respectively compared with other methods, and the STD value is improved by at least 27.78%, 30.00% and 25.45% respectively compared with other methods. The results show that this method can accurately measure aspheric optical elements, and the larger the curvature radius of the workpiece being measured, the smaller the curvature change and the higher the measurement accuracy. Detailed results are shown in Table 1.
[0167]
[0168] Table 1
[0169] The performance of each deep learning network is compared through a series of experiments.
[0170] In order to evaluate the efficiency of the deep learning network of the present invention in locating the center of each point in a multi-point image, a comparative analysis was conducted with typical traditional image processing methods such as the centroid method (GCM), Gaussian fitting method (GFM), circle fitting method (CFM), and geometric method (GM). The time taken by the deep learning network of the present invention to process multi-point images is 20.3ms, which is 34.82 times that of the centroid method, 35.59 times that of the geometric method, 43.90 times that of the circle fitting method, and 271.36 times that of the Gaussian fitting method.
[0171] To evaluate the positioning accuracy of the deep learning network of the present invention, a comparison was made with typical traditional image processing methods. Different methods were used to locate the center of the spot. The Euclidean distance between the obtained center and the precise center was taken as the positioning deviation E d , the calculation formula is as follows:
[0172]
[0173] Among them, (x i ,y i) are the coordinates of the spot center located by different methods, and (x0, y0) are the accurate spot center. Due to the change in spot shape caused by noise, the maximum positioning error of the circle fitting method (CFM) is 1.372 pixels. The Gaussian fitting method (GFM) is sensitive to noise, resulting in a fitting offset and a positioning error of 0.679 pixels. The geometric method (GM) estimates the center from the pixel average, and the offset caused by noise results in a positioning error of 0.531 pixels. The center of gravity method (GCM) is sensitive to uneven pixel distribution, and the positioning error is 0.223 pixels. In contrast, the model of the deep learning network of the present invention is trained on a spot image with various noises, and the positioning accuracy reaches 0.052 pixels, which effectively resists various noises while maintaining a high accuracy.
[0174] In order to comprehensively compare the performance of the deep learning network of the present invention, it is compared with other convolutional neural networks DSCNet and SCPNet. In addition, it is compared with mainstream object detection algorithms Faster RCNN, YOLOv5 and YOLOv8. The experiments are carried out under consistent settings using the same dataset. The evaluation indicators include mean deviation The maximum deviation (MD), standard deviation (STD) and processing time (including the data transfer time from CPU to GPU) are shown in Table 2 for detailed results.
[0175]
[0176]
[0177] Table 2
[0178] Average deviation of the deep learning network of the present invention The average deviation (MD) of DSCNet is 0.052 pixels, the maximum deviation (MD) is 0.063 pixels, the standard deviation (STD) is 0.011 pixels, and the processing time is 20.3ms, which has good positioning accuracy and reliability. YOLOv8 has a short processing time, but the center positioning accuracy is poor. Although the average deviation of DSCNet is The proposed method is relatively small, but it takes a long time because each point in the multi-spot image needs to be cut out first, then input into the network for processing, and finally the center of each point is calculated by the Gaussian fitting method. Therefore, the deep learning network of the present invention has better performance in processing the center positioning of each light spot in the multi-spot image.
[0179] like Figure 7As shown in the figure, the spot center positioning results of the deep learning network of the present invention are compared with different methods. It can be seen from the figure that the deep learning network of the present invention has better positioning accuracy and better effect than traditional algorithms such as the centroid method (GCM) and the Gaussian fitting method (GFM) and deep learning algorithms such as Faster RCNN and YOLOv8.
[0180] like Figure 8 As shown, in order to evaluate the robustness of the deep learning network of the present invention for the center positioning accuracy of light spots of different sizes, a spot center positioning accuracy comparison experiment was carried out within the range of 35 pixels (±10%). In the actual experiment, the size of the light spot fluctuates within a certain range, and the average value of the spot radius is about 35 pixels. In order to explore the robustness of the deep learning network of the present invention for the center positioning accuracy of light spots of different sizes, a spot center positioning accuracy comparison experiment was carried out within the range of 35 pixels (±10%) of the spot radius. The deep learning network of the present invention still maintains good center positioning accuracy within this range and has good robustness.
[0181] like Fig. 9 As shown, in order to evaluate the stability and noise resistance of the deep learning network of the present invention, under Gaussian noise (variance of 5-45), salt and pepper noise (density of 0.005-0.045) and combined noise of Gaussian noise (variance of 5-45) and salt and pepper noise (density of 0.005-0.045), comparisons are made with commonly used spot center positioning algorithms, specifically traditional algorithms such as Gaussian fitting method (GFM), circle fitting method (CFM), geometric method (GM) and deep learning methods such as YOLOv8 and DSCNet.
[0182] As the noise level increases, the positioning error of the traditional algorithm increases significantly, while the stability of the deep learning method is better. Through further analysis, the deep learning network of the present invention keeps the error below 0.3 pixels, the Gaussian noise variance is less than 45, and the salt and pepper noise density is less than 0.045, which is better than the deep learning methods YOLOv8 and DSCNet. The deep learning network of the present invention has good stability when the Gaussian noise variance is less than 60 and the salt and pepper noise density is less than 0.060. The experimental results show that the deep learning network of the present invention can accurately locate the center of the light spot under high noise conditions and has good anti-interference ability.
[0183] In order to evaluate the effects of different improvement techniques on the spot center positioning accuracy, stability and computational efficiency of the deep learning network of the present invention, ablation experiments were conducted. In the first experiment, a convolutional neural network without the localization attention module (LAM) was used as the baseline model. The average deviation of the baseline model The average deviation (MD) is 0.314 pixels, the maximum deviation (MD) is 0.524 pixels, and the standard deviation (STD) is 0.093 pixels, which is relatively poor in stability. In the second experiment, the introduction of the localization attention module (LAM) significantly improved the center localization accuracy, where the average deviation The average deviation (MD) and the maximum deviation (MD) were reduced by 68.15% and 57.06% respectively, and the standard deviation (STD) was reduced by 34.41%. Although the number of parameters increased by only 1.15%, the amount of calculation increased by 13.78% and the processing time increased by 14.04%. In the third experiment, the center loss was used as the loss function of the second model. In the later training of the model, the center positioning accuracy was further improved by increasing the weight of the center loss. This makes the average deviation The maximum deviation (MD) and standard deviation (STD) are reduced by 48.00% and 72.00% respectively, and the standard deviation (STD) is reduced by 81.97%, which further improves the stability of the model. The detailed results are shown in Table 3.
[0184]
[0185] Table 3
[0186] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for measuring aspheric surface topography based on deep learning, characterized in that: The following steps are involved: S1, preparing a simulation image data set, and dividing the image data set into a training set and a test set in a ratio of 8:2; S2, loading the image data set into a deep learning network for training, and saving the optimal weight parameters; S3, building a system to obtain multi-spot image data; S4, loading the optimal weight parameter into the deep learning network, and then using the deep learning network to perform center positioning on the multi-spot image data; S5. Use Fourier transform method to measure the three-dimensional morphology of non-spherical objects.
2. The aspheric surface topography measurement method based on deep learning according to claim 1, characterized in that: The step S1 further comprises: S11, using a two-dimensional Gaussian function to generate a standard Gaussian spot; S12, generating the standard Gaussian spot at different positions of the image, recorded as a standard Gaussian multi-spot image, and recording the center coordinates of each standard Gaussian spot; S13, adding Gaussian noise and salt and pepper noise to the standard Gaussian multi-spot image, and recording it as a noisy multi-spot image; S14, using the center coordinates of each standard Gaussian spot as a label and the noisy multi-spot image as corresponding data, dividing the noisy multi-spot image into a data set and a test set in a ratio of 8:
2.
3. The aspheric surface topography measurement method based on deep learning according to claim 2, characterized in that: The two-dimensional Gaussian function is: Among them, A is the total energy of the light spot, (x0, y0) is the center coordinate of the light spot, σ x and σ y They are the standard deviations along the x-axis and y-axis, respectively, and determine the width of the light spot in the corresponding directions.
4. The aspheric surface topography measurement method based on deep learning according to claim 1, characterized in that: In step S2, the deep learning network includes a backbone part, an FPN-Neck part, and a detector part integrating a positioning attention module; The step S2 specifically includes the following steps: S21, inputting the simulation image data set into the backbone part, passing the input image through the first layer of Focus convolution, taking a value of each pixel for each image to be divided into four sub-images, and concentrating the information of each sub-image into the channel space, expanding the input channel by 4 times, and obtaining a spliced image with 12 channels; Then, the stitched image is sequentially input into the first CBS module and the second CBS module, wherein the convolution layer of the first CBS module uses 16 convolution kernels of size 3x3 and stride 1 to expand the channels of the stitched image to 16 channels, and the convolution layer of the second CBS module uses 32 convolution kernels of size 3x3 and stride 2 to expand the channels of the stitched image to 32 channels and reduce the size of the stitched image by half; The spliced image is passed through the C3 module to obtain a feature map Feature_C0; S22, inputting the feature map Feature_C0 into the third CBS module of the trunk part, amplifying the shallow features by channel expansion, and then inputting it into the C3 module for feature learning, and outputting the feature map Feature_C1; S23, the feature map Feature_C1 is passed through the fourth CBS module and the C3 module of the trunk part to obtain a feature map Feature_C2, and the feature map Feature_C2 is passed through the fifth CBS module and the C3 module of the trunk part, and then subjected to spatial pyramid pooling to obtain a feature map Feature_C3; S24, taking the feature map Feature_C3 as the input of the multi-scale fusion feature FPN-Neck part, passing through the sixth CBS module of the neural network, and obtaining the feature map Feature_Up1 after upsampling operation; S25, performing feature fusion on the feature map Feature_Up1 and the feature map Feature_C2 to obtain a fused feature map Feature_Fuse1, and then passing through the C3 module and the seventh CBS module of the neural network, and then performing an upsampling operation to obtain a feature map Feature_Up2; S26, performing feature fusion on the feature map Feature_Up2 and the feature map Feature_C1 to obtain a fused feature map Feature_Fuse2, and then passing through the C3 module and the eighth CBS module of the neural network, and then performing an upsampling operation to obtain a feature map Feature_Up3; S27, the feature map Feature_Up3 is feature-fused with the feature map Feature_C0 to obtain a feature map Feature_Fuse3, and then a feature map Feature_C4 is obtained by passing the convolution kernel size of 3*3 and the number of channels of 64 through the C3 module; S28. Input the feature map Feature_C4 into the detector of the integrated positioning attention module to obtain a multidimensional array containing the coordinates of the center of the light spot.
5. The aspheric surface topography measurement method based on deep learning according to claim 4, characterized in that: The detector integrated with the positioning attention module comprises a positioning attention module and a detection module; The positioning attention module is composed of a channel attention module and a spatial attention module; The execution steps of the channel attention module are: Input feature map Get the one-dimensional channel weight matrix The one-dimensional channel weight matrix With the input feature map Multiply to generate a multi-scale feature map with channel attention The execution steps of the spatial attention module are: Input the feature map Get the spatial attention feature map containing position information The feature map With the characteristic diagram Multiply to get the feature map Defined as: The channel attention module generates a channel attention weight matrix by analyzing the channel correlation in the feature map. The specific formula is: F ex (F sq ,w)=σ(ω2δ(ω1F sq )) F C (F,F ex )=F·F ex Among them, i, j are the feature maps The i-th row and j-th column of , σ is the sigmoid activation function, δ is the ReLU activation function, ω1 and ω2 represent the weights of two different fully connected layers respectively; The spatial attention module takes the input feature map The spatial mapping relationship is extracted from the image. Specifically, the relevant weights between different regions are captured through deep separable convolution, which reduces the computational overhead while retaining the channel correlation. The formula is defined as: Among them, DConv i×i Represents a depth-separable convolution with a convolution kernel size of i×i; After the feature map Feature_C4 passes through the positioning attention module, the multi-scale features are input into the detection module; The feature map The information is input into the CBS module and residual connections are introduced for cross-layer information flow. Finally, the regression parameters and IoU values related to the detected target are obtained through two parallel 1x1 convolutions.
6. The aspheric surface topography measurement method based on deep learning according to claim 1, characterized in that: In the step S2, it also includes: designing the loss function as a central loss function; The center loss function is composed of the bounding box loss L ciou and confidence loss L conf Composition, which is defined as: L=L ciou +L conf Loss=(1-IoU)×L ciou +(1-IoU)×L ciou +IoU×L Center in, is the sample label, the point is 1, the background is 0, P i is the probability that the sample is predicted as a point; B i is the predicted coordinate of the center of the i-th point, is the center coordinate of the label corresponding to the i-th point; IoU is the intersection over union ratio of the predicted box and the real box, p 2 (B,B gt ) represents the Euclidean distance between the predicted point and the true point, c is the diagonal length of the smallest outer rectangle containing the predicted value and the true value, α is the weight parameter, and v is used to measure the similarity of the aspect ratio between the predicted value and the true value. α and v are specifically defined as: Among them, w gt ,h gt and w, h are the width and height of the true box and the predicted box respectively.
7. The aspheric surface topography measurement method based on deep learning according to claim 1, characterized in that: The step S3 comprises the following steps: S31, installing the sensor on a dual-axis mobile platform; S32, placing a rotating platform below the sensor; S33, installing a computer, and electrically connecting the computer to the sensor, the dual-axis moving platform and the rotating platform respectively.
8. The aspheric surface topography measurement method based on deep learning according to claim 1, characterized in that: The step S5 comprises the following steps: S51, based on the center coordinates of each light spot of the multi-spot image, calculating the angle difference through the corresponding light spot coordinate positions on two adjacent multi-spot images; S52. Reconstructing three-dimensional morphology information of the aspheric optical element based on the relationship between the Fourier series coefficient of the angle difference and the surface morphology.
9. An aspheric surface topography measurement system, characterized in that: It includes a dual-axis mobile platform, a sensor, a rotating platform and a computer; Wherein, the sensor is arranged on the dual-axis moving platform; The rotating platform is arranged below the sensor and corresponds to the sensor; The computer is electrically connected to the sensor, the dual-axis moving platform and the rotating platform respectively.
Citation Information
Patent Citations
Test device for planar three-dimensional shape based on multiple-beam angle adaptive optics and processing method thereof
CN110702026A
Deep learning distorted light spot center extraction method suitable for high-precision morphology measurement
CN112950650A
Distortion light spot correction method suitable for high-reflection element three-dimensional shape measurement
CN116612030A
Photovoltaic module crack detection method and system based on deep learning
CN116703812A
Multi-light-spot denoising correction method based on image conversion and three-dimensional reconstruction method
CN117952854A