Key point determination method, device, equipment and storage medium
By determining the image deformation information between the image to be processed and the target template image in the surgical robot, and combining it with key point prediction, the problem of low accuracy in determining key points in the surgical robot is solved, and the coordinate system establishment and operation of the surgical robot are improved. Accuracy.
Patent Information
- Application Number
- CN202310318560.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-28
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2043-03-28
AI Technical Summary
In the existing technology, the accuracy of determining key points in surgical robots is low, which affects the establishment of coordinate systems and surgical accuracy.
By determining the image deformation information between the image to be processed and the target template image, deformation processing and key point prediction are performed, and key points are determined by combining the two dimensions of deformation and prediction to improve accuracy.
It improves the accuracy and stability of key points, avoids inaccuracies caused by single-dimensional determination, and enhances the coordinate system establishment and surgical accuracy in surgical robots.
Smart Images

Figure CN116563371B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a key point determination method, device, equipment and storage medium. Background Art
[0002] In recent years, with the development of computer technology, surgical robots are more and more widely used in surgery. In surgical robots, the establishment of a coordinate system is the basis for a series of parameter calculations, and the establishment of this coordinate system depends on the determination of key points.
[0003] In the related art, an image for which key points need to be determined can be input into a trained neural network model, and the key points of the image can be predicted based on the neural network model. However, the accuracy of key points determined by this method is low. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides a key point determination method, device, equipment and storage medium.
[0005] In a first aspect, the present disclosure provides a key point determination method, the method comprising:
[0006] Determine image deformation information between the image to be processed and the target template image; wherein the target template image is an image corresponding to template key point information;
[0007] Performing deformation processing on the template key point information according to the image deformation information to obtain the image deformation key point information;
[0008] Performing key point prediction processing on the image to be processed to obtain image prediction key point information;
[0009] The image key point information of the image to be processed is determined according to the image deformation key point information and the image prediction key point information.
[0010] In a second aspect, the present disclosure provides a key point determination device, the device comprising:
[0011] A first determination module is used to determine image deformation information between the image to be processed and the target template image; wherein the target template image is an image corresponding to template key point information;
[0012] A deformation module, used for performing deformation processing on the template key point information according to the image deformation information to obtain the image deformation key point information;
[0013] A prediction module, used for performing key point prediction processing on the image to be processed to obtain image prediction key point information;
[0014] The second determination module is used to determine the image key point information of the image to be processed according to the image deformation key point information and the image prediction key point information.
[0015] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the device comprising:
[0016] one or more processors;
[0017] a storage device for storing one or more programs,
[0018] When one or more programs are executed by one or more processors, the one or more processors implement the method provided in the first aspect.
[0019] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which implements the method provided in the first aspect when the computer program is executed by a processor.
[0020] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0021] A key point determination method, device, equipment and storage medium of the disclosed embodiment determine the image deformation information between the image to be processed and the target template image; wherein the target template image is an image corresponding to the template key point information; the template key point information is deformed according to the image deformation information to obtain the image deformation key point information; the image to be processed is subjected to key point prediction processing to obtain the image prediction key point information; the image key point information of the image to be processed is determined according to the image deformation key point information and the image prediction key point information. Thus, the deformation between the image to be processed and the template is determined, the key points of the template are processed according to the deformation to obtain the deformation key points, and the prediction key points are determined by prediction, and then the final key points are determined by combining the deformation key points and the prediction key point information, and the key points are determined from two dimensions, namely deformation and prediction, so as to avoid the key points being easily affected by the key points determined from a single dimension, thereby improving the stability and the accuracy of the key points. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0024] Figure 1 A flowchart of a key point determination method provided in an embodiment of the present disclosure;
[0025] Figure 2 A flowchart of another key point determination method provided by an embodiment of the present disclosure;
[0026] Figure 3 A schematic diagram of a training process of a key point detection model provided in an embodiment of the present disclosure;
[0027] Figure 4 A flowchart of another key point determination method provided in an embodiment of the present disclosure;
[0028] Figure 5 A schematic diagram of the training process of another key point detection model provided in an embodiment of the present disclosure;
[0029] Figure 6 A schematic diagram of the structure of a key point determination device provided in an embodiment of the present disclosure;
[0030] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0032] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0033] In order to improve the accuracy of key point determination, the key point determination method provided by the embodiment of the present disclosure is described below. In the embodiment of the present disclosure, the key point determination method can be performed by an electronic device. The electronic device can be a controller of a surgical robot. The electronic device can include a device with communication functions such as a tablet computer, a desktop computer, a laptop computer, etc., and can also include a device simulated by a virtual machine or a simulator.
[0034] Figure 1 FIG. 1 is a flow chart of a key point determination method provided by an embodiment of the present disclosure. Figure 1 As shown, the key point determination method may include the following steps.
[0035] Step 101, determining image deformation information between an image to be processed and a target template image; wherein the target template image is an image corresponding to template key point information.
[0036] Among them, the key points are also called interest points. Taking the knee joint as an example, the key points of the knee joint may include the medial epicondyle of the femur, the lateral epicondyle of the femur, the apex of the intercondylar fossa of the femur, the center of the tibial crest, the insertion point of the posterior cruciate ligament of the tibial bone, and the medial 1 / 3 of the tibial tubercle. The image may include but is not limited to medical imaging images. For example, the image may be a computed tomography (CT) image and / or a magnetic resonance (MR) image. The image to be processed may be an image for which key points are to be determined. The image to be processed may be an image including a part. The present embodiment does not limit the specific part included in the image to be processed. For example, the image to be processed may be an image including a knee joint part.
[0037] The template image may be an image with predetermined template key point information, and the part included in the template image may be the same as the part included in the image to be processed. For example, if the image to be processed includes a knee joint part, the template image is also an image including a knee joint part. The target template image may be a template image currently matched with the image to be processed. The key point information may be information characterizing the position of the key point in the image, and the key point information may characterize the position of one or more key points in the image. There are multiple types of representation of the key point information. This embodiment does not limit the representation type of the key point information. For example, the type of the key point information may be a coordinate type, and the key point information of the coordinate type may be the position coordinates of each key point. The key point information of the coordinate type is also called the key point gold standard; the type of the key point information may be a heat map type, and the key point information of the heat map type may be a position heat map of the key point. The position heat map characterizes the probability of the position of the key point, and the key point information of the heat map type is also called the key point heat map gold standard. The template key point information may be predetermined key point information corresponding to the target template image.
[0038] The image deformation information may be information characterizing the image transformation relationship between the image to be processed and the target template image, and the image deformation information is also called an image deformation field.
[0039] In the disclosed embodiment, a target template image with determined template key point information is pre-set, and image deformation information between the image to be processed for which key points need to be determined and the target template image is calculated. There are many methods for determining the image deformation information, which are not limited in the present embodiment. For example, the method for determining the image deformation information may include: calculating the image deformation information between the image to be processed and the target template image through a traditional image registration algorithm, wherein the traditional image registration algorithm may be a registration algorithm based on optical flow theory (Demons). Alternatively, the method for determining the image deformation information may include: inputting the image to be processed and the target template image into a pre-trained neural network model, and obtaining the corresponding image deformation information through the neural network calculation.
[0040] In the embodiment of the present disclosure, before determining the image deformation information between the image to be processed and the target template image, the target template image may be determined in advance. There are many methods for determining the target template image, which is not limited in the embodiment.
[0041] In an optional implementation, a target template image corresponding to each part on a one-to-one basis may be preset, and the corresponding target template image may be determined according to the part included in the image to be processed.
[0042] In another optional implementation, the key point determination method further includes: determining the image similarity between each candidate template image and the image to be processed among a plurality of preset candidate template images; and determining the target template image among the plurality of candidate template images according to the image similarity.
[0043] The candidate template image may be an alternative template image, and the candidate template image may be the same as the sample image used in the model training process. Image similarity may be data representing the degree of similarity between two images. There are many types of image similarity, and this embodiment does not limit the image similarity. For example, the image similarity may be a structural similarity metric, mutual information, similarity based on neural network technology, etc.
[0044] In the embodiment of the present disclosure, for each candidate template image, the key point determination device can determine the image similarity between the candidate template image and the image to be processed, obtain multiple image similarities, determine the target image similarity with the highest similarity represented by the multiple image similarities, and determine the candidate template image corresponding to the target image similarity as the target template image.
[0045] In the above scheme, the target template image with the highest similarity to each image to be processed is determined, which improves the similarity between the image to be processed and the target template image, reduces the subsequent deformation of the target template image, and lays a foundation for improving the accuracy of subsequent image key point information.
[0046] Step 102: deform the template key point information according to the image deformation information to obtain the image deformation key point information.
[0047] The image deformation key point information may be key point information obtained by deforming already determined key point information.
[0048] In this embodiment, after determining the image deformation information between the image to be processed and the target template image, the template key point information corresponding to the target template image is deformed according to the image deformation information to obtain the image deformation key point information. That is, the deformation between the image to be processed and the target template image is recorded by the image deformation information, and the template key point information is transformed according to the deformation to obtain the corresponding image deformation key point information, and the corresponding key point information is determined by deformation.
[0049] In an optional implementation manner, the template key point information is of a coordinate type, and the image deformation key point information obtained by processing the template key point information through the image deformation information is also of a coordinate type.
[0050] Step 103: perform key point prediction processing on the image to be processed to obtain image prediction key point information.
[0051] The image prediction key point information may be key point information obtained by prediction based on the image itself.
[0052] In the embodiments of the present disclosure, key point prediction can be performed on the image to be processed based on neural network technology or other key point extraction algorithms based on the image itself to obtain image prediction key point information corresponding to the image to be processed.
[0053] It should be noted that the order of the above steps of determining the image deformation key point information and the related steps of determining the image prediction key point information is not limited in this embodiment, but step 101 needs to be performed before step 102.
[0054] Step 104: Determine the image key point information of the image to be processed according to the image deformation key point information and the image prediction key point information.
[0055] The image key point information may be the image key point information determined based on two dimensions of deformation and prediction.
[0056] In the disclosed embodiment, after determining the image deformation key point information and the image prediction key point information, the key point determination device can perform weighted processing based on the image deformation key point information and the image prediction key point information to obtain the image key point information of the image to be processed.
[0057] For example, if the image deformation key point information is of coordinate type and the image prediction key point information is of heat map type, the key point determination device can first convert the image prediction key point information of the heat map type into the image prediction key point information of the coordinate type. Furthermore, the coordinates with the same type of labels in the image deformation key point information and the image prediction key point information of the same coordinate type are weighted summed to obtain the image key point information. Taking the image to be processed of the knee joint as an example, this type of label may include: one or more of the medial epicondyle of the femur label, the lateral epicondyle of the femur label, the apex label of the intercondylar fossa of the femur, the center label of the tibial crest, the attachment point label of the posterior cruciate ligament of the tibial tuberosity, and the inner 1 / 3 label of the tibial tuberosity.
[0058] In another optional implementation, if the image deformation key point information is of coordinate type and the image prediction key point information is of heat map type, the key point determination device may first convert the image deformation key point information of coordinate type into image deformation key point information of heat map type, and perform weighted summation on two images of the same heat map type to obtain the image key point information H final , the image key point information H final The calculation formula is:
[0059] H final =β 1 H AW '+β 2 H n-pre '
[0060] Among them, H AW ' is the key point information of image deformation, H n-pre 'Predict key point information for the image, β 1 , β 2 They are the image deformation key point information H AW 'With the image prediction key point information H n-pre 'Weighted coefficient, image key point heat map H final The heat map of multiple key points can be included, and the coordinates of the maximum value in the heat map corresponding to each key point are calculated to obtain the image key point information of the coordinate type.
[0061] A key point determination method of an embodiment of the present disclosure determines the image deformation information between the image to be processed and the target template image; wherein the target template image is an image corresponding to the template key point information; the template key point information is deformed according to the image deformation information to obtain the image deformation key point information; the image to be processed is subjected to key point prediction processing to obtain the image prediction key point information; the image key point information of the image to be processed is determined according to the image deformation key point information and the image prediction key point information. Thus, the deformation between the image to be processed and the template is determined, the key points of the template are processed according to the deformation to obtain the deformation key points, and the prediction key points are determined by prediction, and then the final key points are determined by combining the deformation key points and the prediction key point information, and the key points are determined from two dimensions, namely deformation and prediction, so as to avoid the key points being easily affected by the key points determined from a single dimension, thereby improving the stability and the accuracy of the key points.
[0062] In some embodiments of the present disclosure, the determination of the above-mentioned image deformation information and the determination of the image prediction key point information can be realized based on the neural network technology. Specifically, in the above-mentioned embodiments, the image deformation information between the image to be processed and the target template image is determined, including: inputting the image to be processed and the target template image into a pre-trained key point detection model to obtain the image deformation information. Correspondingly, in the above-mentioned embodiments, performing key point prediction processing on the image to be processed to obtain the image prediction key point information includes: performing key point prediction on the image to be processed based on the key point detection model to obtain the image prediction key point information.
[0063] Figure 2 A flowchart of another key point determination method provided by an embodiment of the present disclosure is shown as follows: Figure 2 As shown, the key point determination method may include the following steps.
[0064] Step 201: input the image to be processed and the target template image into a pre-trained key point detection model to obtain image deformation information.
[0065] The key point detection model may be a neural network model for determining the key points of an image, and the key point detection model may be a model having an image deformation determination function and a key point prediction function. This embodiment does not limit the type of neural network of the key point detection model, for example, the key point detection model may be an end-to-end model having an encoder and a decoder.
[0066] In this embodiment, the key point determination device can input the image to be processed and the target template image corresponding to the image to be processed into the key point detection model, and the key point detection model outputs the image deformation information between the image to be processed and the target template image.
[0067] In some embodiments of the present disclosure, a pre-trained key point detection model includes: a pre-trained encoder model, a first decoder model, and inputting the image to be processed and the target template image into the pre-trained key point detection model to obtain image deformation information, including: inputting the image to be processed and the target template image into the encoder model to obtain a joint code output by the encoder model; inputting the joint code into the first decoder model, and determining the image deformation information based on the output data of the first decoder model.
[0068] The encoder model may be a model for performing neural network encoding on its own input data. The decoder model may be a model for performing neural network decoding on output data of the encoder model. The first decoder model may be a model for decoding output data of the encoder model into image deformation information. Joint encoding may be image features calculated and determined by the encoder.
[0069] In this embodiment, the input data of the encoder model is determined based on the image to be processed and the target template image, the output data of the encoder model is the joint encoding of the image to be processed and the target template image, the joint encoding is used as the input data of the first decoder model, and the image deformation information between the image to be processed and the target template image is determined based on the output data of the first decoder model.
[0070] Step 202: deform the template key point information according to the image deformation information to obtain the image deformation key point information.
[0071] Step 203: perform key point prediction on the image to be processed based on the key point detection model to obtain image prediction key point information.
[0072] In this embodiment, the key point detection model can be used to predict key points based on the image to be processed itself to obtain corresponding image prediction key point information.
[0073] In some embodiments of the present disclosure, the pre-trained key point detection model also includes a pre-trained second decoder model, which performs key point prediction on the image to be processed based on the key point detection model to obtain image prediction key point information, including: inputting the joint code into the second decoder model, and determining the image prediction key point information based on the output data of the second decoder model.
[0074] Among them, the second decoder model can be a model that decodes the output data of the encoder model into key point information.
[0075] In this embodiment, after the joint code is determined by the encoder model, the joint code is used as input data of the second decoder model, and the second decoder model decodes the joint code and outputs the image prediction key point information. That is, the encoder model is connected to two decoder models, namely, the first decoder model and the second decoder model, wherein the first decoder model is a decoder for determining the deformation between images, and the second decoder model is a decoder for predicting the key points of the image.
[0076] Step 204: Determine the image key point information of the image to be processed according to the image deformation key point information and the image prediction key point information.
[0077] In the above scheme, the output of the encoder model in the key point detection model is used as the input of the first decoder model and the second decoder model respectively. The key point detection model realizes the two functions of image deformation determination and key point prediction, laying the foundation for the subsequent determination of key points from the two dimensions of deformation and prediction.
[0078] Figure 3 A schematic diagram of a training process of a key point detection model provided in an embodiment of the present disclosure, such as Figure 3 As shown in Figure 1, the training process of the key point detection model includes:
[0079] Step 301: input a target sample image and a sample template image into an initial encoder model in a preset initial model, and determine sample deformation information according to output data of a first initial decoder model in the initial model.
[0080] Among them, the sample image can be an image that is determined to have sample key point information. The target sample image can be an image that is currently training the initial model, and the target sample image can be the currently selected sample image. The sample template image can be a template image used in the process of training the initial model through the target sample image, and the sample template image can be a pre-set fixed template image, or a template image determined according to the target sample image, which is not limited in this embodiment. The initial model can be a neural network model that has not completed training, and this embodiment does not limit the type of neural network of the initial model. For example, the initial model can be an end-to-end model with an encoder and a decoder. The first initial decoder model can be a decoder that has not completed training, and the first initial decoder model can be a decoder with a function of determining deformation information.
[0081] In the disclosed embodiment, the initial model includes an initial encoder model, a first initial decoder model, and a second initial decoder model. Optionally, the output data of the initial encoder model is the input data of the first initial decoder model, and the output data of the initial encoder model is the input data of the second initial decoder model. That is, the initial encoder model serves as the encoder corresponding to the first initial decoder model and the second initial decoder model at the same time. Accordingly, the first initial decoder model can be a first decoder model that has not completed training, and the second initial decoder model can be a second decoder model that has not completed training.
[0082] In the process of training the initial model as a key point detection model, the target sample image and the sample template image are input into the initial encoder model of the initial model, the initial encoder model performs neural network encoding processing on the target sample image and the sample template image, outputs the corresponding sample code, and inputs the sample code into the first initial decoder model, and the initial encoder outputs the corresponding sample deformation information.
[0083] In the embodiment of the present disclosure, before inputting the target sample image and the sample template image into the initial encoder model in the preset initial model, the sample template image may be predetermined. There are multiple methods for determining the sample template image, which is not limited in the present embodiment.
[0084] In an optional implementation, the template image used in the model training process and the model application process may be consistent. Specifically, sample template images corresponding to the parts can be pre-set, and the corresponding sample template images can be determined according to the parts included in the target sample image. For the same part, the sample template image used in the model training process can be consistent with the target template image used in the model application process. Optionally, for each part, the key point determination device can determine multiple part sample images corresponding to the part in the sample image, and determine the average image of the multiple part sample images to obtain the part average image. The part sample image with the highest similarity with the part average image in the multiple part sample images is determined as the sample template image. And, the sample template image is used as the target template image in the model application process. Among them, the determination of the average image of multiple images can be determined by the existing average image determination method.
[0085] In another optional implementation, during the model training process, a one-to-one corresponding sample template image can be determined according to the target sample image. The key point determination method also includes: determining the sample similarity between each candidate sample image and the target sample image in a plurality of pre-set candidate sample images; wherein the candidate sample image is an image other than the target sample image in the sample image; and determining the sample template image in the plurality of candidate sample images according to the sample similarity.
[0086] The candidate sample image can be understood as a template image corresponding to the candidate target sample image. Sample similarity can be data representing the similarity between two images during model training. There are many types of sample similarity, and this embodiment does not limit the sample similarity. For example, the sample similarity can be a structural similarity metric, mutual information, similarity based on neural network technology, etc.
[0087] In the embodiment of the present disclosure, the key point determination device determines other sample images in the sample image other than the target sample image as candidate sample images. For each candidate sample image, the key point determination device can determine the sample similarity between the candidate sample image and the target sample image, obtain multiple sample similarities, determine the target sample similarity representing the highest similarity among the multiple sample similarities, and determine the candidate sample image corresponding to the target sample similarity as the sample template image.
[0088] It should be noted that if during the model training process, the sample template image corresponds to the part one by one, then during the model application process, for the same part, the target template image can be the same as the sample template image. If during the model training process, the sample template image is the image most similar to the target sample image among the sample images, then during the model application process, the target template image can be the image most similar to the image to be processed among the sample images.
[0089] For example, in this embodiment, the sample image in the training set composed of sample images that is most similar to the target sample image is determined as the sample template image. Specifically, the sample image I in the training set is calculated. n The sample similarity S with the target sample image n , for the sample similarity set S = {S n |n=1,2,...,N} for sorting, where N is the number of candidate sample images in the training set. Get the most similar image I in the sample similarity set S A , the image I A As the sample template image, the sample key point information of the coordinate type corresponding to the sample template image (also known as the key point gold standard) P A For template tags.
[0090] Furthermore, the sample key point information of the coordinate type is converted into the sample key point information of the heat map type. The conversion method is to establish a Gaussian sphere with the key point information of each coordinate type as the center. The formula of the Gaussian sphere is as follows:
[0091]
[0092] Among them, x p ,y p 、zp are the coordinate values of the x, y, and z directions of the key point information of the coordinate type, x, y, and z are the coordinate values of any point in the key point information of the heat map type, g(x, y, z, δ) is the corresponding probability value at (x, y, z), and δ is the preset Gaussian distribution parameter. After conversion by the above formula, the sample template key point information P of the coordinate type A The key point information H of the sample template converted into a heat map type A , sample image I n The corresponding coordinate type sample key point information is converted into the heat map type sample key point information H n . The sample image I n The target sample image and sample template image I A An initial encoder model is input and image features are extracted using the initial encoder model.
[0093] Step 302, deforming the sample template image according to the sample deformation information to obtain a deformed template image, and deforming the sample template key point information according to the sample deformation information to obtain template deformation key point information; wherein the sample template key point information is key point information predetermined by the sample template image.
[0094] The template deformation key point information may be key point information obtained by deforming the key point information of the determined sample template image during the model training process.
[0095] In this embodiment, after determining the sample deformation information between the target sample image and the sample template image, the sample template image is deformed according to the sample deformation information to obtain the deformed template image. And the sample template key point information is deformed according to the sample deformation information to obtain the template deformation key point information. That is, the deformation between the target sample image and the sample template image is recorded by the sample deformation information, and the sample template image and the sample template key point information are respectively transformed according to the deformation to obtain the corresponding deformed template image and template deformation key point information.
[0096] In an optional implementation manner, the sample key point information is of a coordinate type, and the sample deformation key point information obtained by processing the sample key point information through the sample deformation information is also of a coordinate type.
[0097] Step 303: Determine sample prediction key point information according to output data of the second initial decoder model in the initial model.
[0098] In this embodiment, the key point determination device can input the sample code output by the initial encoder model into the second initial decoder model at the same time as the first initial decoder model. The second initial decoder model performs neural network decoding processing on the sample code to predict the sample prediction key point information of the target sample image.
[0099] For example, the image features output by the initial encoder are input into the first initial decoder model and the second initial decoder model. The sample deformation field W between the sample template image and the target sample image is generated by the first initial decoder model. After the sample deformation field W is obtained, it is used to transform the sample template image I A The key point information H of the sample template of the heat map type A Deform and obtain the deformed sample template image I AW The key point information H of the sample template of the deformed heat map type AW , and determine the sample prediction key point information H of the heat map type through the second initial decoder n-pre .
[0100] Step 304, train the initial model according to the target loss function to obtain a key point detection model; wherein the target loss function is a loss function determined according to one or more of the target sample image, the deformed template image, the sample key point information, the sample predicted key point information, and the template deformation key point information; wherein the sample key point information is the key point information predetermined by the target sample image.
[0101] In this embodiment, after determining the target sample image, deformed template image, sample key point information, sample prediction key point information, and template deformation key point information, the target loss function corresponding to the initial model is determined based on one or more of the above parameters, and the training of the initial model is completed by optimizing the target loss function to obtain the corresponding key point detection model.
[0102] Optionally, the target loss function can be determined based on the target sample image, the deformed template image, the sample key point information, the sample predicted key point information, and the template deformation key point information; or the target loss function can be determined by the sample key point information, the sample predicted key point information, and the template deformation key point information.
[0103] In some embodiments of the present disclosure, the target loss function is a loss function determined based on a first loss function, a second loss function, and a third loss function, wherein the first loss function characterizes the difference between the target sample image and the deformed template image, the second loss function characterizes the difference between the sample key point information and the sample predicted key point information, and the third loss function characterizes the difference between the sample predicted key point information and the template deformation key point information.
[0104] In this embodiment, the key point determination device can calculate the similarity between the target sample image and the deformed template image to obtain a first similarity, and determine the first loss function with the inverse of the first similarity; and calculate the similarity between the sample key point information and the sample predicted key point information to obtain a second similarity, and determine the second loss function with the inverse of the second similarity; and calculate the similarity between the sample predicted key point information and the template deformed key point information to obtain a third similarity, and determine the third loss function with the inverse of the third similarity. Further, the first loss function, the second loss function, and the third loss function are weighted and summed, and the weighted sum result is determined as the target loss function. Optionally, the weight of the second loss function can be greater than the weight of the first loss function and the weight of the third loss function, that is, the difference between the sample key point information and the sample predicted key point information accounts for a greater proportion than other differences.
[0105] Therefore, the first loss function characterizes the difference between the template image and the target image after deformation, and characterizes the accuracy of deformation from the perspective of the image; the second loss function characterizes the difference between the predicted key point information and the actual key point information, and characterizes the accuracy of prediction; the third loss function characterizes the difference between the key point information of the template after deformation and the predicted key point information, and improves the accuracy of key points from the dimension of consistency constraints.
[0106] In the above scheme, based on the target sample image, deformed template image, sample key point information, sample prediction key point information, and template deformation key point information, the target loss function is determined from multiple dimensions, which improves the comprehensiveness of the target loss function and thereby improves the key point determination accuracy of the trained key point detection model.
[0107] Next, taking the knee joint as an example, the key point determination method in the embodiment of the present disclosure is further explained through a specific example. Figure 4 A flowchart of another key point determination method provided by the embodiment of the present disclosure is shown as follows: Figure 4 As shown, the key point determination method includes:
[0108] Step 401, obtain a sample image annotated with a key point heat map gold standard.
[0109] Taking the knee joint as an example, the sample image may be a computer tomography image and / or a magnetic resonance image. The user may annotate the key point gold standard on the computer tomography image or magnetic resonance image of the knee joint, and the key point gold standard may include one or more of the medial epicondyle of the femur, the lateral epicondyle of the femur, the apex of the intercondylar fossa of the femur, the center of the tibial crest, the insertion point of the posterior cruciate ligament of the tibial bone, and the inner 1 / 3 of the tibial tuberosity.
[0110] Step 402: determine a sample template image.
[0111] In this embodiment, the sample image in the training set composed of sample images, which is most similar to the target sample image, is determined as the sample template image. Specifically, the sample image I in the training set is calculated. n The sample similarity S with the target sample image n , for the sample similarity set S = {S n |n=1,2,...,N} for sorting, where N is the number of candidate sample images in the training set. Get the most similar image I in the sample similarity set S A , the image I A As the sample template image, the key point gold standard P corresponding to the sample template image A is a template tag, that is, the template data T is T={I A ,P A}.
[0112] Step 403: train the initial model to obtain a key point detection model.
[0113] like Figure 5 A schematic diagram of the training process of another key point detection model provided in an embodiment of the present disclosure, such as Figure 5 As shown, the deformed template image is the deformed template image, the sample key point information is the gold standard of the target sample image key point heat map, the sample prediction key point information is the predicted key point heat map, and the template deformation key point information is the gold standard of the sample model image key point heat map after deformation.
[0114] like Figure 5 As shown, the initial model consists of a part for realizing the function of determining image deformation and a part for realizing the function of predicting key point information, and the two parts share an encoder. The deformation function is also called the registration function, wherein the registration network realizing the registration function includes an initial encoder model and a first initial decoder model, and the prediction network realizing the function of predicting key point information includes an initial encoder model and a second initial decoder model. The initial model adopts the method of heat map regression. First, the annotated key point gold standard needs to be converted into a key point heat map. The conversion method is to establish a Gaussian sphere with each key point gold standard as the center. The formula of the Gaussian sphere is as follows:
[0115]
[0116] Among them, x p ,y p 、z pare the x-, y-, and z-direction coordinate values of the key point gold standard, x, y, and z are the x-, y-, and z-direction coordinate values of any point in the heat map, g(x, y, z, δ) is the corresponding probability value at (x, y, z), and δ is the preset Gaussian distribution parameter. After conversion by the above formula, the key point gold standard P of the sample template image A Transformed into the gold standard H of the key point heat map of the sample template image A , sample image I n The corresponding key point gold standard is transformed into the sample image key point heat map gold standard H n .
[0117] The training method of the initial model is as follows Figure 5 As shown, the sample image I n The target sample image and sample template image I A Input the initial encoder model, use the initial encoder model to extract image features, and then input the image features into the first initial decoder model and the second initial decoder model, where the first initial decoder model can be understood as a registration decoder, and the second initial decoder model can be understood as a key point heat map prediction decoder. The first initial decoder model is used to learn the sample deformation field W between the sample template image and the target sample image. After obtaining the sample deformation field W, use it to respectively A Compared with the gold standard H of the key point heat map of the sample template image A Deform and obtain the deformed sample template image I AW The gold standard H of the key point heat map of the deformed sample template image AW , , calculate the deformed sample template image I AW With the target sample image I n The similarity S 1 , and the similarity S 1 The opposite of -S 1 As the first loss function L related to registration 1 , by minimizing the first loss function L 1 To train the neural network parameters related to registration.
[0118] The second initial decoder is used to determine the predicted key point heat map H n-pre , calculate the predicted key point heat map H obtained by the second initial decoder n-pre Compared with the gold standard H of the target sample image key point heat map n-gt The similarity S 2 , and the similarity S 2 The opposite of -S 2 As the second loss function L related to prediction 2, by minimizing the second loss function L 2 To optimize the prediction-related neural network parameters. Ideally, the positions of the key points determined based on registration are the same as the positions of the key points determined based on prediction, that is, in an ideal case, the gold standard H of the key point heat map of the deformed sample template image determined based on registration is AW The predicted key point heat map H should be determined based on the prediction n-pre Therefore, this patent adds the network consistency constraint of registration and prediction, that is, calculating the gold standard H of the key point heat map of the deformed sample template image AW And the predicted key point heat map H n-pre The similarity S 3 , and the similarity S 3 The opposite of -S 3 As the third loss function L 3 , the third loss function can be understood as a loss function used to constrain the consistency of the registration result and the prediction result. 1 , the second loss function L 2 , the third loss function L 3 After weighted processing, the final target loss function L of the initial network is obtained. The calculation formula of the target loss function L is as follows:
[0119] L=α 1 L 1 +α 2 L 2 +α 3 L 3
[0120] Among them, α 1 , α 2 , α 3 They are the first loss function L 1 , the second loss function L 2 , the third loss function L 3 The corresponding first weight, second weight, and third weight. The second weight may be greater than the first weight and the third weight.
[0121] In the above scheme, the sample template image and its corresponding sample template image key point heat map gold standard are used as priors, so that the key point prediction of the target sample image has directionality.
[0122] Step 404: determine the target key points of the image to be processed by using a key point detection model.
[0123] Specifically, the image to be processed and the target template image are input into the key point detection model, and the image prediction key point heat map H is obtained by the second decoder model prediction. n-pre'(i.e., image prediction key point information), and the image deformation key point heat map H obtained by the first decoder model deformation AW '(i.e., image deformation key point information), predict the key point heat map H of the image n-pre ' and image deformation key point heat map H AW 'Perform weighted averaging to obtain the image key point heat map H final (i.e., image key point information), the image key point heat map H final The calculation formula is:
[0124] H final =β 1 H AW '+β 2 H n-pre '
[0125] Among them, β 1 , β 2 They are respectively the heat map H of the key points of image deformation AW 'With the image prediction key point heat map H n-pre 'Weighting coefficient, optional, the β 1 , β 2 can be the same as 0.5. Specifically, the image key point heat map H final The heat map of multiple key points can be included, and the coordinates of the maximum value in the heat map corresponding to each key point are calculated to obtain the image key point information of the coordinate type.
[0126] In the above scheme, the corresponding image key point information is determined by deforming the already determined key point information and predicting the key points of the processed graphics. This avoids the image key point information being easily affected by a single method of determining the key points, improves the stability of the image key point information, and improves the accuracy of the key point information.
[0127] Figure 6 A structural schematic diagram of a key point determination device provided by an embodiment of the present disclosure is shown.
[0128] like Figure 6 As shown, the key point determination device 600 may include:
[0129] A first determination module 601 is used to determine image deformation information between the image to be processed and the target template image; wherein the target template image is an image corresponding to template key point information;
[0130] A deformation module 602 is used to perform deformation processing on the template key point information according to the image deformation information to obtain image deformation key point information;
[0131] The prediction module 603 is used to perform key point prediction processing on the image to be processed to obtain image prediction key point information;
[0132] The second determination module 604 is used to determine the image key point information of the image to be processed according to the image deformation key point information and the image prediction key point information.
[0133] In some embodiments of the present disclosure, the first determination module 601 is used to: input the image to be processed and the target template image into a pre-trained key point detection model to obtain the image deformation information;
[0134] Correspondingly, the prediction module 603 is used to: perform key point prediction on the image to be processed based on the key point detection model to obtain the image prediction key point information.
[0135] In some embodiments of the present disclosure, the pre-trained key point detection model includes: a pre-trained encoder model, a first decoder model, and the first determination module 601 is used to:
[0136] Inputting the image to be processed and the target template image into the encoder model to obtain a joint encoding output by the encoder model;
[0137] The joint code is input into the first decoder model, and the image deformation information is determined according to output data of the first decoder model.
[0138] In some embodiments of the present disclosure, the pre-trained key point detection model further includes a pre-trained second decoder model, and the prediction module 603 is used to:
[0139] The joint code is input into the second decoder model, and the image prediction key point information is determined according to the output data of the second decoder model.
[0140] In some embodiments of the present disclosure, the device further includes:
[0141] A third determination module is used to determine the image similarity between each of the candidate template images and the image to be processed among a plurality of preset candidate template images before determining the image deformation information between the image to be processed and the target template image;
[0142] A fourth determination module is used to determine the target template image among the multiple candidate template images according to the image similarity.
[0143] In some embodiments of the present disclosure, the device further includes a training module, wherein the training module is used to:
[0144] Inputting the target sample image and the sample template image into an initial encoder model in a preset initial model, and determining the sample deformation information according to the output data of the first initial decoder model in the initial model;
[0145] The sample template image is deformed according to the sample deformation information to obtain a deformed template image, and the sample template key point information is deformed according to the sample deformation information to obtain template deformation key point information; wherein the sample template key point information is key point information predetermined by the sample template image;
[0146] Determine sample prediction key point information according to output data of a second initial decoder model in the initial model;
[0147] The initial model is trained according to a target loss function to obtain the key point detection model; wherein the target loss function is a loss function determined according to one or more of the target sample image, the deformed template image, the sample key point information, the sample predicted key point information, and the template deformation key point information; wherein the sample key point information is key point information predetermined for the target sample image.
[0148] In some embodiments of the present disclosure, the output data of the initial encoder model is the input data of the first initial decoder model, and the output data of the initial encoder model is the input data of the second initial decoder model.
[0149] In some embodiments of the present disclosure, the target loss function is a loss function determined based on a first loss function, a second loss function, and a third loss function, wherein the first loss function characterizes the difference between the target sample image and the deformed template image, the second loss function characterizes the difference between the sample key point information and the sample predicted key point information, and the third loss function characterizes the difference between the sample predicted key point information and the template deformation key point information.
[0150] In some embodiments of the present disclosure, the device further includes:
[0151] a fifth determination module, configured to determine the sample similarity between each of a plurality of preset candidate sample images and the target sample image before inputting the target sample image and the sample template image into the initial encoder model in the preset initial model; wherein the candidate sample image is an image other than the target sample image in the sample image;
[0152] A sixth determination module is used to determine a sample template image among the multiple candidate sample images according to the sample similarity.
[0153] It should be noted that Figure 6 The key point determination device 600 shown can execute each step in the above key point determination method embodiment, and realize each process and effect in the above key point determination method embodiment, which will not be described in detail here.
[0154] Figure 7 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown.
[0155] like Figure 7 As shown, the electronic device may include a processor 701 and a memory 702 storing computer program instructions.
[0156] Specifically, the processor 701 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0157] The memory 702 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 702 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 702 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 702 may be inside or outside the integrated gateway device. In a specific embodiment, the memory 702 is a non-volatile solid-state memory. In a specific embodiment, the memory 702 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.
[0158] The processor 701 reads and executes the computer program instructions stored in the memory 702 to perform the steps of the key point determination method provided in the embodiment of the present disclosure.
[0159] In one example, the electronic device may further include a transceiver 703 and a bus 704. Figure 7 As shown, the processor 701, the memory 702 and the transceiver 703 are connected via a bus 704 and communicate with each other.
[0160] The bus 704 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 704 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0161] The following is an embodiment of a computer-readable storage medium provided in an embodiment of the present disclosure. The computer-readable storage medium and the key point determination method of the above-mentioned embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the computer-readable storage medium, reference can be made to the embodiment of the above-mentioned key point determination method.
[0162] This embodiment provides a storage medium containing computer executable instructions, and the computer executable instructions are used to perform a key point determination method when executed by a computer processor.
[0163] Of course, the storage medium containing computer executable instructions provided by the embodiment of the present disclosure is not limited to the above method operations, and the computer executable instructions can also execute related operations in the key point determination method provided by any embodiment of the present disclosure.
[0164] Through the above description of the implementation methods, the technical personnel in the relevant field can clearly understand that the present disclosure can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present disclosure can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer cloud platform (which can be a personal computer, a server, or a network cloud platform, etc.) to execute the key point determination method provided by each embodiment of the present disclosure.
[0165] Note that the above are only preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art will understand that the present disclosure is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present disclosure. Therefore, although the present disclosure is described in more detail through the above embodiments, the present disclosure is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present disclosure, and the scope of the present disclosure is determined by the scope of the appended claims.
Claims
1. A key point determination method, characterized in that: include: Determine image deformation information between the image to be processed and the target template image; wherein the target template image is an image corresponding to template key point information; Performing deformation processing on the template key point information according to the image deformation information to obtain the image deformation key point information; Performing key point prediction processing on the image to be processed to obtain image prediction key point information; Performing weighted sum processing on the image deformation key point information and the image prediction key point information to determine the image key point information of the image to be processed; Wherein, the determining of the image deformation information between the image to be processed and the target template image comprises: inputting the image to be processed and the target template image into a pre-trained key point detection model to obtain the image deformation information; The performing key point prediction processing on the image to be processed to obtain image prediction key point information includes: performing key point prediction on the image to be processed based on the key point detection model to obtain the image prediction key point information; The training process of the key point detection model includes: Inputting the target sample image and the sample template image into an initial encoder model in a preset initial model, and determining the sample deformation information according to the output data of the first initial decoder model in the initial model; The sample template image is deformed according to the sample deformation information to obtain a deformed template image, and the sample template key point information is deformed according to the sample deformation information to obtain template deformation key point information; wherein the sample template key point information is key point information predetermined by the sample template image; Determine sample prediction key point information according to output data of a second initial decoder model in the initial model; The initial model is trained according to a target loss function to obtain the key point detection model; wherein the target loss function is a loss function determined based on a first loss function, a second loss function, and a third loss function, wherein the first loss function characterizes the difference between the target sample image and the deformed template image, the second loss function characterizes the difference between the sample key point information and the sample predicted key point information, the third loss function characterizes the difference between the sample predicted key point information and the template deformation key point information, and the sample key point information is the key point information predetermined by the target sample image.
2. The method according to claim 1, characterized in that The pre-trained key point detection model includes: a pre-trained encoder model and a first decoder model, and the inputting the image to be processed and the target template image into the pre-trained key point detection model to obtain the image deformation information includes: Inputting the image to be processed and the target template image into the encoder model to obtain a joint encoding output by the encoder model; The joint code is input into the first decoder model, and the image deformation information is determined according to output data of the first decoder model.
3. The method according to claim 2, characterized in that The pre-trained key point detection model also includes a pre-trained second decoder model, and performing key point prediction on the image to be processed based on the key point detection model to obtain the image prediction key point information includes: The joint code is input into the second decoder model, and the image prediction key point information is determined according to the output data of the second decoder model.
4. The method according to claim 1, characterized in that: Before determining the image deformation information between the image to be processed and the target template image, the method further includes: Determine the image similarity between each of the candidate template images and the image to be processed among a plurality of preset candidate template images; The target template image among the multiple candidate template images is determined according to the image similarity.
5. The method according to claim 1, characterized in that The output data of the initial encoder model is the input data of the first initial decoder model, and the output data of the initial encoder model is the input data of the second initial decoder model.
6. The method according to claim 1, characterized in that Before inputting the target sample image and the sample template image into the initial encoder model in the preset initial model, the method further includes: Determine the sample similarity between each of the preset multiple candidate sample images and the target sample image; wherein the candidate sample image is other images in the sample image other than the target sample image; A sample template image among the multiple candidate sample images is determined according to the sample similarity.
7. A key point determination device, characterized in that: include: A first determination module is used to determine image deformation information between the image to be processed and the target template image; wherein the target template image is an image corresponding to template key point information; A deformation module, used for performing deformation processing on the template key point information according to the image deformation information to obtain the image deformation key point information; A prediction module, used for performing key point prediction processing on the image to be processed to obtain image prediction key point information; A second determination module is used to perform weighted sum processing on the image deformation key point information and the image prediction key point information to determine the image key point information of the image to be processed; A training module, used for inputting a target sample image and a sample template image into an initial encoder model in a preset initial model, determining sample deformation information according to output data of a first initial decoder model in the initial model; deforming the sample template image according to the sample deformation information to obtain a deformed template image, and deforming the sample template key point information according to the sample deformation information to obtain template deformation key point information; wherein the sample template key point information is key point information predetermined by the sample template image; determining sample prediction key point information according to output data of a second initial decoder model in the initial model; training the initial model according to a target loss function to obtain a key point detection model; wherein the target loss function is a loss function determined based on a first loss function, a second loss function, and a third loss function, wherein the first loss function represents the difference between the target sample image and the deformed template image, the second loss function represents the difference between the sample key point information and the sample prediction key point information, and the third loss function represents the difference between the sample prediction key point information and the template deformation key point information; wherein the sample key point information is key point information predetermined by the target sample image; The first determination module is used to: input the image to be processed and the target template image into a pre-trained key point detection model to obtain the image deformation information; The prediction module is used to: perform key point prediction on the image to be processed based on the key point detection model to obtain the image prediction key point information.
8. An electronic device, characterized in that: include: processor; A memory for storing executable instructions; The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the method described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the method according to any one of claims 1 to 6.
