Round reconstruction system based on reinforcement learning

Through the Markov decision process and PPO algorithm based on reinforcement learning, combined with the average measure estimator, the problem of insufficient robustness and accuracy of multi-circle detection in the existing technology is solved, and stable multi-circle detection in complex backgrounds is achieved. reconstruction.

CN118628516AActive Publication Date: 2024-09-10JIMEI UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410778739.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2024-09-10
Estimated Expiration
2044-06-17

AI Technical Summary

Technical Problem

Existing circle reconstruction algorithms are difficult to accurately detect polycircles when the image background is complex and noisy, and their robustness and flexibility are insufficient, especially when the eccentricity of the circles is large.

Method used

A circular reconstruction system based on reinforcement learning is adopted, using the Markov decision process and PPO algorithm to estimate the arc parameters through the interaction process between the agent and the environment, calculate the reward through the average measure estimator, and record the best interaction process for reconstruction Round.

Benefits of technology

It achieves stable and robust reconstruction of multiple circles in given image data, improves the accuracy and robustness of circle detection, and is suitable for complex backgrounds and noisy environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628516A
    Figure CN118628516A
Patent Text Reader

Abstract

The invention relates to the technical field of circle reconstruction algorithms, and discloses a circle reconstruction system based on reinforcement learning, which uses a Markov decision process to describe a multi-arc reconstruction process, that is, a decision is correspondingly made when a parameter of one arc is estimated, and a plurality of decisions are correspondingly made when parameters of a plurality of arcs are estimated. The action output by the intelligent agent module is received through the environment module, the award generated by the action is calculated by using the average measure estimator, the environment state is changed according to the action, and the generated award and the converted state are fed back to the intelligent agent; the agent module is used for receiving rewards and states output by the environment module, generating a new action and feeding back the new action to the environment module, and optimizing and updating an action strategy of an agent by using a PPO reinforcement learning algorithm; and the recording module is used for recording the optimal sub-screen in the interaction process of the intelligent agent and the environment and each action contained in the optimal sub-screen. The method benefits from the high robustness of the average measure estimator and the high stability of the PPO algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of circle reconstruction algorithms, and in particular to a circle reconstruction system based on reinforcement learning. Background Art

[0002] Circles are very common in our lives. Therefore, circle detection is not only a basic task in image processing research, but also a technology widely used in many fields. For example, in the military, drones and missiles use circle reconstruction technology to locate military targets such as oil tanks and radar covers. In industry, circle reconstruction methods are used to locate industrial products or reconstruct circular defects on products. In the field of transportation, circle reconstruction is often used to assist unmanned driving systems in identifying traffic signs. In the medical field, it is mostly used to measure pupil position and medical imaging analysis. Therefore, the research on circle reconstruction algorithms has a significant positive significance for the national economy, people's livelihood and social development.

[0003] The current mainstream circle reconstruction algorithms are as follows: methods based on the geometric properties of circles such as tangency or symmetry, methods based on area, methods based on Hough transform, and methods based on convolutional neural networks. The first type of algorithm relies on gradient features and low-level edge information. However, in reality, edge maps often contain a lot of edge information of non-target circles, and it is difficult for such algorithms to separate the edges of multiple circles into single circle edges, but instead provide it as a whole to subsequent algorithms. Therefore, when the image background is complex and there is a lot of noise, it is sensitive to noise and occlusion, and the reconstruction accuracy of the algorithm is very low. The second and third types of algorithms are more robust than the first type, but have poorer flexibility, and cannot reconstruct circles with large eccentricities. However, circles in real life are often not perfect, so the application scenarios of such algorithms are limited. The third type of algorithm is more robust than the first two types of algorithms, but it depends on the learning of the data set and the selection of candidate boxes for potential circular targets. It is a specific circle reconstructor and is not easy to use for multi-circle detection. Therefore, the application scenarios are not as wide as the first type of algorithm. Therefore, how to design a robust multi-circle detection method is the focus of current research on other target detection algorithms including circle reconstruction. Summary of the invention

[0004] 1. Technical issues to be resolved

[0005] In view of the shortcomings of the prior art, the present invention provides a circular reconstruction system based on reinforcement learning, the core idea of ​​which is that estimating the parameters of an arc corresponds to making a decision, and estimating the parameters of multiple arcs corresponds to making multiple decisions. Therefore, the Markov decision process can be used to describe the reconstruction process of multiple arcs. The Markov decision process refers to the interaction process between the agent and the environment. The present invention receives the action (i.e., decision) output by the agent module through the environment module, uses the average measure estimator to calculate the reward generated by the action, transforms the environment state according to the action, and feeds back the generated reward and the transformed state to the agent; receives the reward and state output by the environment module through the agent module, generates new actions and feeds back to the environment module, and uses the PPO reinforcement learning algorithm to optimize and update the action strategy of the agent; and records the best segmentation during the interaction between the agent and the environment through the recording module. The various actions contained in the best segmentation represent the various arcs reconstructed by the present invention. Thanks to the high robustness of the average measure estimator and the high stability of the PPO algorithm, the present invention can stably and robustly reconstruct multiple circles from given image data, solving the problem of multi-circle reconstruction.

[0006] (II) Technical solution

[0007] To achieve the above object, the present invention provides the following technical solutions: a circular reconstruction system based on reinforcement learning, comprising an agent module, an environment module and a recording module;

[0008] The environment module is used to receive the action output by the agent module, calculate the reward generated by the action, and transform the environment state according to the action, and then feed back the generated reward and the transformed state to the agent. When , the state of the environment is The action received is The rewards generated are The environmental state after the transformation is in is the state space, For the action space.

[0009] The agent module is used to receive the reward and state output by the environment module, generate new actions, feed the new actions back to the environment module, and optimize and update the strategy function of the agent.

[0010] The recording module is used to record the interaction process between the agent module and the environment module. The environment starts from the initial state and reaches the terminal state after several interactions with the agent. This process from the initial state to the terminal state is called an episode. When an episode ends, the environment will be reset to the initial state, the cumulative reward obtained by the agent will be reset to zero, the time t will also be reset to zero, and then the next episode will begin. Each episode has a corresponding cumulative reward. The episode corresponding to the highest cumulative reward is called the best episode. The best episode represents the result reconstructed by this circular reconstruction system.

[0011] Furthermore, the environment module includes a data point set generation module, a model point set generation module, a point set similarity estimation module and a state transition module.

[0012] The data point set generation module extracts the edge of a given image through an edge detection operator to obtain all edge points of the image. These edge points are the data point set D used to reconstruct the circle later.

[0013] The model point set generation module is used to receive the action a output by the intelligent agent. t , and the action a t Resolved as the parameter β of a single arc t , according to the parameter β t The corresponding single arc point set M can be obtained t The parameter vector β of the arc contains 5 parameters: the arc center angle, the deflection angle of the arc starting point, the radius, the horizontal coordinate of the center, and the vertical coordinate of the center. The action vector a is also a 5-dimensional vector, and the 5 components correspond to the 5 parameters of the arc. It can be seen that an action vector generates an arc point set, and the arc point sets generated by multiple actions can be combined to form a circle point set union. In the current split screen, action a t And the arc point set generated by all actions before this action is called the model point set.

[0014] The point set similarity estimation module is used to calculate the point set similarity estimation module. t Generated model point set The similarity between the data point set D and the action a is calculated based on the similarity t Corresponding rewards. Let’s remember the model point set The similarity between and the data point set D is: Action a t The corresponding reward r t+1 By a t Generated model point set and the previous action a t-1 Generated model point set The calculation formula is as follows:

[0015] The state transition module is used to calculate the action a t The design of the environment state is the key to the circular reconstruction system. To this end, the system presupposes that the maximum number of interactions between the agent and the environment in each segment is w, that is, 0≤t≤w. At the same time, the value range of each component of the action vector a is between [-1, 1]. It is worth noting that the action vector when each component takes the minimum value is a L , the action vector when each component takes the maximum value is a U , where the superscript L represents the lower limit of the value, and the superscript U represents the upper limit of the value. Based on the above description, this system defines the initial state, i.e., the state at time t=0, s0=(a L ,a L ,…,a L ), where a L The number of states is w-1, and the state s at time t t =(a0,a1,…,a t-1 ,a L ,…,a L ), where a L The number of is wt-1. Execute action a t After that, the state will change to s t+1 =(a0,a1,…,a t ,a L ,…,a L ), where a L The number of them is wt-2. It is worth noting that when the stop condition of the split screen is reached, the state of the environment will be reset, that is, the state will be changed to s0. The split screen stop condition set by the present invention is that if the length of the arc generated at the current moment is less than the preset length threshold, or the distance between the arc generated at the current moment and the model point set generated at the previous moment is less than the preset distance threshold, or the number of interactions between the intelligent agent and the environment reaches the preset maximum number, the state of the environment will be reset, that is, the state will be changed to s0.

[0016] Preferably, the agent module adopts an agent based on a proximal policy optimization algorithm, which includes two neural networks: an actor network actor and a critic network critic. The actor network is the policy function of the agent, which generates new actions according to the state output by the environment module. According to the state and reward output by the environment module, the parameters θ of the actor network actor and the parameters of the critic network critic will all be updated.

[0017] Preferably, the data point set generation module extracts the edge of a given image through the Canny edge detection operator, comprising the following four steps:

[0018] 1. Use Gaussian filter to remove noise from the image;

[0019] Second, calculate the gradient size and direction of each pixel in the image;

[0020] Third, apply non-maximum suppression to eliminate spurious responses caused by edge detection;

[0021] 4. Use double thresholds to determine strong edges and remove virtual edges. The image edge point set obtained through the above steps is the data point set D used to reconstruct the circle.

[0022] Preferably, the point set similarity estimation module uses an average measure estimator to estimate the similarity between the model point set and the data point set, and the calculation formula of the average measure is as follows:

[0023]

[0024] In the formula, |M| is the measure of the model M, the model is an arc, the measure of the arc is the length of the arc, ∈ is a very small positive number used to prevent the denominator from being 0, d is the error from the model point set to the data point set, called the model error, λ is used to adjust the weight of the measure and model error, fixed to 2, and the definition of the model error d is as follows:

[0025]

[0026] In the formula, M δ represents a set of points uniformly sampled from the arc M at intervals of δ, |M δ | represents the point set M δ The number of points contained, ||pq|| represents the Euclidean distance between point p and point q.

[0027] Compared with the prior art, the present invention provides a circular reconstruction system based on reinforcement learning, which has the following beneficial effects:

[0028] The present invention uses Markov decision process to describe the reconstruction process of multiple arcs. The core idea is that estimating the parameters of an arc corresponds to making a decision, and estimating the parameters of multiple arcs corresponds to making multiple decisions. Markov decision process refers to the interaction process between the agent and the environment. The present invention receives the action (i.e., decision) output by the agent module through the environment module, uses the average measure estimator to calculate the reward generated by the action, transforms the environment state according to the action, and feeds back the generated reward and the transformed state to the agent; receives the reward and state output by the environment module through the agent module, generates new actions and feeds back to the environment module, and uses the PPO reinforcement learning algorithm to optimize and update the action strategy of the agent; and records the best segmentation during the interaction between the agent and the environment through the recording module. The various actions contained in the best segmentation represent the various arcs reconstructed by the present invention. Thanks to the high robustness of the average measure estimator and the high stability of the PPO algorithm, the present invention can stably and robustly reconstruct multiple circles from given image data. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is a schematic diagram of the system flow of the present invention;

[0030] Figure 2 It is a flow chart of the system of the present invention. DETAILED DESCRIPTION

[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0032] In view of the fact that the current multi-circle detection algorithm is not robust enough in detecting circles, resulting in a lack of accuracy in detecting circles, a circle reconstruction system based on reinforcement learning is proposed. Figure 1 , the system mainly includes environment module and agent module, among which:

[0033] The environment module is used to receive the action output by the agent module, calculate the reward generated by the action, and transform the environment state according to the action, and then feed back the generated reward and the transformed state to the agent. Figure 2 As shown, the environment module includes a data point set generation module, a model point set generation module, a point set similarity estimation module and a state transition module, wherein:

[0034] The data point set generation module extracts the edge of a given image through the Canny edge detection operator, which includes the following four steps: 1. Use a Gaussian filter to remove noise in the image; 2. Calculate the gradient size and direction of each pixel in the image; 3. Apply non-maximum suppression to eliminate the stray response caused by edge detection; 4. Use a double threshold to determine the strong edge and remove the virtual edge. The image edge point set obtained through the above steps is the data point set D used to reconstruct the circle.

[0035] The model point set generation module is used to receive the action a output by the intelligent agent t , and the action a t Resolved as the parameter β of a single arc t , according to the parameter β t The corresponding single arc point set M can be obtained t The parameter vector β of the arc contains 5 parameters: the arc center angle, the deflection angle of the arc starting point, the radius, the horizontal coordinate of the center, and the vertical coordinate of the center. The action vector a is also a 5-dimensional vector, and the 5 components correspond to the 5 parameters of the arc. It can be seen that an action vector generates an arc point set, and the arc point sets generated by multiple actions can be combined to form a circle point set union. In the current split screen, action a t And the arc point set generated by all actions before this action is called the model point set.

[0036] The present invention resolves the action a into the parameter β of a single arc in the following manner. Let the value range of each component of the action vector a be between [-1, 1]. The value ranges of the components of the arc parameter β are as follows: the value ranges of the center angle and the deflection angle of the arc starting point are both [0, 360°]; the minimum value of the radius is 0, and the maximum value is set according to the actual situation; the maximum and minimum values ​​of the horizontal coordinate and the vertical coordinate of the center can be set according to the bounding box of the data point set. Therefore, the minimum value and maximum value (MinMax) scaling method can be used to resolve the action a into the parameter β of a single arc.

[0037] The point set similarity estimation module is used to calculate the point set similarity estimation module. t Generated model point set The similarity between the data point set D and the action a is calculated based on the similarity t Corresponding rewards. Let’s remember the model point set The similarity between and the data point set D is: Action a t The corresponding reward r t+1 By a t Generated model point set and the previous action a t-1 Generated model point set The calculation formula is as follows:

[0038] Preferably, the point set similarity estimation module uses an average measure estimator to estimate the similarity between the model point set and the data point set, and the calculation formula of the average measure is as follows:

[0039]

[0040] In the formula, |M| is the measure of the model M. In this paper, the model is an arc, and the measure of the arc is the length of the arc. ∈ is a very small positive number used to prevent the denominator from being 0. d is the error from the model point set to the data point set, called the model error. λ is used to adjust the weight of the measure and model error, and this system is fixed to 2. The definition of the model error d is as follows:

[0041]

[0042] In the formula, M δ represents a set of points uniformly sampled from the arc M at intervals of δ. δ | represents the point set M δ The number of points contained. ||pq|| represents the Euclidean distance between point p and point q.

[0043] The state transition module is used to calculate the state transition of action a. t The design of the environment state is the key to the circular reconstruction system. To this end, the system presupposes that the maximum number of interactions between the agent and the environment in each segment is w, that is, 0≤t≤w. At the same time, the value range of each component of the action vector a is between [-1, 1]. It is worth noting that the action vector when each component takes the minimum value is a L , the action vector when each component takes the maximum value is a U , where the superscript L represents the lower limit of the value, and the superscript U represents the upper limit of the value. Based on the above description, this system defines the initial state, i.e., the state at time t=0, s0=(a L ,a L ,…,a L ), where a L The number of states is w-1. The state s at time t t =(a0,a1,…,a t-1 ,a L ,…,a L ), where a L The number of is wt-1. Execute action a t After that, the state will change to s t+1 =(a0,a1,…,a t ,a L ,…,a L), where a L The number of is wt-2. It is worth noting that when the stop condition of the split screen is reached, the state of the environment will be reset, that is, the state will be changed to s0. The split screen stop condition set in this embodiment is that if the length of the arc generated at the current moment is less than the preset length threshold, or the distance between the arc generated at the current moment and the model point set generated at the previous moment is less than the preset distance threshold, or the number of interactions between the agent and the environment reaches the preset maximum number, the state of the environment will be reset, that is, the state will be changed to s0.

