SGD-PSO-based lens parameter generation method and apparatus, and storage medium

By adopting the SGD-PSO-based lens parameter generation method in optical design, combined with the global algorithm of multi-system parallel optimization and gradient enhancement, the problem of local minimum value trap in optical design is solved, and more efficient, stable and diverse optimization results are achieved.

CN119987015AActive Publication Date: 2025-05-13SHANGHAI JIAOTONG UNIV +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411945981.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-05-13
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

Existing optical design methods are prone to falling into local minimums in lens design, making it difficult to find global optimal solutions, and the selection of initial structures depends on experience and is inefficient.

Method used

The lens parameter generation method based on SGD-PSO is adopted, and the multi-particle parallel optimization algorithm is prompted through global information, combined with multi-system independent parallel local optimization algorithm and heuristic global search algorithm, and a gradient-enhanced global algorithm is used to improve the quality and efficiency of optimization results.

Benefits of technology

It significantly improves the optimization results, efficiency, stability and diversity of optical design, reduces the demand for designer skills, and improves the efficiency of computing power use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119987015A_ABST
    Figure CN119987015A_ABST
Patent Text Reader

Abstract

The invention relates to a lens parameter generation method and device based on SGD-PSO, and a storage medium, and the method comprises the steps: S1, obtaining the basic configuration of a lens in an optical system, and carrying out the analysis based on the basic configuration of the lens, and obtaining the number of lenses, design requirements, and a parameter set; s2, an optimization target is constructed based on design requirements, a fitness function is defined according to an optimized target function, particles are defined based on the parameter set, and the position of each particle represents a set of values of the parameter set; s3, performing optimization by adopting an SGD-PSO mode to obtain an optimization result; and S4, obtaining the value of each parameter in the parameter set based on an optimization result. Compared with the prior art, the global information prompt multi-particle parallel optimization algorithm which can fully explore the solution space and improve the computing power use efficiency is used, and a multi-system independent parallel local optimization algorithm, a heuristic global search algorithm and an additionally-proposed gradient enhanced global algorithm are used; and the optimization result, the effective rate, the stability and the diversity are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of optical system optimization, and in particular to a lens parameter generation method, device and storage medium based on SGD-PSO. Background Art

[0002] Lens design is a nonlinear optimization problem where the optimization target is greater than the variable, and there are many local minimum values ​​in the landscape of the evaluation function. Traditional optical design methods rely heavily on the selection of the initial structure to obtain a good design result. For example, Chinese patent CN114063281A discloses an artificial intelligence method for designing lens optical systems. The method includes the following steps: S1, obtaining market demand; S2, calling the screening module to obtain lens parameters according to market demand; S3, calling the algorithm optimization module to obtain the initial structure of the lens according to the lens parameters; S4, calling the interface interaction module to obtain the lens optimization parameters according to the initial structure; S5, calling the design optimization module to obtain the optical design parameters of the lens according to the optimization parameters; S6, calling the artificial intelligence evaluation module to evaluate whether the optical design parameters in step S5 meet the requirements of the lens parameters in step S2; if they meet the requirements, the final design of the lens is obtained. However, in the prior art, including the above-mentioned lens optical system design method, the designer needs to guide the system to gradually escape from the local minimum of the difference and find the local optimal solution that meets each goal as much as possible. The local optimization algorithms commonly used in optical design optimization, such as the least squares method and the gradient descent method, rely heavily on the initial structure of the system, and two close starting points may lead to completely different results. As a result, the optical design process is a tedious and complex trial-and-error optimization process. An initial structure with consistent indicators and superior performance is crucial in reducing the demand on designers' design skills and alleviating the consumption of manpower and material resources.

[0003] When currently optimizing a specific optical system, optical designers will select a system with similar indicators as a starting point through empirical data and other means. However, due to various system indicators and application scenarios, completely matching initial structures are scarce, such as free-form surfaces and aspherical optical systems.

[0004] For some common optical systems with a small number of variables, in order to quickly obtain high-quality starting points that meet the indicators, some researchers have sampled the indicators at equal intervals, intensively optimized the system, established an optical system database, trained deep learning networks, and directly obtained the initial structure by inputting indicators. This method takes a long time in the early data preparation and model training, but after the network is trained, a large number of available initial structures can be quickly generated after the indicators are given. However, when facing complex and novel optical systems, this idea faces problems such as lack of data or expensive database construction. Introducing unsupervised signals into the network training process alleviates the demand for data, but for systems with fixed parameters, we do not know the diversity of the initial structure of the output. For a limited data set, it is also unknown whether the output results can show system configurations outside the training data set.

[0005] Some researchers also use high-performance computing to optimize multiple systems at the same time. Multiple results can be obtained at one time for designers to select the most promising solution, using computing power instead of manpower. This method explores multiple local solution spaces and obtains multiple local minima as the initial structure. We refer to this idea and use a multi-system parallel local optimization algorithm. We find that most particles are confined to a poor area from beginning to end because the local algorithm is difficult to jump out of the local minimum. This is inefficient and wastes a lot of computing power.

[0006] The selection of common initial structures also involves heuristic global optimization algorithms, exploring multiple local regions in the solution space at the same time, and using the information interaction between the solutions in each region to guide the convergence of the solution to obtain the global optimal solution. Common global algorithms include particle swarm, genetic algorithm, simulated annealing, etc. The starting point is usually random and can be used to explore novel optical systems or find alternative solutions to known optical systems. The results obtained need to be further optimized using local algorithms to obtain an optical system that meets the indicators.

[0007] Based on this, some technicians have tried to introduce the particle swarm algorithm to optimize lens parameters. However, the update of each particle in the particle swarm algorithm depends on the local direction determined by the particle's historical optimal solution and the global direction determined by the best result among all particles. However, the entire exploration process is actually blind. In most cases, particles descend diagonally along the hillside instead of descending fastest along the gradient. It is difficult for each particle to explore the local minimum in its own area. This phenomenon is particularly serious when facing multi-variable complex optical system optimization problems, especially high-variable dimensional problems such as aspheric surfaces and free-form surfaces. The quality of the results is highly related to the choice of random starting points.

[0008] Differentiable ray tracing is widely used in the joint optimization tasks of optical systems and image processing. The differentiable ray tracing model can quickly obtain the gradient of the optimization target for each parameter to guide the update of each parameter through the differentiable characteristics of the objective function to the variable. Combined with the most advanced deep learning algorithm based on gradient descent optimization, it can achieve optical-image joint optimization and adaptively align the imaging link of the system and algorithm to pursue higher and better imaging quality. Some researchers have also optimized advanced indicators and complex aspheric optical systems without an initial structural starting point using only the gradient descent algorithm based on differentiable ray tracing.

[0009] However, the actual situation is that it is difficult to determine a reasonable balance between the size of the gradient and the guidance of the global direction, resulting in most particles being quickly pulled to the area where the best particles are located, missing many potential local areas, and reducing the diversity of the results. In addition, since some areas can quickly obtain relatively low values, but lack further optimization potential, and some particles are pulled to other areas before their potential areas are fully explored, the stability of pso_sgd cannot be guaranteed. Summary of the invention

[0010] The purpose of the present invention is to provide a lens parameter generation method, device and storage medium based on SGD-PSO, using the proposed global information prompt multi-particle parallel optimization algorithm that can fully explore the solution space and improve the efficiency of computing power utilization, through independent parallel local optimization algorithms with multiple systems, heuristic global search algorithms and the proposed gradient enhanced global algorithm, the optimization results, efficiency, stability and diversity are greatly improved.

[0011] The purpose of the present invention can be achieved by the following technical solutions:

[0012] A lens parameter generation method based on SGD-PSO, comprising:

[0013] Step S1: obtaining the basic configuration of the lens in the optical system, and obtaining the number of lenses, design requirements, and parameter sets based on the basic configuration of the lens;

[0014] Step S2: construct an optimization target based on the design requirements, define a fitness function based on the optimized target function, and define particles based on the parameter set, wherein the position of each particle represents a set of values ​​of the parameter set;

[0015] Step S3: Use SGD-PSO to optimize and obtain the optimization result;

[0016] Step S4: Obtain the value of each parameter in the parameter set based on the optimization result.

[0017] During the optimization process of step S3, global information is provided for particles that simultaneously meet the following conditions:

[0018] Condition 1: The optimal loss of particles does not decrease for a certain number of generations.

[0019] Condition 2: The optimal solution of a particle is greater than the median of the optimal solutions of all particles.

[0020] Condition 3: The fitness value corresponding to the optimal solution of the particle still does not meet the requirements.

[0021] In step S3, when global information is provided, the particle velocity is updated as:

[0022]

[0023] Where: v i is the parameter update speed of the i-th particle, η is the learning rate, L is the loss function, θ is the i-th particle system parameter, w g is the global velocity weight, w mask Provides a mask for global information selectivity, θ best is the current optimal particle parameter.

[0024] The parameter set includes at least the radius, material and focal length of each lens, and the distance between any two adjacent lenses.

[0025] The objective function is configured to minimize the spot diagram loss, distortion loss, and longitudinal chromatic aberration loss under the conditions of effective focal length, back focal length, and total length standard of the optical system;

[0026] The spot diagram loss is:

[0027]

[0028] Among them: Loss spot is the point diagram loss, field_num is the number of parameters during system optimization, W spot_temp is the weight of the spot diagram of each field of view in the current generation, SPOT is the spot diagram of each field of view, SPOT(i) is the size of the spot diagram of the fth field of view, W spot is the spot diagram weight.

[0029] The objective function also includes a regularization term for guiding and avoiding unreasonable structures of the optical system and a light angle restriction for reducing the sensitivity of the optical system, wherein the unreasonable structures include surface intersections, total internal reflections and missed surfaces.

[0030] The surface intersection is achieved by limiting the z-axis interval between two intersection points of the same light ray on adjacent surfaces to be no less than a second threshold.

[0031] For glass-to-air surfaces, light that is about to undergo total internal reflection is penalized by limiting the cosine of the incident angle to less than 1.1 times the cosine of the critical angle for total internal reflection. For air-to-glass interfaces, light with larger incident angles is penalized by limiting the cosine of the incident angle to less than 0.5.

[0032] A lens parameter generation device based on SGD-PSO includes a memory, a processor, and a program stored in the memory, wherein the processor implements the above method when executing the program.

[0033] A storage medium stores a program, which implements the above method when executed.

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

[0035] 1. The proposed global information prompt multi-particle parallel optimization algorithm can fully explore the solution space and improve the efficiency of computing power. Through the independent parallel local optimization algorithm of multiple systems, the heuristic global search algorithm and the proposed gradient enhancement global algorithm, the optimization results, efficiency, stability and diversity are greatly improved.

[0036] 2. The objective function first makes the optical system meet the basic index requirements such as effective focal length, back focal length, and total length, while optimizing the rating indicators of the optical system performance such as point diagram, distortion, and longitudinal chromatic aberration as small as possible. Adding regularization terms to the objective function can guide and avoid unreasonable structures in the optical system such as: surface intersection, total internal reflection, and missed surfaces. In order to reduce the sensitivity of the optical system, this application also adds restrictions on the angle of light, requiring the light of the optical system to be relatively smooth. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a schematic flow chart of the main steps of the method of the present invention;

[0038] Figure 2 This is a diagram showing the principle of the SGD-PSO method;

[0039] Figure 3 It is a result display diagram in the embodiment of the present invention;

[0040] Figure 4 This is a schematic diagram of a training loss curve in an embodiment of the present invention;

[0041] Figure 5 It is a schematic diagram of the verification results of the efficiency and diversity of the results in the embodiment of the present invention;

[0042] Figure 6 Schematic diagram of stability verification results in an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0044] A lens parameter generation method based on SGD-PSO, such as Figure 1 As shown, including:

[0045] Step S1: obtaining the basic configuration of the lens in the optical system, and obtaining the number of lenses, design requirements, and parameter sets based on the basic configuration of the lens;

[0046] Among them, the design requirements analyzed in the basic configuration include effective focal length, back focal length, and total length, which are also the design goals. This application is to obtain a better lens configuration under the premise of meeting the above goals;

[0047] Step S2: construct an optimization target based on the design requirements, define a fitness function based on the optimized target function, and define particles based on the parameter set, wherein the position of each particle represents a set of values ​​of the parameter set;

[0048] Step S3: Use SGD-PSO to optimize and obtain the optimization result;

[0049] like Figure 2 As shown in the figure, for multi-particle independent local optimization, particles located in flat areas or poor local areas can never get effective results, wasting computing power. The blindness of the particle swarm makes it difficult for particles to reach the local optimal solution. The excessive traction of PSO-SGD global information causes some potential solution spaces to be missed. The SGD-PSO algorithm can ensure that the solution space is fully explored while helping some particles escape from flat areas or poor local minima.

