CN117237241B - Chromosome enhancement parameter adjustment method and device - Google Patents

Chromosome enhancement parameter adjustment method and device Download PDF

Info

Publication number
CN117237241B
CN117237241B CN202311517103.0A CN202311517103A CN117237241B CN 117237241 B CN117237241 B CN 117237241B CN 202311517103 A CN202311517103 A CN 202311517103A CN 117237241 B CN117237241 B CN 117237241B
Authority
CN
China
Prior art keywords
chromosome
image
enhancement
enhanced
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311517103.0A
Other languages
Chinese (zh)
Other versions
CN117237241A (en
Inventor
邓福韬
徐思
卢沁阳
穆阳
蔡昱峰
刘丽珏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Zixing Wisdom Medical Technology Co ltd
Original Assignee
Hunan Zixing Wisdom Medical Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan Zixing Wisdom Medical Technology Co ltd filed Critical Hunan Zixing Wisdom Medical Technology Co ltd
Priority to CN202311517103.0A priority Critical patent/CN117237241B/en
Publication of CN117237241A publication Critical patent/CN117237241A/en
Application granted granted Critical
Publication of CN117237241B publication Critical patent/CN117237241B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a chromosome enhancement parameter adjustment method and device. The invention obtains the chromosome enhanced image which is appointed in the user chromosome image enhancement effect database and is needed to be enhanced and is appointed by the user; performing iterative training process of reinforcement learning according to the chromosome enhanced image and the chromosome image needing to be enhanced, wherein the process is performed according to a sarsa method, and updating a state table Q according to a reward function; wherein, in each iteration process, the current state s is acquired t Converting the chromosome image into enhancement parameters cot and amt, and displaying the chromosome image enhanced by the enhancement parameters to a user; after the iteration is operated for 100 times, terminating the iteration and storing a state table Q; the invention can quickly and automatically find the global optimal parameters. And the dynamic adjustment of parameters can be realized when the problem changes, so that the optimal performance of the model is maintained.

Description

Chromosome enhancement parameter adjustment method and device
Technical Field
The invention relates to the technical field of chromosome enhancement parameter adjustment, in particular to a chromosome enhancement parameter adjustment method and device.
Background
In the field of chromosome image enhancement, enhancement parameter settings have a critical impact on the enhancement effect of chromosomes. However, it is difficult to find the globally optimal combination of parameters by hand, due to the complexity of the problem and the artificial preference for enhancing the effect. The existing method generally relies on expert experience to adjust parameters, which is time-consuming and labor-consuming, and cannot realize dynamic optimization of parameters. Even if the expert finds good parameters that meet the current problem, the adaptive adjustment cannot be achieved when the problem itself changes. Therefore, how to quickly and automatically find the optimal parameter configuration and dynamically adjust the parameters along with the environmental changes is a difficult problem to be solved in the research field.
Disclosure of Invention
The invention aims to provide a chromosome enhancement parameter adjustment method and device, which are used for solving the problems that the conventional method cannot quickly and automatically find the optimal parameter configuration and dynamically adjust parameters along with environmental changes.
In a first aspect, the present invention provides a method for adjusting chromosome enhancement parameters, comprising:
acquiring a chromosome enhanced image which is designated in a user chromosome image enhancement effect database and is required to be enhanced, wherein the chromosome enhanced image is designated by the user and is required to be enhanced;
performing iterative training process of reinforcement learning according to the chromosome enhanced image and the chromosome image needing to be enhanced, wherein the process is performed according to a sarsa method, and updating a state table Q according to a reward function; wherein, in each iteration process, the current state s is acquired t Converting the chromosome image into enhancement parameters cot and amt, and displaying the chromosome image enhanced by the enhancement parameters to a user;
after the iteration runs 100 times, the iteration is terminated, and the state table Q is saved.
Further, according to the iterative training process of reinforcement learning according to the chromosome enhanced image and the chromosome image to be enhanced, the process is performed according to the sarsa method, and in the step of updating the state table Q according to the reward function, the method for setting the reward function includes:
inputting the current state s t Will s t The number of rows divided by 256 is roundedAssigning a value to the cot, assigning a state s t Dividing the number of the rows by 256, and then obtaining a remainder and assigning the remainder to the amt;
taking a chromosome image c2 to be enhanced, a chromosome enhanced image e2, enhancement parameters cot and amt as inputs, and inputting an evaluation function to obtain a distance vector D; wherein, the distance between c2 and e2 after the enhancement is performed by using the enhancement parameter is used as an evaluation value, and the distance calculation logic is as follows: vectorizing a chromosome image c2, wherein the vectorizing method is to carry out gray histogram statistics on the c2, obtain the count of each gray in the c2 as one dimension of a vector, and vectorize to obtain a 256-dimension vector Vc; vectorizing the chromosome image e2, and obtaining 256-dimensional vector Ve by the same method; calculating the distance between the vector Vc and the vector Ve, wherein the calculation method is |Vc-ve|, and the distance is marked as Dc; then carrying out Fourier transformation on the chromosome image c2 and the target enhanced image e2, and changing the chromosome image c2 and the target enhanced image e2 into a frequency space to obtain two spectrograms c2_fft and e2_fft; sampling the spectrograms c2_fft and e2_fft, drawing a circle by taking the center of the spectrogram as the center of the circle and the radius r, and extracting the average amplitude value of each point on the circle and 8 fields around the circle as one value of a vector V; vc2 and Ve2 can be obtained through the above operation; calculating the distance Da between Vc2 and Ve2, wherein the calculation method is |Vc2-Ve2|; adding the gray vector distance Dc and the sharpening vector distance Da to obtain a final distance vector D;
updating the current state s in the state table Q t The method is a state updating formula of the sarsa algorithm;
wherein a is t Q is the action taken in the current state new (s t ,a t ) For updated state values, Q (s t ,a t ) R is the current state value t For the calculated distance vector D, Q (s t+1 ,a t+1 ) In order to take the state value after taking the next action in the current state, a is the learning rate, and gamma is the weight factor.
Further, the learning rate a is 0.1, and the weight factor γ is 0.9.
Further, the iterative training process of reinforcement learning is performed according to the chromosome enhanced image and the chromosome image to be enhanced, the process is performed according to the sarsa method, and after updating the state table Q according to the reward function, the method further comprises:
under the condition that the user selects to interrupt iteration, selecting the enhancement effect of the current iteration;
under the condition that the user does not terminate the iteration operation, selecting the state of 5 before the v value in the state table in 100 iterations, and converting the state into the enhancement parameter for enhancement.
A chromosome enhancement parameter adjustment device, comprising:
an acquisition unit configured to acquire a chromosome-enhanced image to be achieved specified in a user chromosome-image-enhancement effect database, and a chromosome image to be enhanced specified by a user;
the training unit is used for carrying out an iterative training process of reinforcement learning according to the chromosome enhanced image and the chromosome image needing to be enhanced, wherein the process is carried out according to the sarsa method, and the state table Q is updated according to the reward function; wherein, in each iteration process, the current state s is acquired t Converting the chromosome image into enhancement parameters cot and amt, and displaying the chromosome image enhanced by the enhancement parameters to a user;
and the storage unit is used for stopping iteration after the iteration operation is performed for 100 times and storing the state table Q.
Further, the method for setting the reorder function includes:
inputting the current state s t Will s t The number of the row is divided by 256, rounded and assigned to the cot, and the state s is assigned to t Dividing the number of the rows by 256, and then obtaining a remainder and assigning the remainder to the amt;
taking a chromosome image c2 to be enhanced, a chromosome enhanced image e2, enhancement parameters cot and amt as inputs, and inputting an evaluation function to obtain a distance vector D; wherein, the distance between c2 and e2 after the enhancement is performed by using the enhancement parameter is used as an evaluation value, and the distance calculation logic is as follows: vectorizing a chromosome image c2, wherein the vectorizing method is to carry out gray histogram statistics on the c2, obtain the count of each gray in the c2 as one dimension of a vector, and vectorize to obtain a 256-dimension vector Vc; vectorizing the chromosome image e2, and obtaining 256-dimensional vector Ve by the same method; calculating the distance between the vector Vc and the vector Ve, wherein the calculation method is |Vc-ve|, and the distance is marked as Dc; then carrying out Fourier transformation on the chromosome image c2 and the target enhanced image e2, and changing the chromosome image c2 and the target enhanced image e2 into a frequency space to obtain two spectrograms c2_fft and e2_fft; sampling the spectrograms c2_fft and e2_fft, drawing a circle by taking the center of the spectrogram as the center of the circle and the radius r, and extracting the average amplitude value of each point on the circle and 8 fields around the circle as one value of a vector V; vc2 and Ve2 can be obtained through the above operation; calculating the distance Da between Vc2 and Ve2, wherein the calculation method is |Vc2-Ve2|; adding the gray vector distance Dc and the sharpening vector distance Da to obtain a final distance vector D;
updating the current state s in the state table Q t The method is a state updating formula of the sarsa algorithm;
wherein a is t Q is the action taken in the current state new (s t ,a t ) For updated state values, Q (s t ,a t ) R is the current state value t For the calculated distance vector D, Q (s t+1 ,a t+1 ) In order to take the state value after taking the next action in the current state, a is the learning rate, and gamma is the weight factor.
Further, the learning rate a is 0.1, and the weight factor γ is 0.9.
A chromosome enhancement parameter adjustment device, the device further comprising:
an interruption unit, configured to select an enhancement effect of a current iteration when a user selects to interrupt the iteration;
and the selecting unit is used for selecting the state of 5 before the v value in the state table in 100 iterations under the condition that the user does not terminate the iteration operation, and converting the state into the enhancement parameter for enhancement.
The beneficial effects of the invention are as follows: the invention provides a method and a device for adjusting chromosome enhancement parameters, which are used for acquiring a chromosome enhanced image which is appointed by a user in a chromosome image enhancement effect database and is required to be enhanced by the user; performing iterative training process of reinforcement learning according to the chromosome enhanced image and the chromosome image needing to be enhanced, wherein the process is performed according to a sarsa method, and updating a state table Q according to a reward function; wherein, in each iteration process, the current state s is acquired t Converting the chromosome image into enhancement parameters cot and amt, and displaying the chromosome image enhanced by the enhancement parameters to a user; after the iteration is operated for 100 times, terminating the iteration and storing a state table Q; compared with manual parameter adjustment, the invention can quickly and automatically find out the global optimal parameters. And the dynamic adjustment of parameters can be realized when the problem changes, so that the optimal performance of the model is maintained. Compared with the existing automatic parameter adjusting method, the method can be expanded to different problems without expert experience. Experiments show that the method can quickly converge to the parameter configuration close to the optimal, and is obviously superior to the manual parameter adjustment and random search methods.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings that are needed in the embodiments will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flow chart of a method of chromosome enhancement parameter adjustment of the present invention;
FIG. 2 is an example diagram of an image of the intermediate stage diagram;
FIG. 3 is a single chromosome image;
FIG. 4 is an enhanced chromosome image;
FIG. 5 is a chromosome image c2 requiring adjustment;
FIG. 6 is a target chromosome image e2;
FIG. 7 is a Q table and action representation intent, where (a) is the Q table and (b) is the action representation intent;
FIG. 8 is a schematic diagram of a chromosome enhancement parameter adjustment device of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to specific embodiments of the present invention and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention. The following describes in detail the technical solutions provided by the embodiments of the present invention with reference to the accompanying drawings.
The invention adopts a technical scheme of combining deep learning and reinforcement learning, and a specific design module is as follows:
the chromosome image enhancement effect database stores chromosome original images, chromosome enhancement images and enhancement parameters used by the enhancement images, and the enhancement parameters are used for training an enhancement parameter basic model.
The model is trained by using data in a chromosome image enhancement effect database, vectorization characteristics of an original chromosome image and an enhanced chromosome image are input, enhancement parameters of the enhanced chromosome are output, and loss is calculated by the enhancement parameters stored in the database, so that learning is performed.
The reinforcement learning module uses the output of the reinforcement parameter base model as an initial state to construct a model including a state, an action, and a reward function. The parameter adjustment is regarded as the action of the agent, and the enhancement effect is regarded as the reward. Through continuous learning, the rewarding function is maximized, so that the aim of parameter adjustment optimization is fulfilled.
And the enhancement interaction module is used for enabling a user to select a target enhancement effect image as input, calling an enhancement parameter basic model and an enhancement learning model to conduct parameter automatic learning, outputting optimal enhancement parameters reaching the enhancement image effect, and displaying the enhancement effect.
Referring to fig. 1, an embodiment of the present invention provides a method for adjusting chromosome enhancement parameters, including:
s101, acquiring a chromosome enhanced image which is designated in a user chromosome image enhancement effect database and is desired to be enhanced, and acquiring a chromosome image which is designated by the user and is required to be enhanced.
Specifically, the original chromosome image, the enhanced chromosome image and the enhancement parameters used by the enhanced chromosome image are stored in the enhanced image library and used for training an enhancement parameter basic model.
S102, performing an iterative training process of reinforcement learning according to the chromosome enhanced image and the chromosome image needing to be enhanced, wherein the process is performed according to the sarsa method, and updating the state table Q according to a reward function. Wherein, in each iteration process, the current state s is acquired t It is converted into enhancement parameters cot and amt, and the chromosome image enhanced by the enhancement parameters is displayed to the user.
Specifically, given a current state s t The agent performs action a t The environment gives a prize r t And a new state s t+1 . Then based on s t+1 Randomly sampling to obtain a new action a t+1 And calculating the value of the current state according to the state updating formula of sarsa, thereby updating the Q table. SARSA is a strategy-based reinforcement learning algorithm with high sample efficiency and performance.
Referring to fig. 7, the number of rows of the state table Q in this example is 65536, which represents 65536 states in total, and the number of columns is 4, which represents the value v after taking 4 actions in each state, and all the values in the initialized table are 0.
Specifically, according to the iterative training process of reinforcement learning according to the chromosome enhanced image and the chromosome image to be enhanced, the process is performed according to the sarsa method, and in the step of updating the state table Q according to the reward function, the method for setting the reward function includes:
inputting the current state s t Will s t The number of the row is divided by 256, rounded and assigned to the cot, and the state s is assigned to t Dividing the number of the rows by 256, and then obtaining a remainder and assigning the remainder to the amt;taking a chromosome image c2 to be enhanced, a chromosome enhanced image e2, enhancement parameters cot and amt as inputs, and inputting an evaluation function to obtain a distance vector D; updating the current state s in the state table Q t The method is a state updating formula of the sarsa algorithm;
wherein a is t Q is the action taken in the current state new (s t ,a t ) For updated state values, Q (s t ,a t ) R is the current state value t For the calculated distance vector D, Q (s t+1 ,a t+1 ) In order to take the state value after taking the next action in the current state, a is the learning rate, and gamma is the weight factor.
In the present embodiment, the learning rate a is 0.1, and the weight factor γ is 0.9.
Under the condition that the user selects to interrupt iteration, selecting the enhancement effect of the current iteration;
under the condition that the user does not terminate the iteration operation, selecting the state of 5 before the v value in the state table in 100 iterations, and converting the state into the enhancement parameter for enhancement.
In each iteration process, the current state s is acquired t Converting it into enhancement parameters by the method of s t Dividing the line number of the line by 256, rounding and assigning to the cot, and setting the state s t The remainder is obtained after the number of lines is divided by 256 and assigned to amt, and then the chromosome image enhanced by the enhancement parameters is displayed to a user, so that the user can observe the change of the chromosome enhancement effect in each iteration conveniently. The user can interrupt the iteration at any time at this time, and select the enhancement effect of the current iteration. When the user does not terminate the iteration operation, selecting the state of 5 before the v value in the state table in 100 iterations, converting the state into the enhancement parameters for enhancement, outputting 5 enhancement effect graphs for the user to select, wherein the conversion method is the same as that described above.
S103, after the iteration operation is performed for 100 times, the iteration is terminated, and a state table Q is stored.
Referring to fig. 2 to 7, the method for adjusting chromosome enhancement parameters according to the present invention is described in detail below.
1. Construction of chromosome image enhancement effect database
Firstly, 20000 metaphase images are randomly selected from an existing chromosome database, wherein an example of the metaphase images is shown in fig. 2, chromosome segmentation is carried out through a segmentation algorithm, and a single chromosome image is obtained after segmentation, and an example is shown in fig. 3. For normal mid-chromosome images, 46 chromosomes are obtained after segmentation, and approximately 92 ten thousand chromosome images are obtained after the segmentation step. 92 ten thousand chromosome images were enhanced, and enhancement of one chromosome will be described below as an example. The chromosome image to be enhanced is input, see fig. 3, and enhanced by using an enhancement method, and the enhanced chromosome image is obtained, see fig. 4, wherein the enhancement parameters are selected randomly, and in the example, a contast and an amount are adopted to represent two different enhancement parameters, but the follow-up is not limited to the two enhancement parameters. The chromosome image before enhancement, fig. 3, the enhancement parameter comparison in this example has a value of 125, the enhancement parameter amount in this example has a value of 8, and the post-enhancement image, fig. 4 is stored as a record in the database.
2. Training convolutional neural networks for predicting enhancement parameters
1. The record is read from the chromosome image enhancement effect database, and in this example, one record is implemented, and the specific content in the record is as follows:
enhancing the pre-chromosome image c1, see fig. 3;
enhancement parameter constast, in this example, the value is 125;
the enhancement parameter amountis 8 in this example;
enhanced chromosome image e1, see fig. 4;
2. the convolution neural network is constructed, and the present example uses the resnet18 as a basic network to perform a regression task.
3. The chromosome image c1 before enhancement and the chromosome image e1 after enhancement are taken as input together, the merging method adopts two pictures to form a two-channel image, the two-channel image is input into a resnet18, and the values cot and amt are output.
4. Parameters of the resnet18 are optimized using const and amounts as real labels, so that the values of the output cots and amounts are close to const and amounts, wherein the mean square error loss is adopted as a loss function.
5. 92 ten thousand records in the chromosome image enhancement effect database are trained according to the above procedure, and a plurality of training rounds, in this example 50 rounds, are performed.
3. Prediction enhancement parameters
The chromosome image c2 to be adjusted is selected, see fig. 4, and the target chromosome image e2 is selected from the enhanced chromosome effect library, see fig. 5, and is used as the target effect. The chromosome image c2 and the target chromosome image e2 are taken as input together, the merging method adopts two pictures to form a two-channel image, the two-channel image is input into the net18 network trained in the second step, and predicted cot and amt values are obtained.
4. Reinforcement learning optimization enhancement parameters
In the step, the sarsa algorithm is adopted as an example of reinforcement learning, and the specific implementation flow is as follows:
1. an optimized environment for chromosome enhancement in reinforcement learning is constructed, and a grid environment with a height of 256 and a width of 256 is used in the example, wherein row coordinates of each grid in the environment represent a value of a cot in an enhancement parameter, and an ordinate represents a value of an amt.
2. Constructing an evaluation function, wherein the evaluation function in the example uses an image c2 to be enhanced, a target chromosome image e2, enhancement parameters cot and amt as inputs, and calculates the distance between the enhanced image c2 and the enhanced image e2 by using the enhancement parameters as an evaluation value, wherein the distance calculation logic is as follows:
vectorizing a chromosome image c2, wherein the vectorizing method is to carry out gray histogram statistics on the c2, obtain the count of each gray in the c2 as one dimension of a vector, and vectorize to obtain a 256-dimension vector Vc;
vectorizing the chromosome image e2, and obtaining 256-dimensional vector Ve by the same method;
calculating the distance between the vector Vc and the vector Ve, wherein the calculation method is |Vc-ve|, and the distance is marked as Dc;
then, the chromosome image c2 and the target enhanced image e2 are subjected to fourier transformation, and are changed to a frequency space, so that two spectrograms c2_fft and e2_fft are obtained.
And sampling the spectrograms c2_fft and e2_fft, wherein the sampling method is average sampling, drawing a circle by taking the center of the spectrogram as the center of the circle and the radius r, and extracting the average amplitude value of each point on the circle and 8 fields around the circle as one value of the vector V. Vc2 and Ve2 can be obtained through the above operation.
Calculating the distance Da between Vc2 and Ve2, wherein the calculation method is |Vc2-Ve2|;
and adding the gray vector distance Dc and the sharpening vector distance Da to obtain a final distance vector D.
3. The state table Q is constructed and initialized, the number of rows of the state table Q in this example is 65536, which totally represents 65536 states, and the number of columns is 4, which represents the value v after taking 4 actions in each state, and all the values in the initialized table are 0, and an example is shown in fig. 7 (a).
4. An action space for reinforcement learning is constructed, and the action space in this example contains 4 actions, specifically, see fig. 7 (b).
5. Using predicted enhancement parameters cot and amt as current state s t The row number in the state table is cot 256+amt.
6. The method comprises the steps of setting a reward function of each step in reinforcement learning, wherein the evaluation function is used as the reward function in the example, and the specific flow is as follows:
inputting the current state s t Will s t The number of the row is divided by 256, rounded and assigned to the cot, and the state s is assigned to t The remainder is taken after dividing the number of rows by 256 and assigned to amt.
Taking the image c2 to be enhanced, the target chromosome image e2, the enhancement parameters cot and amt as inputs, and inputting an evaluation function to obtain a distance vector D;
updating the current state s in the state table Q t The v value in the algorithm is a state updating formula of the sarsa algorithm
Wherein a is t Q is the action taken in the current state new (s t ,a t ) For updated state values, Q (s t ,a t ) R is the current state value t For the calculated distance vector D, Q (s t+1 ,a t+1 ) In order to take the state value after taking the next action in the current state, a is the learning rate, 0.1 is taken in this example, γ is the weight factor, and 0.9 is taken in this example.
7. And performing an iterative training process of reinforcement learning, wherein the process is completely performed according to the sarsa method, and updating the state table Q according to a reward function.
8. After the iteration runs 100 times, the iteration is terminated, and the state table Q is saved.
5. User interaction
The step is to simplify the adjustment operation of the user in the actual enhancement parameters, and the specific design is as follows:
1. the user designates the chromosome enhanced image which is wanted to be reached from the enhanced image library;
2. the user designates a chromosome image that needs to be enhanced;
3. the post-selection system performs S102-S103 on the chromosome image that needs enhancement and the specified enhanced image;
4. when the system performs 100 times of iterative operation of S103, the current state S is obtained in each iterative process t Converting it into enhancement parameters by the method of s t Dividing the line number of the line by 256, rounding and assigning to the cot, and setting the state s t The remainder is obtained after the number of lines is divided by 256 and assigned to amt, and then the chromosome image enhanced by the enhancement parameters is displayed to a user, so that the user can observe the change of the chromosome enhancement effect in each iteration conveniently. The user can interrupt the iteration at any time at this time, and select the enhancement effect of the current iteration.
5. When the user does not terminate the iteration operation, selecting the state of 5 before the v value in the state table in 100 iterations, converting the state into the enhancement parameters for enhancement, outputting 5 enhancement effect graphs for the user to select, wherein the conversion method is the same as that described above.
Compared with manual parameter adjustment, the method can quickly and automatically find the global optimal parameters. And the dynamic adjustment of parameters can be realized when the problem changes, so that the optimal performance of the model is maintained. Compared with the existing automatic parameter adjusting method, the method can be expanded to different problems without expert experience. Experiments show that the method can quickly converge to the parameter configuration close to the optimal, and is obviously superior to the manual parameter adjustment and random search methods. The core innovation point is that the solution space of reinforcement learning is reduced by using machine learning, reinforcement learning is introduced into chromosome reinforcement method parameter tuning, and problem-independent automatic tuning is realized by constructing general states, actions and rewarding modes.
Referring to fig. 8, the present invention further provides a chromosome enhancement parameter adjustment device, including:
an acquisition unit 21 for acquiring a chromosome-enhanced image to be achieved specified in the user chromosome-image-enhanced effect database, and a chromosome image to be enhanced specified by the user;
a training unit 22, configured to perform an iterative training process of reinforcement learning according to the chromosome enhanced image and the chromosome image to be enhanced, where the process is performed according to the sarsa method, and update the state table Q according to the reward function; wherein, in each iteration process, the current state s is acquired t Converting the chromosome image into enhancement parameters cot and amt, and displaying the chromosome image enhanced by the enhancement parameters to a user;
the saving unit 23 is configured to terminate the iteration after performing the iteration 100 times, and save the state table Q.
Specifically, the method for setting the reorder function includes:
inputting the current state s t Will s t The number of the row is divided by 256, rounded and assigned to the cot, and the state s is assigned to t Dividing the number of the rows by 256, and then obtaining a remainder and assigning the remainder to the amt;
taking a chromosome image c2 to be enhanced, a chromosome enhanced image e2, enhancement parameters cot and amt as inputs, and inputting an evaluation function to obtain a distance vector D;
updating the current state s in the state table Q t The method is a state updating formula of the sarsa algorithm;
wherein a is t Q is the action taken in the current state new (s t ,a t ) For updated state values, Q (s t ,a t ) R is the current state value t For the calculated distance vector D, Q (s t+1 ,a t+1 ) In order to take the state value after taking the next action in the current state, a is the learning rate, and gamma is the weight factor.
Specifically, the learning rate a takes 0.1, and the weight factor γ takes 0.9.
Specifically, the device further comprises:
an interruption unit, configured to select an enhancement effect of a current iteration when a user selects to interrupt the iteration;
and the selecting unit is used for selecting the state of 5 before the v value in the state table in 100 iterations under the condition that the user does not terminate the iteration operation, and converting the state into the enhancement parameter for enhancement.
The embodiment of the invention also provides a storage medium, and a computer program is stored in the storage medium, and when the computer program is executed by a processor, part or all of the steps in each embodiment of the chromosome enhancement parameter adjustment method provided by the invention are realized. The storage medium may be a magnetic disk, an optical disk, a Read-only memory (ROM), a Random Access Memory (RAM), or the like.
It will be apparent to those skilled in the art that the techniques of embodiments of the present invention may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in essence or what contributes to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present invention.
The same or similar parts between the various embodiments in this specification are referred to each other. In particular, for embodiments of the chromosome enhancement parameter adjustment device, since it is substantially similar to the method embodiments, the description is relatively simple, and reference should be made to the description of the method embodiments.
The embodiments of the present invention described above do not limit the scope of the present invention.

Claims (6)

1. A method for adjusting chromosome enhancement parameters, comprising:
acquiring a chromosome enhanced image which is designated in a user chromosome image enhancement effect database and is required to be enhanced, wherein the chromosome enhanced image is designated by the user and is required to be enhanced;
performing iterative training process of reinforcement learning according to the chromosome enhanced image and the chromosome image needing to be enhanced, wherein the process is performed according to a sarsa method, and updating a state table Q according to a reward function; in each iteration process, acquiring a current state, converting the current state into enhancement parameters cot and amt, and displaying a chromosome image enhanced by the enhancement parameters to a user; the method for setting the reorder function comprises the following steps:
inputting the current state s t Will s t The number of the row is divided by 256, rounded and assigned to the cot, and the state s is assigned to t Dividing the number of the rows by 256, and then obtaining a remainder and assigning the remainder to the amt;
taking a chromosome image c2 to be enhanced, a chromosome enhanced image e2, enhancement parameters cot and amt as inputs, and inputting an evaluation function to obtain a distance vector D; wherein, the distance between c2 and e2 after the enhancement is performed by using the enhancement parameter is used as an evaluation value, and the distance calculation logic is as follows: vectorizing a chromosome image c2, wherein the vectorizing method is to carry out gray histogram statistics on the c2, obtain the count of each gray in the c2 as one dimension of a vector, and vectorize to obtain a 256-dimension vector Vc; vectorizing the chromosome image e2, and obtaining 256-dimensional vector Ve by the same method; calculating the distance between the vector Vc and the vector Ve, wherein the calculation method is |Vc-ve|, and the distance is marked as Dc; then carrying out Fourier transformation on the chromosome image c2 and the target enhanced image e2, and changing the chromosome image c2 and the target enhanced image e2 into a frequency space to obtain two spectrograms c2_fft and e2_fft; sampling the spectrograms c2_fft and e2_fft, drawing a circle by taking the center of the spectrogram as the center of the circle and the radius r, and extracting the average amplitude value of each point on the circle and 8 fields around the circle as one value of a vector V; vc2 and Ve2 can be obtained through the above operation; calculating the distance Da between Vc2 and Ve2, wherein the calculation method is |Vc2-Ve2|; adding the gray vector distance Dc and the sharpening vector distance Da to obtain a final distance vector D;
updating the current state s in the state table Q t The method is a state updating formula of the sarsa algorithm;
wherein a is t Q is the action taken in the current state new (s t ,a t ) For updated state values, Q (s t ,a t ) R is the current state value t For the calculated distance vector D, Q (s t+1 ,a t+1 ) For taking the state value after taking the next action in the current state, the alpha learning rate and the gamma weight factor;
after the iteration runs 100 times, the iteration is terminated, and the state table Q is saved.
2. The method of claim 1, wherein the learning rate α is 0.1 and the weighting factor γ is 0.9.
3. The method for adjusting chromosome enhancement parameters according to claim 2, wherein the iterative training process of reinforcement learning is performed according to the chromosome enhanced image and the chromosome image to be enhanced, the process is performed according to the sarsa method, and after updating the state table Q according to the reward function, the method further comprises:
under the condition that the user selects to interrupt iteration, selecting the enhancement effect of the current iteration;
under the condition that the user does not terminate the iteration operation, selecting the state of 5 before the v value in the state table in 100 iterations, and converting the state into the enhancement parameter for enhancement.
4. A chromosome enhancement parameter adjustment device, comprising:
an acquisition unit configured to acquire a chromosome-enhanced image to be achieved specified in a user chromosome-image-enhancement effect database, and a chromosome image to be enhanced specified by a user;
the training unit is used for carrying out an iterative training process of reinforcement learning according to the chromosome enhanced image and the chromosome image needing to be enhanced, wherein the process is carried out according to the sarsa method, and the state table Q is updated according to the reward function; wherein, in each iteration process, the current state s is acquired t Converting the chromosome image into enhancement parameters cot and amt, and displaying the chromosome image enhanced by the enhancement parameters to a user; the method for setting the reorder function comprises the following steps:
inputting the current state s t Will s t The number of the row is divided by 256, rounded and assigned to the cot, and the state s is assigned to t Dividing the number of the rows by 256, and then obtaining a remainder and assigning the remainder to the amt;
taking a chromosome image c2 to be enhanced, a chromosome enhanced image e2, enhancement parameters cot and amt as inputs, and inputting an evaluation function to obtain a distance vector D; wherein, the distance between c2 and e2 after the enhancement is performed by using the enhancement parameter is used as an evaluation value, and the distance calculation logic is as follows: vectorizing a chromosome image c2, wherein the vectorizing method is to carry out gray histogram statistics on the c2, obtain the count of each gray in the c2 as one dimension of a vector, and vectorize to obtain a 256-dimension vector Vc; vectorizing the chromosome image e2, and obtaining 256-dimensional vector Ve by the same method; calculating the distance between the vector Vc and the vector Ve, wherein the calculation method is |Vc-ve|, and the distance is marked as Dc; then carrying out Fourier transformation on the chromosome image c2 and the target enhanced image e2, and changing the chromosome image c2 and the target enhanced image e2 into a frequency space to obtain two spectrograms c2_fft and e2_fft; sampling the spectrograms c2_fft and e2_fft, drawing a circle by taking the center of the spectrogram as the center of the circle and the radius r, and extracting the average amplitude value of each point on the circle and 8 fields around the circle as one value of a vector V; vc2 and Ve2 can be obtained through the above operation; calculating the distance Da between Vc2 and Ve2, wherein the calculation method is |Vc2-Ve2|; adding the gray vector distance Dc and the sharpening vector distance Da to obtain a final distance vector D;
updating the current state s in the state table Q t The method is a state updating formula of the sarsa algorithm;
wherein a is t Q is the action taken in the current state new (s t ,a t ) For updated state values, Q (s t ,a t ) R is the current state value t For the calculated distance vector D, Q (s t+1 ,a t+1 ) For taking the state value after taking the next action in the current state, the alpha learning rate and the gamma weight factor;
and the storage unit is used for stopping iteration after the iteration operation is performed for 100 times and storing the state table Q.
5. The chromosome enhancement parameter adjustment device according to claim 4, wherein the learning rate α is 0.1 and the weighting factor γ is 0.9.
6. The chromosome enhancement parameter adjustment device of claim 5, wherein the device further comprises:
an interruption unit, configured to select an enhancement effect of a current iteration when a user selects to interrupt the iteration;
and the selecting unit is used for selecting the state of 5 before the v value in the state table in 100 iterations under the condition that the user does not terminate the iteration operation, and converting the state into the enhancement parameter for enhancement.
CN202311517103.0A 2023-11-15 2023-11-15 Chromosome enhancement parameter adjustment method and device Active CN117237241B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311517103.0A CN117237241B (en) 2023-11-15 2023-11-15 Chromosome enhancement parameter adjustment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311517103.0A CN117237241B (en) 2023-11-15 2023-11-15 Chromosome enhancement parameter adjustment method and device

Publications (2)

Publication Number Publication Date
CN117237241A CN117237241A (en) 2023-12-15
CN117237241B true CN117237241B (en) 2024-02-06

Family

ID=89084730

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311517103.0A Active CN117237241B (en) 2023-11-15 2023-11-15 Chromosome enhancement parameter adjustment method and device

Country Status (1)

Country Link
CN (1) CN117237241B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108460463A (en) * 2018-03-20 2018-08-28 合肥工业大学 High-end equipment flow line production dispatching method based on improved adaptive GA-IAGA
CN109872033A (en) * 2018-12-29 2019-06-11 华中科技大学 A kind of Airport Gate Position Scheduling method
CN113361915A (en) * 2021-06-04 2021-09-07 聪明工厂有限公司 Flexible job shop scheduling method based on deep reinforcement learning and multi-agent graph
CN116128334A (en) * 2022-12-08 2023-05-16 国网浙江省电力有限公司营销服务中心 Quality inspection task scheduling method, equipment and medium
CN116400312A (en) * 2023-01-06 2023-07-07 西安电子科技大学 Rapid networked radar node selection method based on migration reinforcement learning

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190295684A1 (en) * 2018-03-22 2019-09-26 The Regents Of The University Of Michigan Method and apparatus for analysis of chromatin interaction data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108460463A (en) * 2018-03-20 2018-08-28 合肥工业大学 High-end equipment flow line production dispatching method based on improved adaptive GA-IAGA
CN109872033A (en) * 2018-12-29 2019-06-11 华中科技大学 A kind of Airport Gate Position Scheduling method
CN113361915A (en) * 2021-06-04 2021-09-07 聪明工厂有限公司 Flexible job shop scheduling method based on deep reinforcement learning and multi-agent graph
CN116128334A (en) * 2022-12-08 2023-05-16 国网浙江省电力有限公司营销服务中心 Quality inspection task scheduling method, equipment and medium
CN116400312A (en) * 2023-01-06 2023-07-07 西安电子科技大学 Rapid networked radar node selection method based on migration reinforcement learning

Also Published As

Publication number Publication date
CN117237241A (en) 2023-12-15

Similar Documents

Publication Publication Date Title
US20210073641A1 (en) Learning device, learning system, and learning method
CN111882040A (en) Convolutional neural network compression method based on channel number search
CN110378419A (en) A kind of image set extending method, device, equipment and readable storage medium storing program for executing
CN109740734B (en) Image classification method of convolutional neural network by optimizing spatial arrangement of neurons
CN110991621A (en) Method for searching convolutional neural network based on channel number
CN111104704A (en) Cabinet internal layout design method, device and system and storage medium
CN112116104B (en) Method, device, medium and electronic equipment for automatically integrating machine learning
CN117852616B (en) Big language model alignment fine tuning method and system based on enhanced reject sampling training
JP2022541370A (en) Data enrichment policy update method, apparatus, device and storage medium
KR20220144281A (en) Method of optimizing neural network model and neural network model processing system performing the same
CN111160459A (en) Device and method for optimizing hyper-parameters
CN110222816B (en) Deep learning model establishing method, image processing method and device
Wang et al. Balanced training for sparse gans
CN116861957A (en) Operator automatic tuning method and related device based on reinforcement learning
CN114880806A (en) New energy automobile sales prediction model parameter optimization method based on particle swarm optimization
CN113407185A (en) Compiler optimization option recommendation method based on Bayesian optimization
CN110796268A (en) Method and device for determining hyper-parameters of business processing model
CN117237241B (en) Chromosome enhancement parameter adjustment method and device
CN111445024B (en) Medical image recognition training method
CN117808120A (en) Method and apparatus for reinforcement learning of large language models
CN113706285A (en) Credit card fraud detection method
CN112131089A (en) Software defect prediction method, classifier, computer device and storage medium
CN116128044A (en) Model pruning method, image processing method and related devices
Apipie et al. Assessing and comparing by specific metrics the performance of 15 multiobjective optimization metaheuristics when solving the portfolio optimization problem
CN118485239A (en) Plan generation method and device based on improved deep sub-Q network and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant