Real-time cornea positioning method and system for cataract surgery
By constructing a corneal inference model and preprocessing the corneal data of cataract surgery, the problem of multiple parameters and low detection accuracy of elliptical targets in traditional technology is solved, and more efficient and accurate corneal positioning is achieved.
Patent Information
- Application Number
- CN202411644172.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-02-25
AI Technical Summary
In existing cataract surgery, traditional target detection technology has problems such as excessive parameters and low accuracy in detection of elliptical targets, resulting in insufficient positioning efficiency and accuracy.
By obtaining the data set of corneals for cataract surgery for preprocessing, a corneal inference model is constructed, an eye tissue image on the patient's end is extracted, and it is sent to the corneal inference model to obtain the inference mask map, and finally the mask map is sent to the management end for storage.
Faster and more accurate corneal positioning of cataract surgery is achieved, reducing the operating burden of doctors.
Smart Images

Figure CN119498986A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and more specifically, to a real-time corneal positioning method and system for cataract surgery. Background Art
[0002] At present, cataract surgery has become one of the most common surgeries in the world. Real-time early warning during surgery is the key to the success of the operation. The existing use of deep learning to assist in intraoperative diagnosis and postoperative screening of cataract surgery has always been an important means to improve the success rate of cataract surgery. Most of the research is based on traditional target detection technology, which detects surgical instruments and some eye tissues in the existing cataract surgery data set images. The advantage of these methods is that they can quickly locate the target during surgery; however, these traditional methods also have the following shortcomings: too many parameters are required, and the detection accuracy of elliptical targets is not high.
[0003] Therefore, the prior art has defects and needs to be improved urgently. Summary of the invention
[0004] In view of the above problems, the purpose of the present invention is to provide a real-time positioning method and system for the cornea during cataract surgery, which can position the cornea during cataract surgery more quickly and accurately, thereby reducing the burden on doctors.
[0005] A first aspect of the present invention provides a real-time corneal positioning method for cataract surgery, comprising:
[0006] Acquire a dataset of cataract surgery corneas;
[0007] Preprocessing the cornea data set of cataract surgery to obtain a standard data set in a preset format;
[0008] Construct a corneal inference model based on a standard data set in a preset format;
[0009] Extracting images of ocular tissue during cataract surgery at the patient end;
[0010] Send the eye tissue image during cataract surgery on the patient side to the cornea inference model to obtain the inference mask image;
[0011] The inferred mask image is sent to the preset management end for storage.
[0012] In this solution, the step of preprocessing the data set of the cataract surgery cornea includes:
[0013] Extract the json file of data from the cataract surgery cornea dataset;
[0014] Extract the annotation points of the cornea class in the json file of the data;
[0015] Based on the annotation points of the cornea class in the json file of the data, draw the mask map of the cornea in the corresponding data, and obtain the center point of the ellipse and the true major and minor axis information.
[0016] In this solution, the step of constructing the corneal inference model specifically includes:
[0017] Divide a standard data set in a preset format into a training sample data subset and a test data subset;
[0018] The standard data in the training sample data subset is sent to the preset initialization model in sequence for training, and the total loss value of the initialization model is obtained;
[0019] If the total loss value of the initialization model is less than or equal to the preset loss threshold, the standard data in the test data subset is sent to the preset initialization model in sequence for verification to determine the pass rate;
[0020] If the pass rate is greater than the preset pass rate threshold, the training of the corresponding initialization model is stopped, and the corresponding initialization model is set as the cornea inference model.
[0021] In this solution, the step of obtaining the total loss value of the initialized model specifically includes:
[0022] Extract the mask image of the cornea in the standard data in the training sample data subset, and set it as the input image Im;
[0023] Input the input image Im to the initialization model to get the heat map Set as the predicted image, based on the preset two-dimensional Gaussian function, the input image is mapped to the real heat map O xyc ;
[0024] The real heat map O xyc and predicted image Perform comparative analysis to obtain the center point loss function value L k ;
[0025] Extract the true major and minor axis information from the input image label;
[0026] Based on the preset L1 loss value L off The offset Get the predicted center point and major and minor axes;
[0027] According to the real major and minor axis information in the input image label and the predicted center point and major and minor axis, the loss function value L of the major and minor axis is obtained. axes ;
[0028] Set the total loss value of the initialized model to L det , the formula is:
[0029] L det =L k +λ axes *L axes +λ off *L off
[0030] where λ axes Represents the weight coefficient of the major and minor axis loss function, λ off Represents the L1 loss weight coefficient, L off Represents the loss value of L1.
[0031] In this solution, the real heat map O xyc and predicted image The steps for comparative analysis and obtaining the center point loss function value include:
[0032] Set the center point loss function value to L k , the formula is:
[0033]
[0034] Where μ and β are the hyperparameters of focal loss, and M is the number of key points;
[0035] The real heat map O xyc The formula for obtaining is:
[0036]
[0037] Where x and y are the center point coordinates of the ground truth. is the center point coordinate of the downsampled ground truth, σ p is the kernel standard deviation, Im∈R W×H×3 , where the height is H, the width is W, R is the predicted downsampling factor, and C is the number of candidate classes.
[0038] In this scheme, the loss function value L of the major and minor axes is obtained. axes The steps include:
[0039] According to the real major and minor axis information in the input image label and the predicted center point and major and minor axis, the boundary ellipse of the corneal outer contour in the input image is constructed, and its formula is: in Respectively represent the long and short axis prediction values of each pixel in the predicted image, Expressed as L1 loss L off The offset of
[0040] Set the major and minor axis loss function value to L axes , the formula is:
[0041]
[0042] Among them, a represents the true value of the long axis, b represents the true value of the short axis, P represents the center point of the outer contour of the input image, a k 、b k They represent the true values of the major and minor axes of the compared pixel k in the input image label, and N represents the total number of compared pixels.
[0043] In this solution, the step of extracting the real major and minor axis information in the input image label specifically includes:
[0044] Extract the rectangular label of any cataract surgery eye tissue image in the cataract surgery cornea dataset;
[0045] Set the coordinates of the diagonal points in the rectangular label to (x1, y1) and (x2, y2) respectively;
[0046] The center point of the outer contour of the input image is set to P, and the formula is:
[0047]
[0048] Set the true value of the major axis to a, and the formula is:
[0049] Set the actual value of the minor axis to b, and the formula is:
[0050] A second aspect of the present invention provides a real-time positioning system for cornea during cataract surgery, comprising a memory and a processor, wherein the memory stores a real-time positioning method program for cornea during cataract surgery, and when the real-time positioning method program for cornea during cataract surgery is executed by the processor, the following steps are implemented:
[0051] Acquire a dataset of cataract surgery corneas;
[0052] Preprocessing the cornea data set of cataract surgery to obtain a standard data set in a preset format;
[0053] Construct a corneal inference model based on a standard data set in a preset format;
[0054] Extracting images of ocular tissue during cataract surgery at the patient end;
[0055] Send the eye tissue image during cataract surgery on the patient side to the cornea inference model to obtain the inference mask image;
[0056] The inferred mask image is sent to the preset management end for storage.
[0057] In this solution, the step of preprocessing the data set of the cataract surgery cornea includes:
[0058] Extract the json file of data from the cataract surgery cornea dataset;
[0059] Extract the annotation points of the cornea class in the json file of the data;
[0060] Based on the annotation points of the cornea class in the json file of the data, draw the mask map of the cornea in the corresponding data, and obtain the center point of the ellipse and the true major and minor axis information.
[0061] In this solution, the step of constructing the corneal inference model specifically includes:
[0062] Divide a standard data set in a preset format into a training sample data subset and a test data subset;
[0063] The standard data in the training sample data subset is sent to the preset initialization model in sequence for training, and the total loss value of the initialization model is obtained;
[0064] If the total loss value of the initialization model is less than or equal to the preset loss threshold, the standard data in the test data subset is sent to the preset initialization model in sequence for verification to determine the pass rate;
[0065] If the pass rate is greater than the preset pass rate threshold, the training of the corresponding initialization model is stopped, and the corresponding initialization model is set as the cornea inference model.
[0066] The present invention discloses a real-time corneal positioning method and system for cataract surgery, which can position the cornea for cataract surgery more quickly and accurately, thus reducing the burden on doctors. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 A flow chart showing a method for real-time corneal positioning in cataract surgery according to the present invention is shown;
[0068] Figure 2 A block diagram of a real-time corneal positioning system for cataract surgery according to the present invention is shown. DETAILED DESCRIPTION
[0069] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0070] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0071] Figure 1 A flow chart of a method for real-time corneal positioning during cataract surgery according to the present invention is shown.
[0072] like Figure 1 As shown, the present invention discloses a real-time corneal positioning method for cataract surgery, comprising:
[0073] S101, obtain the cornea dataset for cataract surgery;
[0074] S102, preprocessing the data set of the cornea after cataract surgery to obtain a standard data set in a preset format;
[0075] S103, constructing a corneal reasoning model based on a standard data set in a preset format;
[0076] S104, extracting an eye tissue image during cataract surgery on the patient side;
[0077] S105, sending the eye tissue image during cataract surgery on the patient side to the cornea reasoning model to obtain a reasoned mask image;
[0078] S106, sending the inferred mask image to a preset management terminal for storage.
[0079] According to an embodiment of the present invention, the present invention collects cataract surgery data in a hospital to construct a data set of corneas for cataract surgery, and then preprocesses the data set to make it meet the format required by the network used, such as the coco format; then the data in the standard data set is input into the model for training, the information of the ellipse in the image label is learned, and the model is continuously optimized in the post-processing stage to finally achieve the most ideal detection accuracy and obtain a corneal inference model; then the corneal inference model is used to infer the eye tissue image in the patient's cataract surgery to obtain an inferred mask image, wherein the preset corneal mask image is a mask image of a normal eye tissue image.
[0080] According to an embodiment of the present invention, the step of preprocessing the data set of the cataract surgery cornea includes:
[0081] Extract the json file of data from the cataract surgery cornea dataset;
[0082] Extract the annotation points of the cornea class in the json file of the data;
[0083] Based on the annotation points of the cornea class in the json file of the data, draw the mask map of the cornea in the corresponding data, and obtain the center point of the ellipse and the true major and minor axis information.
[0084] It should be noted that the preset code is used to extract the annotation points in the "Cornea" class from the json file of the data in the dataset, and a mask map of the corresponding data is drawn. The mask map clearly shows the corneal area and provides accurate annotation information for model training. In addition, the outer contour of the polygon is extracted through the OpenCT library, and further, the midpoint coordinates and major and minor axis information of the inscribed ellipse are obtained through the circumscribed rectangle method, thereby generating a standard dataset that conforms to the preset format.
[0085] According to an embodiment of the present invention, the step of constructing a corneal reasoning model specifically includes:
[0086] Divide a standard data set in a preset format into a training sample data subset and a test data subset;
[0087] The standard data in the training sample data subset is sent to the preset initialization model in sequence for training, and the total loss value of the initialization model is obtained;
[0088] If the total loss value of the initialization model is less than or equal to the preset loss threshold, the standard data in the test data subset is sent to the preset initialization model in sequence for verification to determine the pass rate;
[0089] If the pass rate is greater than the preset pass rate threshold, the training of the corresponding initialization model is stopped, and the corresponding initialization model is set as the cornea inference model.
[0090] It should be noted that when the total loss value of the initialized model is greater than the preset loss threshold, the parameters of the corresponding initialized model are continuously optimized through back propagation and gradient descent, so that the total loss value is continuously reduced until the total loss value of the corresponding initialized model is less than or equal to the preset loss threshold, and the cataract eye tissue image of the standard data in the test data subset is extracted, and the cataract eye tissue image of the standard data in the test data subset is sent to the initialized model after training to obtain the inferred label map, and then the inferred mask map is generated using the preset code, and then the corresponding inferred mask image is compared with the real corneal mask map of the standard data in the test data subset to obtain the Dice coefficient. When the Dice coefficient is greater than the preset first threshold, the corresponding test data is recorded as qualified, and all the standard data in the entire test data subset are traversed to obtain the number of qualified standard data, and the number of qualified standard data is divided by the total number of all standard data in the test data subset to obtain the corresponding pass rate.
[0091] It should be noted that the step of obtaining the Dice coefficient specifically includes: setting the inferred mask image as A, extracting the number of elements in A, and setting it as |A|; setting the preset corneal mask image as B, extracting the number of elements in B, and setting it as |B|; setting the Dice coefficient as D, and its formula is where |A∩B| represents the intersection between A and B.
[0092] It should be noted that the present invention tests and determines the performance of the model by the Dice coefficient. The Dice coefficient is defined as the similarity between the true value and the inferred predicted value, and the value range is between 0 and 1, wherein the inferred mask image is the predicted corneal mask image, that is, the inferred mask image, and the preset corneal mask image is the real corneal mask image. The coefficient 2 is the reason for the repeated calculation of the common elements between the two regions in the denominator. The present invention uses a pixel matrix to calculate |A∩B|, randomly takes a pixel matrix of the predicted mask image, multiplies the predicted mask by the real mask matrix, and finally uses the final value obtained by pixel-by-pixel addition.
[0093] According to an embodiment of the present invention, the step of obtaining the total loss value of the initialized model specifically includes:
[0094] Extract the mask image of the cornea in the standard data in the training sample data subset, and set it as the input image Im;
[0095] Input the input image Im to the initialization model to get the heat map Set as the predicted image, based on the preset two-dimensional Gaussian function, the input image is mapped to the real heat map O xyc ;
[0096] The real heat map O xyc and predicted image Perform comparative analysis to obtain the center point loss function value L k ;
[0097] Extract the true major and minor axis information from the input image label;
[0098] Based on the preset L1 loss value L off The offset Get the predicted center point and major and minor axes;
[0099] According to the real major and minor axis information in the input image label and the predicted center point and major and minor axis, the loss function value L of the major and minor axis is obtained. axes ;
[0100] Set the total loss value of the initialized model to L det , the formula is:
[0101] L det =Lk +λ axes *L axes +λ off *L off
[0102] where λ axes Represents the weight coefficient of the major and minor axis loss function, λ off Represents the L1 loss weight coefficient, L off Represents the loss value of L1.
[0103] According to an embodiment of the present invention, the real heat map O xyc and predicted image The steps for comparative analysis and obtaining the center point loss function value include:
[0104] Set the center point loss function value to L k , the formula is:
[0105]
[0106] Where μ and β are the hyperparameters of focal loss, and M is the number of key points;
[0107] The real heat map O xyc The formula for obtaining is:
[0108]
[0109] Where x and y are the center point coordinates of the ground truth. is the center point coordinate of the downsampled ground truth, σ p is the kernel standard deviation, Im∈R W×H×3 , where the height is H, the width is W, R is the predicted downsampling factor, and C is the number of candidate classes.
[0110] According to an embodiment of the present invention, the loss function value L of the major and minor axes is obtained. axes The steps include:
[0111] According to the real major and minor axis information in the input image label and the predicted center point and major and minor axis, the boundary ellipse of the corneal outer contour in the input image is constructed, and its formula is: in Respectively represent the long and short axis prediction values of each pixel in the predicted image, Expressed as L1 loss L off The offset of
[0112] Set the major and minor axis loss function value to L axes , the formula is:
[0113]
[0114] Among them, a represents the true value of the long axis, b represents the true value of the short axis, P represents the center point of the outer contour of the input image, a k 、b k They represent the true values of the major and minor axes of the compared pixel k in the input image label, and N represents the total number of compared pixels.
[0115] It should be noted that the ellipse bounding box is used to detect the cornea, determine the position of the ellipse, and calculate the ellipse loss, so as to determine the optimized major and minor axis loss function values.
[0116] According to an embodiment of the present invention, the step of extracting the real major and minor axis information in the input image label specifically includes:
[0117] Extract the rectangular label of any cataract surgery eye tissue image in the cataract surgery cornea dataset;
[0118] Set the coordinates of the diagonal points in the rectangular label to (x1, y1) and (x2, y2) respectively;
[0119] The center point of the outer contour of the input image is set to P, and the formula is:
[0120]
[0121] Set the true value of the major axis to a, and the formula is:
[0122] Set the actual value of the minor axis to b, and the formula is:
[0123] It should be noted that the data collected for cataract surgery cornea is a rectangular image of the cornea for cataract surgery. Then the surgical site in the rectangular image is marked to obtain a rectangular label. The intersection of the two diagonals of the rectangular label is taken as the center point of the elliptical label, half of the length of the rectangle is taken as the major axis length of the ellipse, and half of the width of the rectangle is taken as the minor axis length of the ellipse. The rectangular label is converted into an elliptical label, which improves the accuracy of cataract surgery.
[0124] According to an embodiment of the present invention, it also includes:
[0125] When the standard data in the test data subset are sequentially sent to the preset initialization model for verification, a cataract eye tissue image of the standard data in the test data subset is extracted;
[0126] When the cataract eye tissue image of the standard data in the test data subset is sent to the cornea reasoning model, the current time is recorded and set as the input time;
[0127] After the cataract eye tissue image of the standard data in the test data subset is sent to the cornea inference model, the inference mask image is obtained, and the current time is recorded and set as the output time;
[0128] Subtract the corresponding input time from the output time to get the inference time of the current inference mask image;
[0129] Traverse the entire test data subset to obtain the inference time set;
[0130] Calculate the average value of the inference time in the inference time set to obtain the average inference time;
[0131] If the average reasoning time is less than or equal to the preset time threshold, the corresponding corneal reasoning model is qualified.
[0132] It should be noted that by setting a timestamp at the start and end of reasoning, the input time and the output time are determined, thereby obtaining the reasoning time.
[0133] Figure 2 A block diagram of a real-time corneal positioning system for cataract surgery according to the present invention is shown.
[0134] like Figure 2 As shown, the second aspect of the present invention provides a cataract surgery cornea real-time positioning system 2, comprising a memory 21 and a processor 22, wherein the memory stores a cataract surgery cornea real-time positioning method program, and when the cataract surgery cornea real-time positioning method program is executed by the processor, the following steps are implemented:
[0135] Acquire a dataset of cataract surgery corneas;
[0136] Preprocessing the cornea data set of cataract surgery to obtain a standard data set in a preset format;
[0137] Construct a corneal inference model based on a standard data set in a preset format;
[0138] Extracting images of ocular tissue during cataract surgery at the patient end;
[0139] Send the eye tissue image during cataract surgery on the patient side to the cornea inference model to obtain the inference mask image;
[0140] The inferred mask image is sent to the preset management end for storage.
[0141] According to an embodiment of the present invention, the step of preprocessing the data set of the cataract surgery cornea includes:
[0142] Extract the json file of data from the cataract surgery cornea dataset;
[0143] Extract the annotation points of the cornea class in the json file of the data;
[0144] Based on the annotation points of the cornea class in the json file of the data, draw the mask map of the cornea in the corresponding data, and obtain the center point of the ellipse and the true major and minor axis information.
[0145] According to an embodiment of the present invention, the step of constructing a corneal reasoning model specifically includes:
[0146] Divide a standard data set in a preset format into a training sample data subset and a test data subset;
[0147] The standard data in the training sample data subset is sent to the preset initialization model in sequence for training, and the total loss value of the initialization model is obtained;
[0148] If the total loss value of the initialization model is less than or equal to the preset loss threshold, the standard data in the test data subset is sent to the preset initialization model in sequence for verification to determine the pass rate;
[0149] If the pass rate is greater than the preset pass rate threshold, the training of the corresponding initialization model is stopped, and the corresponding initialization model is set as the cornea inference model.
[0150] The present invention discloses a real-time corneal positioning method and system for cataract surgery, which can position the cornea for cataract surgery more quickly and accurately, thus reducing the burden on doctors.
[0151] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0152] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0153] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0154] Those skilled in the art can understand that: all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, and other media that can store program codes.
[0155] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.
Claims
1. A real-time corneal positioning method for cataract surgery, characterized in that: include: Acquire a dataset of cataract surgery corneas; Preprocessing the cornea data set of cataract surgery to obtain a standard data set in a preset format; Construct a corneal inference model based on a standard data set in a preset format; Extracting images of ocular tissue during cataract surgery at the patient end; Send the eye tissue image during cataract surgery on the patient side to the cornea inference model to obtain the inference mask image; The inferred mask image is sent to the preset management end for storage.
2. A method for real-time corneal positioning in cataract surgery according to claim 1, characterized in that: The step of preprocessing the data set of the cataract surgery cornea comprises: Extract the json file of data from the cataract surgery cornea dataset; Extract the annotation points of the cornea class in the json file of the data; Based on the annotated points of the cornea class in the json file of the data, draw the mask map of the cornea in the corresponding data, and obtain the center point of the ellipse and the true major and minor axis information.
3. A method for real-time corneal positioning in cataract surgery according to claim 1, characterized in that: The step of constructing the corneal reasoning model specifically includes: Divide a standard data set in a preset format into a training sample data subset and a test data subset; The standard data in the training sample data subset is sent to the preset initialization model in sequence for training, and the total loss value of the initialization model is obtained; If the total loss value of the initialization model is less than or equal to the preset loss threshold, the standard data in the test data subset is sent to the preset initialization model in sequence for verification to determine the pass rate; If the pass rate is greater than the preset pass rate threshold, the training of the corresponding initialization model is stopped, and the corresponding initialization model is set as the cornea inference model.
4. A method for real-time corneal positioning in cataract surgery according to claim 3, characterized in that: The step of obtaining the total loss value of the initialized model specifically includes: Extract the mask image of the cornea in the standard data in the training sample data subset, and set it as the input image Im; Input the input image Im to the initialization model to get the heat map Set as the predicted image, based on the preset two-dimensional Gaussian function, the input image is mapped to the real heat map O xyc ; The real heat map O xyc and predicted image Perform comparative analysis to obtain the center point loss function value L k ; Extract the true major and minor axis information from the input image label; Based on the preset L1 loss value L off The offset Get the predicted center point and major and minor axes; According to the real major and minor axis information in the input image label and the predicted center point and major and minor axis, the loss function value L of the major and minor axis is obtained. axes ; Set the total loss value of the initialized model to L det , the formula is: L det =L k +λ axes *L axes +λ off *L off where λ axes Represents the weight coefficient of the major and minor axis loss function, λ off Represents the L1 loss weight coefficient, L off Represents the loss value of L1.
5. A method for real-time corneal positioning in cataract surgery according to claim 4, characterized in that: The real heat map O xyc and predicted image The steps for comparative analysis and obtaining the center point loss function value include: Set the center point loss function value to L k , the formula is: Where μ and β are the hyperparameters of focal loss, and M is the number of key points; The real heat map O xyc The formula for obtaining is: Where x and y are the coordinates of the center point of the ground truth. is the center point coordinate of the downsampled ground truth, σ p is the kernel standard deviation, Im∈R W×H×3 , where the height is H, the width is W, R is the predicted downsampling factor, and C is the number of candidate classes.
6. A method for real-time corneal positioning in cataract surgery according to claim 4, characterized in that: The loss function value L of the major and minor axes is obtained axes The steps include: According to the real major and minor axis information in the input image label and the predicted center point and major and minor axis, the boundary ellipse of the corneal outer contour in the input image is constructed, and its formula is: in Respectively represent the long and short axis prediction values of each pixel in the predicted image, Expressed as L1 loss L off The offset of Set the major and minor axis loss function value to L axes , the formula is: Among them, a represents the true value of the long axis, b represents the true value of the short axis, P represents the center point of the outer contour of the input image, a k , b k They represent the true values of the major and minor axes of the compared pixel k in the input image label, and N represents the total number of compared pixels.
7. A method for real-time corneal positioning in cataract surgery according to claim 4, characterized in that: The step of extracting the real major and minor axis information in the input image label specifically includes: Extract the rectangular label of any cataract surgery eye tissue image in the cataract surgery cornea dataset; Set the coordinates of the diagonal points in the rectangular label to (x1, y1) and (x2, y2) respectively; The center point of the outer contour of the input image is set to P, and the formula is: Set the true value of the major axis to a, and the formula is: Set the actual value of the minor axis to b, and the formula is:
8. A real-time corneal positioning system for cataract surgery, characterized in that: The invention comprises a memory and a processor, wherein the memory stores a real-time corneal positioning method program for cataract surgery, and the real-time corneal positioning method program for cataract surgery is executed by the processor to implement the following steps: Acquire a dataset of cataract surgery corneas; Preprocessing the cornea data set of cataract surgery to obtain a standard data set in a preset format; Construct a corneal inference model based on a standard data set in a preset format; Extracting images of ocular tissue during cataract surgery at the patient end; Send the eye tissue image during cataract surgery on the patient side to the cornea inference model to obtain the inference mask image; The inferred mask image is sent to the preset management end for storage.
9. A real-time corneal positioning system for cataract surgery according to claim 8, characterized in that: The step of preprocessing the data set of the cataract surgery cornea comprises: Extract the json file of data from the cataract surgery cornea dataset; Extract the annotation points of the cornea class in the json file of the data; Based on the annotated points of the cornea class in the json file of the data, draw the mask map of the cornea in the corresponding data, and obtain the center point of the ellipse and the true major and minor axis information.
10. A real-time corneal positioning system for cataract surgery according to claim 8, characterized in that: The step of constructing the corneal reasoning model specifically includes: Divide a standard data set in a preset format into a training sample data subset and a test data subset; The standard data in the training sample data subset is sent to the preset initialization model in sequence for training, and the total loss value of the initialization model is obtained; If the total loss value of the initialization model is less than or equal to the preset loss threshold, the standard data in the test data subset is sent to the preset initialization model in sequence for verification to determine the pass rate; If the pass rate is greater than the preset pass rate threshold, the training of the corresponding initialization model is stopped, and the corresponding initialization model is set as the cornea inference model.