[0050] This application introduces the fastest gradient descent and combines it with the particle swarm algorithm. In the standard particle swarm algorithm, the update direction of each particle is determined by the speed of the previous step, the optimal result position of the particle, and the best particle position among all particles in the current generation. However, in this application, combining the advantages and disadvantages of multi-particle parallel fastest gradient descent optimization and PSO-SGD, this application proposes an SGD-PSO optimization strategy: only provide global information for particles that meet the following conditions at the same time:

[0051] Condition 1: The optimal loss of particles does not decrease for a certain number of generations.

[0052] Condition 2: The optimal solution of a particle is greater than the median of the optimal solutions of all particles.

[0053] Condition 3: The fitness value corresponding to the optimal solution of the particle still does not meet the requirements.

[0054] When all three conditions above are met, it is considered that the local solution space where the particle is located has no exploration value, and global information should be provided until its optimal loss decreases: that is, it enters a new and better local solution space. At this time, stop providing global information and use the steepest descent method to perform local optimization.

[0055]

[0056] Where: v i is the parameter update speed of the i-th particle, η is the learning rate, L is the loss function, θ is the i-th particle system parameter, w g is the global velocity weight, w mask Provides a mask for global information selectivity, θ best is the current optimal particle parameter.

[0057] Before starting the optimization, all particles are randomly initialized to the so-called optimization starting point within the specified solution space. In order to improve the quality of the initial point, the starting point is screened according to the effective focal length efl, back focal length bfl, and point array size: First, filter out the points where the difference between efl and bfl and the target is too large. Then filter out the particles where ray tracing fails, the surface crosses, and the point array is too large. Due to the high parallelism of particles, the two-step starting point screening of this application only takes a few seconds, but can effectively improve the quality of the results.

[0058] In this embodiment, the parameter set includes at least the radius, material and focal length of each lens, and the distance between any two adjacent lenses.

[0059] The objective function is configured as follows: under the conditions of effective focal length, back focal length, and total length standard of the optical system, the spot diagram loss, distortion loss, and longitudinal chromatic aberration loss are minimized;

[0060] The size of the spot diagram can intuitively show the pros and cons of the system. For a large aberration system starting from a random starting point, using the spot diagram as the objective function is simple and direct. In order to add a certain fluctuation to the gradient descent process to skip the local minimum and balance the image quality of each field of view, this embodiment uses an adaptive field of view weight allocation rule, and the spot diagram loss is:

[0061]

[0062] Among them: Loss spot is the point diagram loss, field_num is the number of parameters during system optimization, W spot_temp is the weight of the spot diagram of each field of view in the current generation, SPOT is the spot diagram of each field of view, SPOT(i) is the size of the spot diagram of the fth field of view, W spot is the spot diagram weight.

[0063] The objective function also includes a regularization term for guiding and avoiding unreasonable structures of the optical system, and a ray angle restriction for reducing the sensitivity of the optical system, where unreasonable structures include surface intersections, total internal reflections, and missed surfaces.

[0064] In order to avoid the phenomenon of adjacent surfaces crossing during the optimization of the optical system, it is necessary to limit the z-axis interval between two intersection points of the same light ray on adjacent surfaces to not be less than a specified value. This embodiment only limits the minimum value of the light propagation along the optical axis path of each particle between every two surfaces to reduce memory usage. Specifically:

[0065]

[0066] Among them: Loss intersect is the minimum interval loss, W intersect To limit the surface cross loss weight, is the minimum allowed interval between the sth to s+1th surfaces, z s+1 is the global z coordinate of the intersection of the ray and the s+1th surface, z s is the global z-coordinate of the intersection of the ray with the sth surface.

[0067] For the glass-to-air interface, total reflection may occur due to the optical density medium to optical sparseness medium. This embodiment limits the incident angle cosine to less than 1.1 times the critical angle cosine of total internal reflection, and penalizes the light that is about to undergo total internal reflection. For the air-to-glass interface, miss surface is likely to occur. This embodiment limits the incident angle cosine to less than 0.5 (more than 70 degrees), penalizes light with a large incident angle, and avoids the occurrence of ray tracing failure:

[0068]

[0069] Among them: Loss incident is the incident light angle loss, W incident is the incident light angle loss weight, ∈ incident is the incident angle of all sampling rays, ∈ incident_ is the maximum allowed light incident angle;

[0070] Limiting the light angle is a simple and direct method to reduce the sensitivity of the optical system. This embodiment limits the minimum value of the cosine value of the angle between the light and the z-axis between each two surfaces. In this embodiment, the experimental setting is 0.6, corresponding to an angle of about 53°:

[0071]

[0072] Among them: Loss angle is the light transmission angle loss, W angleis the light transmission angle loss weight, ∈ angle is the transmission angle of all sampled rays, ∈ angle_limit is the maximum allowed light transmission angle,

[0073] Step S4: Obtain the value of each parameter in the parameter set based on the optimization result.

[0074] The following is an example of a design

[0075] In order to verify the effect of this application, experiments were conducted on a 12-variable Cooke three-piece lens, and the imaging quality of the obtained results was compared with three patents with similar indicators. A large number of experimental comparisons were also conducted on the SGD-PSO algorithm and the SGD algorithm for multi-particle independent parallel optimization, the multi-particle heuristic search algorithm PSO, and the PSO algorithm PSO-SGD enhanced by gradient information in terms of optimization results, convergence speed, algorithm efficiency and diversity, and robustness to the starting point, fully verifying the superiority of this embodiment.

[0076] The Cooke lens is designed with a three-piece structure, which consists of two positive crown glass lenses in the front and back and a negative flint glass lens in the middle. This three-piece three-group design effectively reduces the distortion of the lens edge while providing enough freedom to correct all primary aberrations.

[0077] The aperture is set in the middle of the second lens as the optimizable variable. The thickness of the first and third lenses plus the two thicknesses of the second lens separated by the aperture, the curvature of the six spherical surfaces and the two air thicknesses, a total of 12 variables constitute an optimization problem. The distance from the last lens to the image plane is set as the back focal length of the main wavelength.

[0078] The Cooke lens patent is selected as a comparison, and the glass used in the present application method is set to be the same as that in the patent, and the design indicators are limited as shown in Table 1:

[0079] Table 1

[0080] index Min Max index Min Max focal length 50mm 50mm Chromatic Aberration 80um F-number 6.25 Glass center thickness 3.5mm 10mm Half field of view 15° Minimum glass thickness 0.1mm wavelength 486nm 656m Air center thickness 1mm 10mm Back focus limit 20mm 100mm Minimum air thickness 0.02mm Total length 100mm Ray Angle Cosine 0.7 distortion 1 Cosine of angle of incidence 0.3

[0081] Select three bands of 486, 588, and 656, and four fields of view of 0, 5, 10, and 15. Use the default parameters of the adam optimizer, the learning rate cosine adjustment strategy, and the initial learning rate of 0.001. Set the number of particles to 4000, run 2000 generations, and each generation takes only 0.15 seconds on average, so the total time is less than 5 minutes.

[0082] The results are as follows Figure 3 As shown, the method proposed in this application obtains the best system point diagram size that reaches or even exceeds the patent result, the lens shape is reasonable, and the restrictions such as light angle are basically met.

[0083] In order to verify the superiority of the method proposed in this application, the advantages and disadvantages of the PSO_SGD, SGD-PSO and SGD, PSO proposed in this application are compared in terms of convergence speed and optimal results, algorithm stability, result efficiency and result diversity.

[0084] For the training loss curve, such as Figure 4 As shown in Figure 1, the gradient information will guide each particle to move in the direction where the loss decreases fastest, so the method with gradient information should converge much faster than PSO, which is confirmed by Figure 1. The loss curves of the four methods with the same starting point and the same weight are compared. The loss is the loss value of the smallest particle among all particles in each generation.

[0085] As can be seen from the figure:

[0086] The three methods with gradient information all converge quickly to a smaller loss value, start local oscillation and then slowly explore in depth. However, due to the blindness of optimization, PSO converges slowly and the final result converges poorly.

[0087] The loss curve only represents the result of the best particle and cannot show the optimization of all particles. Since SGD optimizes each particle separately, it is easy to find a good starting point and optimize to a good result for the characteristics of this Cooke experiment with few variables and a large number of particles. However, since most particles fall into the local minimum (shown in the result efficiency), computing resources are wasted, so the exploration of the solution space is not sufficient and it is difficult to find a better result.

[0088] Due to the aggregation of particles and the guidance of gradients, the PSO-SGD algorithm fully explores a small local solution space, and the results are better than SGD.

[0089] The SGD-PSO algorithm, due to its advanced optimization strategy, has a continuous and stable decline in loss, and its results are better than the other three algorithms. Moreover, due to the large range of the explored solution space, it can find a better local solution space than PSO-SGD.

[0090] For the results efficiency and diversity, such as Figure 5 As shown in Figure 1, optical designers always want to see more configurations of systems in as many available results as possible, so as to select systems with greater optimization potential as the starting point. Therefore, diversity is also an important consideration for an algorithm.

[0091] For the Cooke system, it is considered that a system that meets the requirements should have: all losses except the spot diagram loss are zero, and the average spot diagram size is less than 6um, so the effective threshold of particle loss is 0.03. Figure * counts the loss distribution of the optimal results in all particle exploration paths (particles with excessive losses are drawn into the figure), and calculates the proportion of effective particles.

[0092] In addition, it is generally believed that the range of variables in all valid results can reflect the diversity of results to a certain extent. Figure 1 shows the ratio of the range of each variable in the four algorithms to the range of the SGD algorithm (experiments have found that the diversity of the SGD algorithm is always richer).

[0093] Two statistical results show that:

[0094] Although the SGD algorithm is very diverse, the efficiency of its solutions is too low. It can be considered that the effective solutions are scattered in the explored solution space and the solution space is not fully explored. The repeated comparative experiments in the supplementary materials show that the efficiency of SGD is always very low.

[0095] Due to the guidance of the global optimal particle, the particles of the PSO algorithm tend to move closer to the optimal solution space, and the diversity of the results is very simple. Moreover, since there is no clear guidance direction for loss reduction, the results do not converge well and the efficiency fluctuates greatly (see Supplementary File **, five repeated experiments, efficiency and diversity statistics of various algorithms).

[0096] The PSO-SGD algorithm improves the PSO algorithm and uses the gradient as a clear optimization direction guide, so that the result fully explores the solution space where the global optimal particle is located. The result is highly efficient (but also highly volatile, refer to the supplementary file), and the diversity of solutions increases compared to PSO due to the improvement in efficiency. Because there is always global information to guide, some particles may find new potential local minimum areas in the process of approaching, but they are pulled away by global information before they are fully explored. We have also tried to turn on the global information in stages, but the results are always unsatisfactory.

[0097] The SGD-PSO algorithm gives each particle sufficient exploration time and only discards areas that are not worth exploring, ensuring the diversity of results while greatly improving efficiency. Similarly, because the number of valid solutions increases, it can be considered that the valid solutions are more densely distributed in the solution space, further improving the diversity of results.

[0098] In theory, by increasing the number of iterations, PSO, PSO-SGD, and SGD-PSO algorithms with global information guidance and clear loss reduction direction can gradually pull poor solutions to better areas, which can further improve efficiency. This is something that the SGD algorithm, which lacks particle information interaction, cannot do. However, PSO and PSO-SGD may also converge to an erroneous local solution space that cannot achieve effective indicators, so efficiency and stability cannot be guaranteed. The SGD-PSO algorithm gives particles a high degree of independent exploration freedom, which can explore more potential areas and improve the diversity of solutions. In practical applications, you can balance time and efficiency and make adjustments yourself.

[0099] For algorithm stability, such as Figure 6 As shown in the figure, under the same conditions, four methods are repeated five times with different starting points to compare the loss values ​​of the optimal results (for efficiency and diversity, see the supplementary material). Then, the efficiency of the four algorithms is compared under different numbers of particles.

[0100] Multiple experiments with different starting points show that:

[0101] The worst results of the proposed POS-SGD and SGD-PSO still exceed the best results of the SGD and PSO algorithms, indicating the stable performance of the two algorithms.

[0102] Theoretically, the loss of SGD only depends on the result of the best point, so the fluctuation is relatively small. Due to the blind optimization of the PSO algorithm, the results fluctuate greatly with the starting point.

[0103] PSO-SGD has large fluctuations. Occasionally, due to SGD-PSO, it is believed that it is caused by the full exploration of a small local solution space. Full exploration of a good local solution space can obtain better results, but if the poor local minimum is converged, this is usually due to the misleading of all particles by the poor local minimum that converges quickly, and the effect is not satisfactory.

[0104] The SGD-PSO algorithm, even if there is a poor local optimal solution that converges quickly, will not affect the independent optimization paths of most particles. The SGD-PSO algorithm can enable particles to explore more local spaces, thereby tapping more potential areas, making the algorithm more stable, that is, particles can always find a good local optimal solution.

[0105] The results show that PSO-SGD is superior. The PSO algorithm cannot converge effectively. When the number of particles is small, it is difficult for the SGD algorithm to find a starting point that is sufficient to converge to an effective solution by luck. The efficiency of the PSO-SGD algorithm depends more on the number and quality of the starting points. If the best result is not good enough, all the results will not converge effectively. However, SGD-PSO can always find a good enough result even if the number of particles is low.

[0106] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.

Claims

1. A lens parameter generation method based on SGD-PSO, characterized in that: include: Step S1: obtaining the basic configuration of the lens in the optical system, and obtaining the number of lenses, design requirements, and parameter sets based on the basic configuration of the lens; Step S2: construct an optimization target based on the design requirements, define a fitness function based on the optimized target function, and define particles based on the parameter set, wherein the position of each particle represents a set of values ​​of the parameter set; Step S3: Use SGD-PSO to optimize and obtain the optimization result; Step S4: Obtain the value of each parameter in the parameter set based on the optimization result.

2. The lens parameter generation method based on SGD-PSO according to claim 1, characterized in that: During the optimization process of step S3, global information is provided for particles that simultaneously meet the following conditions: Condition 1: The optimal loss of particles does not decrease for a certain number of generations. Condition 2: The optimal solution of a particle is greater than the median of the optimal solutions of all particles. Condition 3: The fitness value corresponding to the optimal solution of the particle still does not meet the requirements.

3. The lens parameter generation method based on SGD-PSO according to claim 2, characterized in that: In step S3, when global information is provided, the particle velocity is updated as: Where: v i is the parameter update speed of the i-th particle, η is the learning rate, L is the loss function, θ is the i-th particle system parameter, w g is the global velocity weight, w mask Provides a mask for global information selectivity, θ best is the current optimal particle parameter.

4. The lens parameter generation method based on SGD-PSO according to claim 1, characterized in that: The parameter set includes at least the radius, material and focal length of each lens, and the distance between any two adjacent lenses, and the objective function is configured to minimize the spot diagram loss, distortion loss and longitudinal chromatic aberration loss under the conditions of effective focal length, back focal length and total length of the optical system; 5. The lens parameter generation method based on SGD-PSO according to claim 4, characterized in that: The spot diagram loss is: Among them: Loss spot is the point diagram loss, field_num is the number of parameters during system optimization, W spot_temp is the weight of the spot diagram of each field of view in the current generation, SPOT is the spot diagram of each field of view, SPOT(i) is the size of the spot diagram of the fth field of view, W spot is the spot diagram weight.

6. The lens parameter generation method based on SGD-PSO according to claim 4, characterized in that: The objective function also includes a regularization term for guiding and avoiding unreasonable structures of the optical system and a light angle restriction for reducing the sensitivity of the optical system, wherein the unreasonable structures include surface intersections, total internal reflections and missed surfaces.

7. The lens parameter generation method based on SGD-PSO according to claim 6, characterized in that: The surface intersection is achieved by limiting the z-axis interval between two intersection points of the same light ray on adjacent surfaces to be no less than a second threshold.

8. The lens parameter generation method based on SGD-PSO according to claim 6, characterized in that: For glass-to-air surfaces, light that is about to undergo total internal reflection is penalized by limiting the cosine of the incident angle to less than 1.1 times the cosine of the critical angle for total internal reflection. For air-to-glass interfaces, light with larger incident angles is penalized by limiting the cosine of the incident angle to less than 0.

5.

9. A lens parameter generation device based on SGD-PSO, comprising a memory, a processor, and a program stored in the memory, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 8 is implemented.

10. A storage medium having a program stored thereon, characterized in that: When the program is executed, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Method for designing lens optical system through artificial intelligence

    CN114063281A

  • Optical lens performance change trend extraction method based on gradient analysis

    CN116974066A

  • Optical lens joint design method and system, computer equipment and storage medium

    CN118466010A

  • Camera pose decision method

    KR1020110098252A

  • Monocentric lens designs and associated imaging systems having wide field of view and high resolution

    US20150207990A1