[0044] The agent module uses an agent based on the Proximal Policy Optimization (PPO) algorithm. The PPO algorithm contains two neural networks: the actor network actor and the critic network critic. The actor network is the policy function of the agent, which generates new actions based on the state output by the environment module. According to the state and reward output by the environment module, the parameters θ of the actor network actor and the parameters of the critic network critic All will be updated. The main process of the PPO algorithm is as follows:

[0045] 1. Initialize the parameters of the actor network actor to θ0 and the parameters of the critic network critic to And set hyperparameters, such as learning rate;

[0046] Second, in order to perform the k+1th update (k ≥ 0) of the actor network actor and the critic network critic, it is necessary to use the actor network actor (θ k ) interacts with the environment n times and obtains the interaction trajectories (s0,a0,r1),(s1,a1,r2),…,(s n-1 ,a n-1 ,r n ), and calculate the advantage functions A0, A1, …, A n ; The calculation formula of the advantage function is as follows:

[0047]

[0048] in Critic Network The output value.

[0049] 3. According to the following loss function, the parameters θ of the actor network actor and the parameters of the critic network critic To update:

[0050]

[0051]

[0052]

[0053] c i (θ)=max(min(b i (θ),1+ε),1-ε)

[0054] Among them, p θ (a|s) represents the probability of taking action a given state s when the strategy is actor(θ), and ε is the clipping factor, which is generally taken as ε=2.

[0055] 4. Iterate the second and third steps of the loop.

[0056] The recording module is used to record the best segmentation during the interaction between the agent and the environment. Each action contained in the best segmentation represents each arc reconstructed by the present invention. Thanks to the high robustness of the average measure estimator and the high stability of the PPO algorithm, the present invention can stably and robustly reconstruct multiple circles from given image data.

[0057] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A circle reconstruction system based on reinforcement learning, characterized in that: Includes environment module, agent module and recording module; The environment module is used to receive the action output by the agent module, calculate the reward generated by the action, and transform the environment state according to the action, and then feed back the generated reward and the transformed state to the agent. When , the state of the environment is The action received is The rewards generated are The environmental state after the transformation is in is the state space, is the action space; The agent module is used to receive the reward and state output by the environment module, generate new actions, feed the new actions back to the environment module, and optimize and update the strategy function of the agent; The recording module is used to record the interaction process between the agent module and the environment module. The environment starts from an initial state and reaches a terminal state after several interactions with the agent. This process from the initial state to the terminal state is called an act. When an act ends, the environment will be reset to the initial state, the cumulative reward obtained by the agent will also be reset to zero, the time t will also be reset to zero, and then the next act will begin. Each act has a corresponding cumulative reward. The act corresponding to the highest cumulative reward is called the best act. The best act represents the result reconstructed by this circular reconstruction system.

2. The circular reconstruction system based on reinforcement learning according to claim 1, characterized in that: The environment module includes a data point set generation module, a model point set generation module, a point set similarity estimation module and a state transition module.

3. The circular reconstruction system based on reinforcement learning according to claim 1, characterized in that: The agent module adopts an agent based on the proximal policy optimization algorithm. The proximal policy optimization algorithm includes two neural networks: the actor network actor and the critic network critic. The actor network is the policy function of the agent, which generates new actions according to the state output by the environment module. According to the state and reward output by the environment module, the parameters of the actor network and the parameters of the critic network will be updated.

