Detection and positioning method of robotic subretinal injection needle based on deep learning
Through a method based on deep learning, the microscope and neural network are used to detect subretinal injection needles, which solves the problem of the lack of automatic detection and positioning functions of injection needles in the existing technology, and improves the detection accuracy and surgical safety of injection needles.
Patent Information
- Application Number
- CN202311564830.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-22
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2043-11-22
AI Technical Summary
The existing intraoperative MI-OCT device lacks the automatic detection and positioning function of the subretinal injection needle, resulting in prolonged operation time and distraction of the surgeon, and it is difficult to detect the deformation of the injection needle.
Using a robotic subretinal injection needle detection and positioning method based on deep learning, the OCT B-scan image is collected through a microscope integrated optical coherence tomograph, and combined with the ROI cropping algorithm and a multi-task neural network model to realize the detection and positioning of the injection needle. It is considered that the deformation of the needle does not depend on the geometric features.
It improves the detection and positioning accuracy of subretinal injection needles, enhances the safety and efficiency of surgical operations, and reduces human errors.
Smart Images

Figure CN117671237B
Abstract
Description
Technical Field
[0001] The present invention relates to a method for detecting and positioning an injection needle in the field of ophthalmic micro-nano manipulation technology, and in particular to a method for detecting and positioning a robot subretinal injection needle based on deep learning. Background Art
[0002] It is well known that subretinal injection is a complex task for ophthalmologists. The main difficulties are the complex structure of the retina, insufficient visual feedback, and high surgical precision requirements. Image-guided robotic-assisted surgery is one of the effective solutions that can significantly improve surgical outcomes and reduce the physical limitations of human surgeons. Although intraoperative microscope-integrated optical coherence tomography (MI-OCT) devices have shown several advantages in ophthalmic applications of human and robotic surgery, all current intraoperative MI-OCT devices are manually adjusted and do not have automatic detection and positioning of the injection needle, which prolongs the operation time and distracts the surgeon's attention. Summary of the invention
[0003] In order to solve the problems and needs in the background technology, the present invention proposes a detection and positioning method for a robot subretinal injection needle based on deep learning. The present invention not only takes into account the deformation of the needle, but also does not require any geometric features. The present invention helps to improve the detection and positioning accuracy of the subretinal injection needle.
[0004] The technical solution of the present invention is as follows:
[0005] S1: A microscope-integrated optical coherence tomography (OCT) B-scan image sequence of the eyeball and the injection needle is used to collect the B-scan image data set, which is composed of multiple eyeball-injection needle OCT B-scan image sequences;
[0006] S2: inputting the B-scan image data set into the ROI cropping algorithm to obtain the cropped ROI-injection needle data set;
[0007] S3: The cropped ROI-injection needle dataset is input into the neural network for training to obtain a subretinal injection needle tip detection and positioning model;
[0008] S4: Detect and locate the subretinal injection needle using the subretinal injection needle tip injection needle detection and positioning model.
[0009] In S1, the focal length of the microscope integrated optical coherence tomography imager is changed, and the imager is used to collect an eyeball-injection needle OCT B-scan image, and the collected B-scan image includes an image without an injection needle, an image of the injection needle above the retina, or an image of the injection needle below the retina.
[0010] The S2 is specifically:
[0011] Combined with the injection needle model, the injection needle detection method based on ellipse fitting is used to detect, identify and crop the B-scan image dataset for the injection needle. If there is no injection needle in the eyeball-injection needle OCT B-scan image, the eyeball-injection needle OCT B-scan image is not cropped. Otherwise, the B-scan image dataset is subjected to injection needle recognition to obtain the injection needle image. The cropped ROI-injection needle dataset is composed of the uncropped eyeball-injection needle OCT B-scan image and the injection needle image, as well as the eyeball-injection needle OCT B-scan image corresponding to the injection needle image.
[0012] In S2, in the i-th B-scan, the bounding box B i The middle point of the top edge M i Fit the injection needle model N(x, y, z) in the eyeball-injection needle OCTB-scan image, where M i =(M xi , M yi , M zi ), M xi , M yi , M zi Respectively represent the midpoint M i The x, y, and z axis coordinates make the bounding box B i Surround the injection needle model to obtain the bounding box B i The parameter vector L i , satisfying L i =[L xi , L yi ,w,h],L xi , L yi Represents the bounding box B i The x, y coordinates of the upper left corner, w and h are the bounding box B i The width and height of the bounding box B i The eyeball-injection needle OCT B-scan image is cropped to obtain the injection needle image. The formula is as follows:
[0013] NaN, when
[0014] when
[0015] when
[0016] Among them, NaN means there is no bounding box, y max Indicates the scanning depth on the y-axis, x(Mz i) represents the change in the x direction of the injection needle when the z-axis coordinate value is known, y(Mz i ) represents the change in the y direction of the injection needle when the z-axis coordinate value is known.
[0017] In S3, the neural network is a multi-task network model, including a first network I, a second network II, a third network III, a fourth network IV, a fifth network V and a task screening module. The outputs of the first network I, the second network II, the third network III, the fourth network IV and the fifth network V are all input into the task screening module, and the output of the task screening module is used as the output of the multi-task network model.
[0018] The first network I, the second network II, the third network III, the fourth network IV, and the fifth network V all include a backbone network and a feature fusion network.
[0019] The first network I includes an encoder and a decoder. The encoder is composed of a backbone network and a feature fusion network. The decoder is composed of a detection head. Each input of the first network I is the injection needle image of the i-th B-scan. The output is divided into three categories: NN, NAR and NUR, as well as bounding boxes;
[0020] The structure of the second network II is the same as that of the first network I, but each input of the second network II is the injection needle image of the i-th B-scan And two images of the injection needle from its adjacent B-scan and
[0021] The structure of the fifth network V is the same as that of the first network I, but each input of the fifth network V is the eyeball-injection needle OCT B-scan image I of the i-th B-scan o .
[0022] The third network III includes two backbone networks and a feature fusion network. Both backbone networks are connected to the feature fusion network. The input of the first backbone network is the injection needle image of the i-th B-scan. The input of the second backbone network is the i-1th B-scan injection needle image and the injection needle image of the i+1th B-scan The output of the feature fusion network is used as the output of the third network III.
[0023] The structure of the fourth network IV is the same as that of the second network II, but in the fourth network IV, when the confidence value of the category NAR is greater than 0.8, the category NAR is updated, and the update rule of the category NAR is as follows:
[0024] vNAR =128+127c NAR
[0025] Among them, c NAR represents the confidence value of the category NAR, and v represents the image intensity of the category NAR;
[0026] When the confidence value of category NUR is greater than 0.8, category NUR is updated. The update rule of category NUR is as follows:
[0027] v NUR =128--128c NUR
[0028] Among them, c NUR represents the confidence value of category NUR, and v represents the image intensity of category NUR.
[0029] The types of backbone networks and feature fusion networks in the first network I, the second network II, the third network III, the fourth network IV, and the fifth network V are the same or different, and the number of backbone networks and feature fusion networks in the first network I-fifth network V is increased or decreased according to research needs to optimize the model effect.
[0030] During the training of the first network I, the second network II, the third network III, the fourth network IV, and the fifth network V, the focal loss function is used as the loss function, and the formula is as follows:
[0031] FL(p t )=-α(1-p t ) γ log(p t )
[0032] Among them, FL(p t ) represents the focal loss function value, p t is the estimated probability of the network for the specified category; α is the weighting factor of the specified class, satisfying α∈[0,1]; γ is the adjustable focusing parameter, satisfying γ∈[0,+∞].
[0033] The beneficial effects of the present invention are:
[0034] The present invention proposes a method for detecting and positioning robot subretinal injection needles based on deep learning, which improves the detection and positioning accuracy of robot and auxiliary subretinal injection needles and increases the safety of ophthalmologists' surgical operations. The present invention integrates multiple backbone networks and multiple feature fusion networks, and can replace the types of backbone networks and feature fusions at will, and increase and decrease the number of backbone networks and feature fusion networks according to research needs to optimize the model effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 It is an overall structural diagram of the detection and positioning method of the robot subretinal injection needle based on deep learning of the present invention;
[0036] Figure 2 1 is a schematic diagram of OCT B-scan image data of the present invention, wherein (a), (b), (c), (d) and (e) are B-scan images of an injection needle above or below the retina, (f) is an injection needle inserted into the volume, this scan does not contain the needle, but a specular reflection artifact, the white arrow indicates the position of the needle, and the scale bar is 100 μm;
[0037] Figure 3 1 is a schematic diagram of an example of ROI image processing result of the present invention, wherein (a) is a needle and a bounding box B in a B-scan image. i Ellipse fitting, (b) is the needle model N(x, y, z) by each bounding box B i The midpoint of the upper edge of i =(M xi , M yi , M zi ) fitting, (c) and (d) are the bounding boxes L used to crop the ROI. i Different views of the needle model N(x, y, z);
[0038] Figure 4 It is the ablation experiment result of the algorithm of the present invention;
[0039] Figure 5 is the confusion matrix evaluation result of different networks of the present invention;
[0040] Figure 6 is the precision and recall curves of different categories of the five networks of the present invention using different IoU thresholds, P NN , P NAR and P NUR represents the accuracy of each category, mP represents the average accuracy of all categories, and R NN , R NAR and R NUR represents the recall value of these three classes, and mR represents the average recall rate of all classes;
[0041] Figure 7is the detection result of the second network II of the present invention, where (a), (b), (c), and (d) are examples of correct detection of the challenging second network II, (e) is an incorrect detection of the third network III, (f) is the correct detection of the second network II with a very small needle segment, (g) is the detection of the third network III, using a small IoU value of 0.38 to detect the needle segment and classify it as NN, (h) is the correct detection of the second network II, the white bounding box represents the ground truth (A-NAR, A-NUR, and A-NN), the black bounding box represents the detection result (D-NAR, D-NUR, and D-NN), and the scale size is 100 μm;
[0042] Figure 8 is the error result of the second network II of the present invention;
[0043] Fig. 9 is the comparison result between the present invention and the geometry-based method, where (a) is the needle point cloud S in black, segmented when the needle is above the retina. (b) is when the needle is above the retina, S matches the target point cloud T, and the white bounding box is the needle manually annotated as the ground truth. (c) is when the needle pierces the retina, S matches the target point cloud T, and (d)-(c) is an enlarged view of the tip part, showing the mismatch between S and the target needle ground truth.
[0044] Fig.10 is the edge error result, where (a) is the error of the bottom edge and (b) is the error of the top edge;
[0045] Fig.11 is the evaluation result of the confusion matrix of different adjacent m in the second network II of the present invention;
[0046] Fig.12 These are the result curves of cropped images of different sizes, where (a) is the precision curve and (b) is the recall curve;
[0047] Fig.13 is the error performance of different cropped image sizes n, different adjacent image spaces m and different standard deviations o of Gaussian noise in the image for the edge, where (a) is the error performance of different cropped image sizes n for the lower edge, (b) is the error performance of different cropped image sizes n for the upper edge, (c) is the error performance of different adjacent image spaces m for the lower edge, (d) is the error performance of different adjacent image spaces m for the upper edge, (e) is the error performance of different standard deviations o of Gaussian noise in the image for the lower edge, and (f) is the error performance of different standard deviations o of Gaussian noise in the image for the upper edge. DETAILED DESCRIPTION
[0048] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0049] like Figure 1As shown, the present invention comprises the following steps:
[0050] S1: A microscope-integrated optical coherence tomography (OCT) B-scan image sequence of the eyeball and the injection needle is used to collect the B-scan image sequence. Multiple eyeball-injection needle OCT B-scan image sequences form a B-scan image dataset. In the specific implementation, 17280 B-scan data are used for training the model, and 103808 B-scan data are used for testing. Each dataset has two images, one is the original image I without cropping. o , where each B-scan image is originally 512 × 1024 pixels. The other is a cropped version of the image Each image was cropped using a robust ROI.
[0051] In S1, the microscope integrated optical coherence tomography is calibrated, the focal length of the microscope integrated optical coherence tomography is changed, and the calibrated imager is used to collect eyeball-injection needle OCT B-scan images, and the collected B-scan images include no injection needle (NN) images, injection needle above the retina (NAR) images, or injection needle below the retina (NUR) images, such as Figure 2 As shown in (a), (b), (c), (d), (e) and (f).
[0052] S2: inputting the B-scan image data set into a robust ROI cropping algorithm to obtain a cropped ROI-injection needle data set;
[0053] S2 is specifically:
[0054] Combined with the injection needle model, the injection needle detection method based on ellipse fitting is used to detect, identify and crop the injection needle in the B-scan image dataset. If there is no injection needle in the eyeball-injection needle OCT B-scan image, the eyeball-injection needle OCT B-scan image is not cropped and the image is directly input into the network. Otherwise, the B-scan image dataset is used to identify the injection needle and obtain the injection needle image, such as Figure 3 As shown in (a), (b), (c) and (d), the cropped ROI-injection needle dataset is composed of the uncropped eyeball-injection needle OCT B-scan image and injection needle image, and the eyeball-injection needle OCT B-scan image corresponding to the injection needle image.
[0055] In S2, the injection needle will deform during the insertion into the retina. The needle is modeled using a second-order polynomial N(x, y, z). The formula of the injection needle model N(x, y, z) is as follows:
[0056]
[0057] Where x(z) represents the x-axis coordinate value of the injection needle when the z-axis coordinate value is known, y(z) represents the y-axis coordinate value of the injection needle when the z-axis coordinate value is known, and a 0 , a 1 , a 2 represents the first-third coordinate coefficient, which is a constant, b 0 , b 1 , b 2 Represents the fourth-sixth coordinate coefficient, which is a constant.
[0058] Since the injection depth (250 μm) is relatively small compared to the imaging depth range of OCT (2 mm), most of the injection needles in the OCT scans were located above the retina.
[0059] In S2, in the i-th B-scan, the bounding box B i The middle point of the top edge M i Fit the injection needle model N(x, y, z) in the eyeball-injection needle OCT B-scan image, where Mi = (M xi , M yi , M zi ), M xi , M yi , M zi Respectively represent the midpoint M i The x, y, and z axis coordinates make the bounding box B i Surround the injection needle model to obtain the bounding box B i The parameter vector L i , satisfying L i =[L xi , L yi ,w,h],L xi , L yi Represents the bounding box B i The x, y coordinates of the upper left corner, w and h are the bounding box B i The width and height of the bounding box are determined by the diameter of the injection needle, and then according to the bounding box B i The eyeball-injection needle OCTB-scan image is cropped to obtain the injection needle image. The formula is as follows:
[0060] NaN, when
[0061] when
[0062] when
[0063] Among them, NaN means there is no bounding box (that is, the needle does not exist), ymax Represents the scan depth on the y-axis, where NaN indicates no bounding box, and y max Indicates the scanning depth on the y-axis, x(Mz i ) represents the change in the x direction of the injection needle when the z-axis coordinate value is known, y(Mz i ) represents the change in the y direction of the injection needle when the z-axis coordinate value is known. In a specific implementation, based on the MI-OCT penetration depth, y max The maximum value is always set to 2mm.
[0064] S3: The cropped ROI-injection needle dataset is input into the neural network for training to obtain a subretinal injection needle tip detection and positioning model;
[0065] In S3, the neural network is a multi-task network model, including a first network I, a second network II, a third network III, a fourth network IV, a fifth network V and a task screening module. The outputs of the first network I, the second network II, the third network III, the fourth network IV and the fifth network V are all input into the task screening module, and the output of the task screening module is used as the output of the multi-task network model. In the specific implementation, the task screening module is RetinaNet.
[0066] The first network I includes an encoder and a decoder. The encoder consists of a backbone network and a feature fusion network. The decoder consists of a detection head. The encoder is used to provide feature mapping, and the feature fusion network is used to perform classification and bounding box regression tasks. Each input of the first network I is the i-th B-scan injection needle image The output is divided into three categories: NN, NAR, and NUR, as well as a bounding box. The output of the bounding box prediction is used to locate the needle.
[0067] The structure of the second network II is the same as that of the first network I, but each input of the second network II is the injection needle image of the i-th B-scan And two images of the injection needle from its adjacent B-scan and That is, the input to the encoder is three channels, and this extension allows the network to exploit information present in adjacent scans.
[0068] The third network III includes two backbone networks and a feature fusion network. Both backbone networks are connected to the feature fusion network. The input of the first backbone network is the injection needle image of the i-th B-scan. The input of the second backbone network is the i-1th B-scan injection needle image and the injection needle image of the i+1th B-scan The output of the feature fusion network is used as the output of the third network III.
[0069] The structure of the fourth network IV is the same as that of the second network II, and the brightness of the entire image in the input image is set to 128. However, in the fourth network IV, when the confidence value of the category NAR is greater than 0.8, the category NAR is updated, and the update rule of the category NAR is as follows:
[0070] v NAR =128+127c NAR
[0071] Among them, c NAR represents the confidence value of the category NAR, and v represents the image intensity of the category NAR;
[0072] When the confidence value of category NUR is greater than 0.8, category NUR is updated. The update rule of category NUR is as follows:
[0073] v NUR =128--128c NUR
[0074] Among them, c NUR represents the confidence value of category NUR, and v represents the image intensity of category NUR.
[0075] The structure of the fifth network V is the same as that of the first network I, but each input of the fifth network V is the eyeball-injection needle OCT B-scan image I of the i-th B-scan o , the image is original and uncropped.
[0076] During the training of the first network I, the second network II, the third network III, the fourth network IV, and the fifth network V, there is still an imbalance between the background (non-injection needle) and the foreground (injection needle) in the cropped images. Therefore, the focal loss function is used as the loss function to offset the imbalance, and the formula is as follows:
[0077] FL(p t )=-α(1-p t ) γ log(p t )
[0078] Among them, FL(p t ) represents the focal loss function value, p t is the network’s estimated probability of a given class; when an example is misclassified and p t When it is very small, the modulation factor (1-pt) r Close to 1, FL(p t) is not affected. α is the weighting factor of the specified class, satisfying α∈[0,1]; γ is the adjustable focusing parameter, satisfying γ∈[0,+∞], α and γ are determined by ablation experiments.
[0079] The types of backbone networks and feature fusion networks in the first network I, the second network II, the third network III, the fourth network IV, and the fifth network V are the same or different, and the number of backbone networks and feature fusion networks in the first network I to the fifth network V is increased or decreased according to research needs to optimize the model effect. In the specific implementation, when the research focuses on detection and positioning efficiency, the number of backbone networks and feature fusion networks is appropriately reduced. When the research focuses on detection and positioning accuracy, the number of backbone networks and feature fusion networks is appropriately increased.
[0080] S4: Deploy a subretinal injection needle tip detection and positioning model on the terminal, and use the subretinal injection needle tip detection and positioning model to detect and locate the subretinal injection needle.
[0081] In the specific implementation, all five models were initialized with Glorot, trained 70 times from scratch, with a learning rate of 0.00001, and trained for 7 hours on a computing platform of Nvidia GTX 1080, Intel Core 7-7700K CPU and 16GB RAM with Tensorfo1.15. In order to determine the optimal values of γ and α, an ablation experiment was designed, and the results are shown in Figure 4 As shown. From these results, it can be inferred that the model trained with the cropped dataset performs significantly better than the model trained with the original dataset, with the highest MAP of the cropped dataset being 0.9836 and the highest MAP of the original dataset being 0.8153. Compared with the fifth network V using the original dataset, the inference time of the first networks I, II, and III using the cropped dataset was reduced by 41.1%, 39.9%, and 28.6%, respectively. The inference time of the fourth network IV increased by 58.1%. The results show that the adjustment of parameters γ and α has a certain impact on the performance. The original dataset contains a larger foreground and background imbalance, as well as more noise and reflections, making the classification task more difficult. Therefore, the fifth network V performs worse than the first networks I, II, III, and IV in terms of MAP. The following is a quantitative analysis:
[0082] 1) Processing time: The network training environment is Ubuntu 18.04, and the ROI cropping algorithm is tested on Point Cloud Library (PCL) 1.8 OpenCV 3.4. The code uses the OpenMP parallel library for acceleration, achieving an average of 476.7ms per volume. Using Network II with GPU, the processing time for each cropped B-scan is 32.3ms. According to the calculation, the scanning time is 1.5s and the ROI cropping time is 0.47s. The second Network II processing time is 3.2 seconds. Therefore, for one volume, it takes 5.2s from scan acquisition to needle segmentation output.
[0083] 2) Network performance: This paper discusses the detection performance of five networks on the test data set. Figure 5 This is the confusion matrix evaluation result of different networks in the present invention. In order to test the sensitivity of the network algorithm under different IoU thresholds, different IoU thresholds are set for the best performance model of each network. The results are shown in Figure 6 As shown. For the first networks I, II, III, and IV, the precision and recall are constant until the IoU threshold reaches 0.55. When the IoU threshold is higher than 0.9, the precision and recall of the NAR and NUR classes drop to close to 0. As the IoU value threshold increases, the number of detected injection needles decreases, including NAR and NUR. When the IoU threshold is greater than 0.3, the detection precision and recall of the fifth network V begin to decrease, indicating that the first networks I, II, III, and IV have better detection accuracy and positioning capabilities. Figure 8 The confusion matrix of the second network II is shown, where NN A 、NUR A and NAR A represents the basic truth class, SUM A Denotes the true value of each class, while the subscript D denotes the detected class. The table shows that the NAR and NUR classes are sometimes confused because it is difficult to correctly classify the examples touched by the needle or further analyze them. Table II shows the confusion matrix of the network. The second network II, III, and IV take advantage of the information of the input self-adjacent images and have better needle detection performance than the first network I and V. The second network II performs the best. Some representative detection results are shown in Figure 7 As shown in Figure 2. For subretinal injections, the most important aspect is the depth of the needle tip, so a new method to evaluate the performance of needle localization for subretinal injections is proposed. It involves the average Euclidean error between the predicted depth and the top and bottom ground truth of the bounding box. The maximum error as well as the 90% and 95% confidence intervals are evaluated, and the results for different IoU thresholds are shown in Figure 2. Fig.10 As shown in Figure 2, the upper edge shows better performance than the lower edge.
[0084] 3) Comparison with geometry-based methods, the results are as follows Fig. 9 As shown in Figure 2, when the needle tip is above the retina, the average errors of its upper and lower edges are 18.4 μm and 22.2 μm, respectively. However, when the needle is inserted into the retina, the needle tip merges with the retinal tissue, resulting in the loss of geometric information. The point cloud S has a large error with the ground truth needle and the average upper and lower edges, which are 97.2 μm and 99.2 μm, respectively. Fig. 9 (d) shows a magnified view of the misaligned needle tip. The injection needle (S) is already below the retina, but S is still above the retina. Fig. 9 It can be seen from (e) that the performance of this method is far inferior to the method disclosed in the present invention.
[0085] L i =[L xi , L yi ,w+60n,h+120n]
[0086] 4) Sensitivity analysis. Fig.12 It shows that the precision and recall values remain stable before n=2, and then begin to decrease after n=2. As the image size increases, more noise is introduced. The larger the size of the cropped image, the greater the imbalance between the foreground and the background, resulting in a decrease in network performance. The error performance of the two edges is shown in Fig.13 (a) and Fig.13 The second parameter studied is the use of and The adjacent images of m represent the space of adjacent images. In order to analyze the sensitivity of this parameter, the present invention uses different values of m and trains the second network II using the cropped data set with an image size of 120×240. Fig.11 The results shown in are for m = 2, 3, and 4. The performance of these networks is reduced compared to the network with m = 1, and is similar to the performance of the first network I, with 5 injection needle images misdetected. These results show that using m = 2, 3, and 4 adjacent images allows the network to extract more sufficient features. The error performance of the two edges is shown in Fig.13 (c) and Fig.13 As shown in (d), the errors of the two edges remain relatively stable as m changes. In order to test the robustness of the method under different image qualities, zero-mean Gaussian noise is added to the B-scan images with standard deviations σ = 0 to σ = 48. The relationship between the two edge errors and the degree of noise addition is shown in Fig.13 (e) and Fig.13 (f) is shown. Before σ = 32, the upper edge error remains stable. When σ is greater than 32, the noise affects the shape of the needle and increases the diameter error of the needle. The bottom edge error is more sensitive than the top edge error.
[0087] In summary, the method disclosed in the present invention has better performance in detecting and locating retinal injection needles.
[0088] The above embodiments are used to illustrate the present invention rather than to limit the present invention. Any modification and change made to the present invention within the spirit of the present invention and the protection scope of the claims shall fall within the protection scope of the present invention.
Claims
1. A method for detecting and positioning a robot subretinal injection needle based on deep learning, characterized in that: The following steps are involved: S1: A microscope-integrated optical coherence tomography (OCT) B-scan image sequence of the eyeball and the injection needle is used to collect the B-scan image data set, which is composed of multiple eyeball-injection needle OCT B-scan image sequences; S2: inputting the B-scan image data set into the ROI cropping algorithm to obtain the cropped ROI-injection needle data set; S3: The cropped ROI-injection needle dataset is input into the neural network for training to obtain a subretinal injection needle tip detection and positioning model; S4: Detection and positioning of subretinal injection needles using the subretinal injection needle tip injection needle detection and positioning model; The S2 is specifically: Combined with the injection needle model, the injection needle detection method based on ellipse fitting is used to detect, identify and crop the injection needle on the B-scan image dataset. If the injection needle does not exist in the eyeball-injection needle OCT B-scan image, the eyeball-injection needle OCT B-scan image is not cropped. Otherwise, the B-scan image dataset is subjected to injection needle recognition to obtain the injection needle image. The cropped ROI-injection needle dataset is composed of the uncropped eyeball-injection needle OCT B-scan image and the injection needle image and the eyeball-injection needle OCT B-scan image corresponding to the injection needle image. In S2, in the i-th B-scan, the bounding box B i The middle point of the top edge M i Fit the injection needle model N(x,y,z) in the eyeball-injection needle OCT B-scan image, where M i =(M xi ,M yi ,M zi ), M xi ,M yi ,M zi Respectively represent the midpoint M i The x, y, and z axis coordinates make the bounding box B i Surround the injection needle model to obtain the bounding box B i The parameter vector L i , satisfying L i =[L xi ,L yi ,w,h],L xi ,L yi Represents the bounding box B i The x, y coordinates of the upper left corner, w and h are the bounding box B i The width and height of the bounding box B i The eyeball-injection needle OCT B-scan image is cropped to obtain the injection needle image. The formula is as follows: NaN, the when when Among them, NaN means there is no bounding box, y max Indicates the scanning depth on the y-axis, x(Mz i ) represents the change in the x direction of the injection needle when the z-axis coordinate value is known, y(Mz i ) represents the change in the y direction of the injection needle when the z-axis coordinate value is known.
2. The method for detecting and positioning a subretinal injection needle based on deep learning according to claim 1, characterized in that: In S1, the focal length of the microscope integrated optical coherence tomography imager is changed, and the imager is used to collect an eyeball-injection needle OCT B-scan image, and the collected B-scan image includes an image without an injection needle, an image of the injection needle above the retina, or an image of the injection needle below the retina.
3. The method for detecting and positioning a subretinal injection needle based on deep learning according to claim 1, characterized in that: In S3, the neural network is a multi-task network model, including a first network I, a second network II, a third network III, a fourth network IV, a fifth network V and a task screening module. The outputs of the first network I, the second network II, the third network III, the fourth network IV and the fifth network V are all input into the task screening module, and the output of the task screening module is used as the output of the multi-task network model; the first network I, the second network II, the third network III, the fourth network IV and the fifth network V all include a backbone network and a feature fusion network.
4. The method for detecting and positioning a subretinal injection needle based on deep learning according to claim 3, characterized in that: The first network I specifically includes an encoder and a decoder. The encoder is composed of a backbone network and a feature fusion network, and the decoder is composed of a detection head. Each input of the first network I is the injection needle image of the i-th B-scan. The output is divided into three categories: NN, NAR and NUR, as well as bounding boxes; The structure of the second network II is the same as that of the first network I, but each input of the second network II is the injection needle image of the i-th B-scan And two images of the injection needle from its adjacent B-scan and The structure of the fifth network V is the same as that of the first network I, but each input of the fifth network V is the eyeball-injection needle OCT B-scan image I of the i-th B-scan o .
5. The method for detecting and positioning a subretinal injection needle based on deep learning according to claim 3, characterized in that: The third network III includes two backbone networks and a feature fusion network. Both backbone networks are connected to the feature fusion network. The input of the first backbone network is the injection needle image of the i-th B-scan. The input of the second backbone network is the i-1th B-scan injection needle image and the injection needle image of the i+1th B-scan The output of the feature fusion network is used as the output of the third network III.
6. The method for detecting and positioning a subretinal injection needle based on deep learning according to claim 3, characterized in that: The structure of the fourth network IV is the same as that of the second network II, but in the fourth network IV, when the confidence value of the category NAR is greater than 0.8, the category NAR is updated, and the update rule of the category NAR is as follows: v NAR =128+127c NAR Among them, c NAR Represents the confidence value of the category NAR, v NAR Indicates the image intensity of category NAR; When the confidence value of category NUR is greater than 0.8, category NUR is updated. The update rule of category NUR is as follows: v NUR =128-128c NUR Among them, c NUR represents the confidence value of category NUR, v NUR Represents the image intensity of category NUR.
7. A method for detecting and positioning a subretinal injection needle using a robot based on deep learning according to any one of claims 3 to 6, characterized in that: The types of backbone networks and feature fusion networks in the first network I, the second network II, the third network III, the fourth network IV, and the fifth network V are the same or different, and the number of backbone networks and feature fusion networks in the first network I-fifth network V increases and decreases according to research needs.
8. The method for detecting and positioning a subretinal injection needle based on deep learning according to claim 3, characterized in that: During the training of the first network I, the second network II, the third network III, the fourth network IV, and the fifth network V, the focal loss function is used as the loss function, and the formula is as follows: FL(p t )=-α(1-p t ) γ log(p t ) Among them, FL(p t ) represents the focal loss function value, p t is the estimated probability of the network for the specified category; α is the weighting factor of the specified class, satisfying α∈[0,1]; γ is the adjustable focusing parameter, satisfying γ∈[0,+∞].
