Needle implantation reconstruction method between cervical cancer tissues
Through deep reinforcement learning model and image processing technology, a reconstruction strategy for inter-tissue implant needles is generated, which solves the problem of difficult to determine the position and angle of implant needles in cervical cancer, and improves the accuracy and safety of the surgery.
Patent Information
- Application Number
- CN202411110909.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-12-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The implantation process of cervical cancer inter-tissue needle implantation is complex and requires rich experience and skills. The morphology and location of cervical cancer vary from person to person, making it difficult to accurately determine the implantation position and angle of the implantation needle, which affects the surgical effect.
Using deep reinforcement learning model combined with image processing technology, the reconstruction strategy of the implanted needle channel is generated by collecting and preprocessing medical image data, and the reconstruction and evaluation of the implanted needle channel is carried out, and the strategy is adjusted until the evaluation index threshold is reached, and the implanted needle is optimized. position and direction.
The accuracy and safety of needle implant surgery have been significantly improved. Through the characterization learning ability of deep learning and the decision-making optimization ability of reinforcement learning, the basic process of reconstruction of needle implantation channels between tissues has been optimized.
Smart Images

Figure CN119131238A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and more specifically, to a method for reconstructing cervical cancer tissue intercalation needles. Background Art
[0002] Cervical cancer is one of the common malignant tumors of the female reproductive system. Early diagnosis and treatment are crucial to improving the survival rate of patients. Interstitial implantation is one of the important means of brachytherapy for cervical cancer. By inserting an implantation needle into the tumor tissue, radioactive particles or rays are irradiated into the tumor tissue at close range to achieve the purpose of treatment.
[0003] However, the implantation process of the interstitial needle is a complex three-dimensional operation that requires doctors to have rich experience and skills. At the same time, since the shape and location of cervical cancer vary from person to person, the implantation position and angle of the needle will also be different, which brings certain difficulties to the doctor's operation.
[0004] In recent years, with the continuous development of computer technology, three-dimensional models of tumor tissue and implant needles can be reconstructed by processing and analyzing medical imaging data, providing an important reference for doctors' surgical planning and operations. Summary of the invention
[0005] The present invention aims at the technical problems existing in the prior art and provides a method for reconstruction of cervical cancer tissue by interstitial needle insertion to solve the problems raised in the above-mentioned background technology.
[0006] The technical solution of the present invention to solve the above technical problems is as follows: a method for reconstruction of cervical cancer tissue interstitial needle, specifically comprising the following steps:
[0007] Step 101: collect medical imaging data containing information on the position and direction of the implant needle, preprocess the collected data, and construct a deep reinforcement learning model;
[0008] Step 102: using the preprocessed medical image data as the input of the model, generating a reconstruction strategy for the implant needle channel through the deep reinforcement learning model, and reconstructing the implant needle channel using image processing technology according to the reconstruction strategy;
[0009] Step 103: Evaluate the reconstructed implant needle channel, set an evaluation index threshold, adjust the reconstruction strategy according to the evaluation result, and repeat the above steps until the evaluation index threshold is reached.
[0010] In a preferred embodiment, in step 101, medical image data containing information on the position and direction of the implant needle is collected, and the collected data is preprocessed. The specific steps are as follows:
[0011] Step A1, data association and annotation: De-noising, image enhancement and standardization are performed on the collected medical image data to ensure the data quality and consistency of model training and inference, and the location and direction information of the implant needle is associated and annotated with the corresponding medical image data;
[0012] Step A2, image segmentation: segmenting the medical image according to the marked location and direction information of the implant needle, extracting the area ROI around the implant needle, further comprising the following steps:
[0013] Step A201, filter pixels: Set the extracted area to be (x i ,y i ,z i ) as the center and a spherical area with a radius of C. For each pixel (x, y, z) in the medical image, calculate its i ,y i ,z i ), the specific calculation formula is as follows:
[0014]
[0015] Among them, (x, y, z) is the center point of ROI; in medical images, the pixel coordinates (x, y, z) are traversed to extract the pixels that meet the conditions and form the ROI around the implant needle;
[0016] Step A202, generate ROI image: create a binary mask image with the same size as the medical image, mark the pixel positions within the ROI as 1, and mark other positions as 0.
[0017] In a preferred embodiment, in the data association and annotation step A1, the position and direction information of the implant needle is associated and annotated with the corresponding medical image data, further comprising the following steps:
[0018] Step A101, coordinate conversion and direction conversion: Use a coordinate conversion matrix to convert the external coordinate position of the implant needle to (x p ,y p ,z p ) is converted to pixel coordinates (x i ,y i ,z i ), use the direction transformation matrix to transform the direction vector to Transformed to the medical imaging coordinate system
[0019] Step A102, medical image annotation: using the converted implant needle position (x i ,y i ,zi ) and direction vector Annotation is performed in medical images by drawing arrows on the medical images to indicate the direction of the implant needle and marking the coordinate points (x i ,y i ,z i ) to show the specific location and direction of the implant needle.
[0020] In a preferred embodiment, the deep reinforcement learning model is constructed using a deep Q network algorithm, including an input layer, a hidden layer and an output layer. The input layer receives state information, including medical image data and the position and direction information of the implant needle; the hidden layer includes multiple convolutional layers and fully connected layers for extracting and combining features; the output layer outputs the Q value of each action, and the specific calculation formula is: Q(s, a) = f θ (s,a), where s is the state, a is the action, and f θ It is a parameterized function of the deep Q network, which represents the network's prediction of the Q value of state s and action a. The specific steps are as follows:
[0021] Step S1, experience replay: maintain an experience pool to store the experience tuples (s, a, r, s') of interacting with the environment, where s is the current state, a is the action taken, r is the reward, and s' is the next state;
[0022] Step S2, target network: Use a target Q network to calculate the target Q value, reduce the Q value estimation deviation during training, and update the network parameters by minimizing the mean square error between the Q value predicted by the Q network and the target Q value. The specific calculation formula is as follows:
[0023]
[0024] Where γ is the discount factor, Q target (s,a) represents the expected cumulative reward after executing action a in the current state s. The cumulative reward includes the immediate reward and the future discounted reward. It represents the Q value corresponding to the action a' that can maximize the Q value in the next state s'.
[0025] In a preferred embodiment, in step 102, the preprocessed medical image data is used as the input of the model, and a reconstruction strategy of the implant needle channel is generated by a deep reinforcement learning model. According to the reconstruction strategy, the implant needle channel is reconstructed using image processing technology. The specific steps are as follows:
[0026] Step B1, strategy generation: The preprocessed medical image data is used as the input state s of the deep reinforcement learning model, and the position and direction of the implant needle are used as the action space. Each action a is a parameterized form of controlling the movement of the implant needle, representing a tuple containing position and direction information:
[0027] Using the trained deep reinforcement learning model, the optimal implant needle operation strategy is generated under the medical image data s by selecting the action A that maximizes the Q value, expressed as: in, Indicates that in state s, select action a that maximizes the Q value Q(s,a);
[0028] Step B2, action execution: executing the operation of the implant needle according to the generated strategy, executing the predicted optimal action by controlling the position and direction of the implant needle, and using image processing technology to reconstruct the implant needle channel in real time while executing the implant needle operation, further comprising the following steps:
[0029] Step B201, trajectory tracking: using the motion trajectory of the implant needle and the actions generated by the deep learning model, track the actual path of the implant needle, and represent the position of the implant needle at time t as k(t). The motion trajectory is represented by action a t Control, the specific calculation formula is as follows:
[0030]
[0031] Among them, a t is the best action generated by the deep Q network, k(t) is the motion trajectory of the implant needle, k0 is the initial position of the implant needle, and v(τ) is the velocity vector of the implant needle at time τ;
[0032] Step B202, reconstruction of the implant needle channel: Reconstruct the geometric shape and path information of the implant needle channel based on the implant needle trajectory data extracted in real time, and obtain a smooth channel shape by fitting the trajectory of the implant needle using the spline interpolation method.
[0033] In a preferred embodiment, in step 103, the reconstructed implant needle channel is evaluated, and an evaluation index threshold is set. The reconstruction strategy is adjusted according to the evaluation result, and the above steps are repeated until the evaluation index threshold is reached. The specific steps are as follows:
[0034] Step C1, design a reward function to evaluate the accuracy, safety and smoothness of the implant needle channel generated by the model, input the generated implant needle channel into the reward function, calculate its reward value, and obtain the quality evaluation score of the channel. The output of the reward function will reflect the quality of the channel. The specific calculation formula is as follows:
[0035] U=w1×U accuracy+w2×U safety +w3×U amoothness
[0036] Among them, U represents the reward function, U accuracy represents the accuracy evaluation score of the channel, U safety represents the security assessment score of the channel, U amoothness represents the smoothness evaluation score of the channel, (w1,w2,w3) is the weight of each evaluation factor, satisfying w1+w2+w3=1;
[0037] Step C2, adjusting the reconstruction strategy: adjusting the reconstruction strategy according to the evaluation score U output by the reward function, including accuracy adjustment, security adjustment and smoothness adjustment;
[0038] The accuracy assessment adjustment is to ensure that the implant needle can accurately reach the target area by adjusting the path planning algorithm of the implant needle;
[0039] The safety adjustment is to increase the safety margin and limit the maximum speed of the implant needle to improve the safety of the operation;
[0040] The smoothness adjustment is to use a spline path generation algorithm to generate a smooth path, and optimize the speed and acceleration control algorithm to smoothly adjust the movement speed and direction change of the implant needle;
[0041] Step C3, repeat generation and evaluation: regenerate the implant needle channel according to the adjusted strategy, apply the reward function again to evaluate the quality of the generated channel, obtain a new evaluation score U', set an evaluation index threshold δ, compare the new evaluation score with the evaluation index threshold, and stop generating when the evaluation score of the generated implant needle channel reaches the set threshold.
[0042] In a preferred embodiment, the accuracy evaluation score U accuracy is obtained by the distance between the predicted position and the target position of the implant needle at each time step, U accuracy =-k(T)-k target |, where k(T) is the position vector of the implant needle at the end time T; k target is the expected target position vector.
[0043] In a preferred embodiment, the safety assessment score is to assess the collision risk by simulating the movement of the implant needle in the channel, detecting in real time the distance between the implant needle and the channel wall, and the minimum distance from the surrounding structure, and calculating the safety assessment score. safety Designed as the inverse function of collision detection, the greater the distance, the higher the reward, and the smaller the distance, the higher the penalty. The specific calculation formula is as follows:
[0044]
[0045] Among them, CoD is the minimum distance between the implant needle and the channel wall, and MaxD is the maximum safe distance allowed.
[0046] In a preferred embodiment, the smoothness evaluation score is obtained based on the velocity change of the implant needle to obtain the smoothness of the implant needle channel trajectory, U amoothness =-v(τ)|, v(τ) is the velocity vector of the implant needle at time τ.
[0047] The beneficial effects of the present invention are: collecting medical imaging data containing information on the position and direction of an implant needle, preprocessing the collected data, constructing a deep reinforcement learning model, using the preprocessed medical imaging data as the input of the model, generating a reconstruction strategy for the implant needle channel through the deep reinforcement learning model, reconstructing the implant needle channel based on the reconstruction strategy using image processing technology, evaluating the reconstructed implant needle channel, setting an evaluation index threshold, adjusting the reconstruction strategy based on the evaluation results, repeating the above steps until the preset evaluation index threshold is reached, and optimizing the basic process of intertissue implant needle channel reconstruction by combining the representation learning ability of deep learning and the decision optimization ability of reinforcement learning, thereby significantly improving the accuracy and safety of implant needle surgery. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0050] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "plurality" means two or more, unless otherwise clearly and specifically defined.
[0051] In the description of the present application, the term "for example" is used to mean "used as an example, illustration or description". Any embodiment described as "for example" in the present application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any technician in the field to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid unnecessary details to obscure the description of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.
[0052] Example 1
[0053] This embodiment provides Figure 1 A method for reconstruction of cervical cancer tissue interstitial needles is shown, which specifically includes the following steps:
[0054] Step 101: collect medical imaging data containing information on the position and direction of the implant needle, preprocess the collected data, and construct a deep reinforcement learning model;
[0055] Step 102: using the preprocessed medical image data as the input of the model, generating a reconstruction strategy for the implant needle channel through the deep reinforcement learning model, and reconstructing the implant needle channel using image processing technology according to the reconstruction strategy;
[0056] Step 103: Evaluate the reconstructed implant needle channel, set an evaluation index threshold, adjust the reconstruction strategy according to the evaluation result, and repeat the above steps until the evaluation index threshold is reached.
[0057] Preferably, in step 101, medical imaging data containing information on the position and direction of the implant needle is collected, and the collected data is preprocessed to extract the accurate implant needle path and target area to help evaluate the safety of the implant needle. The specific steps are as follows:
[0058] Step A1, data association and annotation: De-noising, image enhancement and standardization are performed on the collected medical image data to ensure the data quality and consistency of model training and inference, and the location and direction information of the implant needle is associated and annotated with the corresponding medical image data, further comprising the following steps:
[0059] Step A101, coordinate conversion and direction conversion: Use a coordinate conversion matrix to convert the external coordinate position of the implant needle to (x p ,y p ,z p ) is converted to pixel coordinates (xi ,y i ,z i ), use the direction transformation matrix to transform the direction vector to Transformed to the medical imaging coordinate system
[0060] Step A102, medical image annotation: using the converted implant needle position (x i ,y i ,z i ) and direction vector Annotation is performed in medical images by drawing arrows on the medical images to indicate the direction of the implant needle and marking the coordinate points (x i ,y i ,z i ) to show the specific position and direction of the implant needle;
[0061] Step A2, image segmentation: segmenting the medical image according to the marked location and direction information of the implant needle, extracting the area ROI around the implant needle, further comprising the following steps:
[0062] Step A201, filter pixels: Set the extracted area to be (x i ,y i ,z i ) as the center and a spherical area with a radius of C. For each pixel (x, y, z) in the medical image, calculate its difference with (x i ,y i ,z i ), the specific calculation formula is as follows:
[0063]
[0064] Among them, (x, y, z) is the center point of ROI; in medical images, the pixel coordinates (x, y, z) are traversed to extract the pixels that meet the conditions and form the ROI around the implant needle;
[0065] Step A202, generate ROI image: create a binary mask image with the same size as the medical image, mark the pixel positions within the ROI as 1, and mark other positions as 0.
[0066] Preferably, the deep reinforcement learning model is constructed using a deep Q network algorithm. The deep Q network is an extension of the Q-learning algorithm, combining the ideas of deep learning and Q-learning. The reinforcement learning algorithm based on the Q-value function is used to estimate the value of each state-action pair, that is, the expected cumulative reward obtained after performing a certain action; it includes an input layer, a hidden layer and an output layer, the input layer receives state information, including medical imaging data and the position and direction information of the implant needle; the hidden layer includes multiple convolutional layers and fully connected layers for extracting and combining features; the output layer outputs the Q value of each action, and the specific calculation formula is: Q(s,a)=f θ (s,a), where s is the state, a is the action, and f θ It is a parameterized function of the deep Q network, which represents the network's prediction of the Q value of state s and action a. The specific steps are as follows:
[0067] Step S1, experience replay: maintain an experience pool to store the experience tuples (s, a, r, s') of interacting with the environment, where s is the current state, a is the action taken, r is the reward, and s' is the next state;
[0068] Step S2, target network: Use a target Q network to calculate the target Q value, reduce the Q value estimation deviation during training, and update the network parameters by minimizing the mean square error between the Q value predicted by the Q network and the target Q value. The specific calculation formula is as follows:
[0069]
[0070] Where γ is the discount factor, Q target (s,a) represents the expected cumulative reward after executing action a in the current state s. The cumulative reward includes the immediate reward and the future discounted reward. It represents the Q value corresponding to the action a' that can maximize the Q value in the next state s'.
[0071] Preferably, in step 102, the preprocessed medical image data is used as the input of the model, and a reconstruction strategy of the implant needle channel is generated by a deep reinforcement learning model. According to the reconstruction strategy, the implant needle channel is reconstructed using image processing technology to improve the efficiency and accuracy of the surgical process. The specific steps are as follows:
[0072] Step B1, strategy generation: The preprocessed medical image data is used as the input state s of the deep reinforcement learning model, and the position and direction of the implant needle are used as the action space. Each action a is a parameterized form of controlling the movement of the implant needle, representing a tuple containing position and direction information:
[0073] Using the trained deep reinforcement learning model, the optimal implant needle operation strategy is generated under the medical image data s by selecting the action A that maximizes the Q value, expressed as: in, Indicates that in state s, select action a that maximizes the Q value Q(s,a);
[0074] Step B2, action execution: executing the operation of the implant needle according to the generated strategy, executing the predicted optimal action by controlling the position and direction of the implant needle, and using image processing technology to reconstruct the implant needle channel in real time while executing the implant needle operation, further comprising the following steps:
[0075] Step B201, trajectory tracking: using the motion trajectory of the implant needle and the actions generated by the deep learning model, track the actual path of the implant needle, and represent the position of the implant needle at time t as k(t). The motion trajectory is represented by action a t Control, the specific calculation formula is as follows:
[0076]
[0077] Among them, a t is the best action generated by the deep Q network, k(t) is the motion trajectory of the implant needle, k0 is the initial position of the implant needle, and v(τ) is the velocity vector of the implant needle at time τ;
[0078] Step B202, reconstructing the implant needle channel: reconstructing the geometric shape and path information of the implant needle channel according to the implant needle trajectory data extracted in real time, and obtaining a smooth channel shape by fitting the trajectory of the implant needle using a spline interpolation method.
[0079] Preferably, in step 103, the reconstructed implant needle channel is evaluated, and an evaluation index threshold is set. The reconstruction strategy is adjusted according to the evaluation result, and the above steps are repeated until the evaluation index threshold is reached. By continuously optimizing and adjusting the reconstruction strategy, the quality and effect of the implant needle channel reconstruction are improved. The specific steps are as follows:
[0080] Step C1, design a reward function to evaluate the accuracy, safety and smoothness of the implant needle channel generated by the model, input the generated implant needle channel into the reward function, calculate its reward value, and obtain the quality evaluation score of the channel. The output of the reward function will reflect the quality of the channel. The specific calculation formula is as follows:
[0081] U=w1×U accuracy +w2×U safety +w3×U amoothness
[0082] Among them, U represents the reward function, U accuracyrepresents the accuracy evaluation score of the channel, U safety represents the security assessment score of the channel, U amoothness represents the smoothness evaluation score of the channel, (w1,w2,w3) is the weight of each evaluation factor, satisfying w1+w2+w3=1;
[0083] The accuracy evaluation score U accuracy is obtained by the distance between the predicted position and the target position of the implant needle at each time step, U accuracy =-k(T)-k target |, where k(T) is the position vector of the implant needle at the end time T; k target is the expected target position vector;
[0084] The safety assessment score is to assess the collision risk by simulating the movement of the implant needle in the channel, detecting in real time the distance between the implant needle and the channel wall, and the minimum distance to the surrounding structures. safety Designed as the inverse function of collision detection, the greater the distance, the higher the reward, and the smaller the distance, the higher the penalty. The specific calculation formula is as follows:
[0085]
[0086] Among them, CoD is the minimum distance between the implant needle and the channel wall, and MaxD is the maximum safe distance allowed;
[0087] The smoothness evaluation score is based on the smoothness of the implant needle channel trajectory obtained based on the velocity change of the implant needle. amoothness = -v(τ)|, v(τ) is the velocity vector of the implant needle at time τ;
[0088] Step C2, adjusting the reconstruction strategy: adjusting the reconstruction strategy according to the evaluation score U output by the reward function, including accuracy adjustment, security adjustment and smoothness adjustment;
[0089] The accuracy assessment adjustment is to ensure that the implant needle can accurately reach the target area by adjusting the path planning algorithm of the implant needle;
[0090] The safety adjustment is to increase the safety margin and limit the maximum speed of the implant needle to improve the safety of the operation;
[0091] The smoothness adjustment is to use a spline path generation algorithm to generate a smooth path, and optimize the speed and acceleration control algorithm to smoothly adjust the movement speed and direction change of the implant needle;
[0092] Step C3, repeat generation and evaluation: regenerate the implant needle channel according to the adjusted strategy, apply the reward function again to evaluate the quality of the generated channel, obtain a new evaluation score U', set an evaluation index threshold δ, compare the new evaluation score with the evaluation index threshold, and stop generating when the evaluation score of the generated implant needle channel reaches the set threshold.
[0093] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0094] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0095] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0096] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0097] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0098] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0099] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for reconstruction of cervical cancer tissue by interstitial needle implantation, characterized in that: The specific steps include: Step 101: collect medical imaging data containing information on the position and direction of the implant needle, preprocess the collected data, and construct a deep reinforcement learning model; Step 102: using the preprocessed medical image data as the input of the model, generating a reconstruction strategy for the implant needle channel through the deep reinforcement learning model, and reconstructing the implant needle channel using image processing technology according to the reconstruction strategy; Step 103: Evaluate the reconstructed implant needle channel, set an evaluation index threshold, adjust the reconstruction strategy according to the evaluation result, and repeat the above steps until the evaluation index threshold is reached.
2. A method for reconstruction of cervical cancer tissue by interstitial needle implantation according to claim 1, characterized in that: In step 101, medical image data containing information on the position and direction of the implant needle is collected, and the collected data is preprocessed. The specific steps are as follows: Step A1, data association and labeling: performing denoising, image enhancement and standardization on the collected medical image data, and associating and labeling the position and direction information of the implant needle with the corresponding medical image data; Step A2, image segmentation: according to the marked position and direction information of the implant needle, segmentation is performed in the medical image to extract the area ROI around the implant needle.
3. A method for reconstruction of cervical cancer tissue by interstitial needle implantation according to claim 2, characterized in that: In the data association and labeling step A1, the position and direction information of the implant needle is associated and labeled with the corresponding medical image data, further comprising the following steps: Step A101, coordinate conversion and direction conversion: Use a coordinate conversion matrix to convert the external coordinate position of the implant needle to (x p ,y p ,z p ) is converted to pixel coordinates (x i ,y i ,z i ), use the direction transformation matrix to transform the direction vector to Transformed to the medical imaging coordinate system Step A102, medical image annotation: using the converted implant needle position (x i ,y i ,z i ) and direction vector Annotation is performed in medical images by drawing arrows on the medical images to indicate the direction of the implant needle and marking the coordinate points (x i ,y i ,z i ) to show the specific location and direction of the implant needle.
4. A method for reconstruction of cervical cancer tissue by interstitial needle implantation according to claim 2, characterized in that: In the image segmentation of step A2, segmentation is performed in the medical image according to the marked position and direction information of the implant needle to extract the area ROI around the implant needle, further comprising the following steps: Step A201, filter pixels: Set the extracted area to be (x i ,y i ,z i ) as the center and a spherical area with a radius of C. For each pixel (x, y, z) in the medical image, calculate its i ,y i ,z i ), the specific calculation formula is as follows: Among them, (x, y, z) is the center point of ROI; in medical images, the pixel coordinates (x, y, z) are traversed to extract the pixels that meet the conditions and form the ROI around the implant needle; Step A202, generate ROI image: create a binary mask image with the same size as the medical image, mark the pixel positions within the ROI as 1, and mark other positions as 0.
5. The method for reconstruction of cervical cancer tissue by interstitial needle implantation according to claim 1, characterized in that: The deep reinforcement learning model is constructed using a deep Q network algorithm, including an input layer, a hidden layer and an output layer. The input layer receives state information, including medical image data and the position and direction information of the implant needle; the hidden layer includes multiple convolutional layers and fully connected layers for extracting and combining features; the output layer outputs the Q value of each action, and the specific calculation formula is: Q(s,a)=f θ (s,a), where f θ It is a parameterized function of the deep Q network, which represents the network's prediction of the Q value of state s and action a. The specific steps are as follows: Step S1, experience replay: maintain an experience pool to store the experience tuples (s, a, r, s') of interacting with the environment, where s is the current state, a is the action taken, r is the reward, and s' is the next state; Step S2, target network: Use a target Q network to calculate the target Q value, reduce the Q value estimation deviation during training, and update the network parameters by minimizing the mean square error between the Q value predicted by the Q network and the target Q value. The specific calculation formula is as follows: Where γ is the discount factor, Q target (s,a) represents the expected cumulative reward after executing action a in the current state s. It represents the Q value corresponding to the action a' that can maximize the Q value in the next state s'.
6. The method for reconstruction of cervical cancer tissue by interstitial needle implantation according to claim 1, characterized in that: In step 102, the preprocessed medical image data is used as the input of the model, and a reconstruction strategy of the implant needle channel is generated by the deep reinforcement learning model. According to the reconstruction strategy, the implant needle channel is reconstructed using image processing technology. The specific steps are as follows: Step B1, strategy generation: The preprocessed medical image data is used as the input state s of the deep reinforcement learning model, and the position and direction of the implant needle are used as the action space. Each action a is a parameterized form of controlling the movement of the implant needle, representing a tuple containing position and direction information: Using the trained deep reinforcement learning model, the optimal operation strategy for the implant needle is generated under the medical imaging data s, and the action that maximizes the Q value is selected as: in, Indicates that in state s, select action a that maximizes the Q value Q(s,a); Step B2, action execution: Execute the operation of the implant needle according to the generated strategy, execute the predicted optimal action by controlling the position and direction of the implant needle, and use image processing technology to reconstruct the implant needle channel in real time while executing the implant needle operation.
7. A method for reconstruction of cervical cancer tissue by interstitial needle implantation according to claim 6, characterized in that: During the execution of the step B2, while the operation of inserting the needle is being performed, the insertion needle channel is reconstructed in real time using image processing technology, further comprising the following steps: Step B201, trajectory tracking: using the motion trajectory of the implant needle and the actions generated by the deep learning model, track the actual path of the implant needle, and represent the position of the implant needle at time t as k(t). The motion trajectory is represented by action a t Control, the specific calculation formula is as follows: Among them, a t is the best action generated by the deep Q network, k(t) is the motion trajectory of the implant needle, k0 is the initial position of the implant needle, and v(τ) is the velocity vector of the implant needle at time τ; Step B202, reconstructing the implant needle channel: reconstructing the geometric shape and path information of the implant needle channel according to the implant needle trajectory data extracted in real time, and obtaining the channel shape by fitting the trajectory of the implant needle using a spline interpolation method.
8. The method for reconstruction of cervical cancer tissue by interstitial needle implantation according to claim 1, characterized in that: In step 103, the reconstructed implant needle channel is evaluated, and an evaluation index threshold is set. The reconstruction strategy is adjusted according to the evaluation result, and the above steps are repeated until the evaluation index threshold is reached. The specific steps are as follows: Step C1, design a reward function to evaluate the accuracy, safety and smoothness of the implant needle channel generated by the model, input the generated implant needle channel into the reward function, calculate its reward value, and obtain the quality evaluation score of the channel. The specific calculation formula is as follows: U=w1×U accuracy +w2×U safety +w3×U amoothness Among them, U represents the reward function, U accuracy represents the accuracy evaluation score of the channel, U safety represents the security assessment score of the channel, U amoothness represents the smoothness evaluation score of the channel, (w1,w2,w3) is the weight of each evaluation factor, satisfying w1+w2+w3=1; Step C2, adjusting the reconstruction strategy: adjusting the reconstruction strategy according to the evaluation score U output by the reward function, including accuracy adjustment, security adjustment and smoothness adjustment; Step C3, repeat generation and evaluation: regenerate the implant needle channel according to the adjusted strategy, apply the reward function again to evaluate the quality of the generated channel, obtain a new evaluation score U', set an evaluation index threshold δ, compare the new evaluation score with the evaluation index threshold, and stop generating when the evaluation score of the generated implant needle channel reaches the set threshold.
9. A method for reconstruction of cervical cancer tissue by interstitial needle implantation according to claim 8, characterized in that: The accuracy evaluation score U accuracy It is obtained by the distance between the predicted position and the target position of the implant needle at each time step, expressed as: U accuracy =-|k(T)-k target |, where k(T) is the position vector of the implant needle at the end time T; k target is the expected target position vector.
10. The method for reconstruction of cervical cancer tissue by interstitial needle implantation according to claim 8, characterized in that: The safety assessment score is obtained by simulating the movement of the implant needle in the channel and detecting the minimum distance between the implant needle and the channel wall in real time to assess the collision risk. The specific calculation formula is as follows: Among them, CoD is the minimum distance between the implant needle and the channel wall, and MaxD is the maximum safe distance allowed; The smoothness evaluation score is based on the change in the speed of the implant needle to obtain the smoothness of the implant needle channel trajectory, expressed as: U amoothness =-|v(τ)|, where v(τ) is the velocity vector of the implant needle at time τ.