4. The circular reconstruction system based on reinforcement learning according to claim 2, characterized in that: The data point set generation module extracts the edge of a given image through the Canny edge detection operator, which includes the following four steps:

1. Use Gaussian filter to remove noise from the image; Second, calculate the gradient size and direction of each pixel in the image; Third, apply non-maximum suppression to eliminate spurious responses caused by edge detection; 4. Use double thresholds to determine strong edges and remove virtual edges. The image edge point set obtained through the above steps is the data point set D used to reconstruct the circle.

5. The circular reconstruction system based on reinforcement learning according to claim 2, characterized in that: The model point set generation module is used to receive the action a output by the intelligent agent. t , and the action a t Resolved as the parameter β of a single arc t , according to the parameter β t The corresponding single arc point set M can be obtained t , the arc parameter vector β contains 5 parameters: the arc center angle, the deflection angle of the arc starting point, the radius, the horizontal coordinate of the center, and the vertical coordinate of the center. The action vector a is also a 5-dimensional vector. The 5 components correspond to the 5 parameters of the arc. An action vector generates an arc point set. The arc point sets generated by multiple actions are combined to form a circle point set union. In the current split screen, action a t And the arc point set generated by all actions before this action is called the model point set.

6. The circular reconstruction system based on reinforcement learning according to claim 2, characterized in that: The point set similarity estimation module is used to calculate the point set similarity estimation module. t Generated model point set The similarity between the data point set D and the action a is calculated based on the similarity t The corresponding reward may be remembered as the model point set The similarity between and the data point set D is: Action a t The corresponding reward r t+1 By a t Generated model point set and the previous action a t-1 Generated model point set The calculation formula is as follows:

7. The circular reconstruction system based on reinforcement learning according to claim 2, characterized in that: The state transition module is used to calculate the action a t The environment state change caused by the action vector a is presumed to be w, i.e., 0≤t≤w, and the value range of each component of the action vector a is between [-1, 1]. The action vector a is the one when each component takes the minimum value. L , the action vector when each component takes the maximum value is a U , where the superscript L represents the lower limit of the value, and the superscript U represents the upper limit of the value. The initial state, i.e. the state at time t = 0, is defined as s0 = (a L ,a L ,…,a L ), where a L The number of states is w-1, and the state s at time t t =(a0,a1,…,a t-1 ,a L ,…,a L ), where a L The number of wt-1 is wt-1, and action a is executed t After that, the state will change to s t+1 =(a0,a1,…,a t ,a L ,…,a L ), where a L The number of them is wt-2. When the stop condition of the split screen is reached, the state of the environment will be reset, that is, the state will be changed to s0. The set split screen stop condition is that the length of the arc generated at the current moment is less than the preset length threshold, or the distance between the arc generated at the current moment and the model point set generated at the previous moment is less than the preset distance threshold, or the number of interactions between the agent and the environment reaches the preset maximum number, the state of the environment will be reset, that is, the state will be changed to s0.

8. The circular reconstruction system based on reinforcement learning according to claim 6, characterized in that: The point set similarity estimation module uses an average measure estimator to estimate the similarity between the model point set and the data point set. The calculation formula of the average measure is as follows: In the formula, |M| is the measure of the model M, the model is an arc, the measure of the arc is the length of the arc, ∈ is a positive number used to prevent the denominator from being 0, d is the error from the model point set to the data point set, called the model error, λ is used to adjust the weight of the measure and model error, fixed to 2, and the definition of the model error d is as follows: In the formula, M δ represents a set of points uniformly sampled from the arc M at intervals of δ, |M δ | represents the point set M δ The number of points contained, ||pq|| represents the Euclidean distance between point p and point q.

Citation Information

Patent Citations

  • Road event learning algorithm driven by human brain-simulated working memory intrinsic evaluation mechanism

    CN116110011A

  • Deep reinforcement learning exploration method and system based on extreme novelty search

    CN117150927A

  • Method and apparatus for three-dimensional reconstruction of a human head for rendering a human image

    WO2023085624A1