An automatic method for optimal frame detection and optic nerve sheath width measurement in ultrasonic video of the fundus
By using the nnU-Net segmentation network and a scoring model driven by international expert consensus, the optimal frame of fundus ultrasound video is automatically detected and the width of the optic nerve sheath is measured, which solves the problems of inaccuracy and time consumption in optic nerve sheath measurement and achieves automation and consistency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2026-03-31
AI Technical Summary
Existing methods for measuring the width of the optic nerve sheath in fundus ultrasound videos suffer from poor image quality, blurred boundaries, inconsistencies in manual measurements by doctors, and difficulty in automatically detecting the optimal frame, leading to inaccurate measurements and time consumption.
The nnU-Net segmentation network is used for automatic segmentation of the eyeball and optic nerve sheath. A heuristic scoring model is designed based on international expert consensus to extract the optimal frame. The optic nerve sheath width is automatically calculated to reduce the reliance on doctor annotation.
It enables automatic and accurate measurement of the optic nerve sheath width in fundus ultrasound video, reducing the need for manual operation by doctors and improving the consistency and efficiency of measurement.
Smart Images

Figure CN119832335B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of medical image processing and analysis technology, specifically relating to a fully automated method for detecting the optimal frame of fundus ultrasound video and measuring the width of the optic nerve sheath. Background Technology
[0002] Elevated intracranial pressure (ICP) poses a serious threat to brain function, potentially restricting blood flow to the brain, leading to hypoxia and malnutrition, and ultimately causing irreversible brain damage. It can be caused by a variety of factors, including intracranial lesions (such as tumors, cerebral hemorrhage, and cerebral edema), cerebrospinal fluid circulation disorders (such as hydrocephalus), and head trauma (such as traffic accidents or falls). Studying and monitoring elevated ICP is crucial for timely intervention and improving patient prognosis.
[0003] In clinical practice, lumbar puncture is a commonly used invasive method to measure cerebrospinal fluid pressure for accurate assessment of intracranial pressure (ICP). However, patients may experience significant discomfort or pain during this procedure, and potential risks such as infection, bleeding, and post-puncture headache should be considered. Fundus ultrasound imaging offers a safer and more convenient alternative as a non-invasive ICP measurement technique. Fundus ultrasound can be used to assess various indicators such as optic nerve diameter (OND) and optic nerve sheath diameter (ONSD). Since the optic nerve sheath is a continuation of the intracranial dura mater and subarachnoid space, increased intracranial pressure directly leads to an increase in the optic nerve sheath diameter; therefore, the optic nerve sheath diameter (ONSD) is considered an important parameter for predicting elevated intracranial pressure (ICP). In trauma patients, ICP can be continuously monitored by measuring ONSD. Normally, an ONSD value is less than 5 mm, while a value greater than 6 mm indicates significant intracranial pressure elevation. Therefore, developing a fully automated system that can accurately calculate the optic nerve sheath width from fundus ultrasound video is urgent and highly significant, and this relies on automatic segmentation of fundus ultrasound images and automatic detection of optimal frames.
[0004] Deep learning models have been widely applied to medical image analysis tasks. Since the U-Net network architecture was proposed in 2015, its symmetric encoder-decoder structure has significantly improved the accuracy of image segmentation, especially in medical image analysis. Subsequently, various variants and innovative methods, such as Mask R-CNN and the DeepLab series, have continuously achieved excellent performance in both segmentation accuracy and efficiency. Among them, nnU-Net, as an enhanced and automated U-Net model, can automatically adapt to the characteristics of different datasets without manual hyperparameter tuning, greatly simplifying the application process. With its outstanding performance, nnU-Net has demonstrated remarkable results in several public medical image segmentation challenges, further promoting the development of deep learning in the field of medical image segmentation.
[0005] Existing deep network models for video keyframe detection can be broadly categorized into two types. The first type treats keyframe detection as a binary classification problem. The detection model is trained using a cross-entropy loss function, classifying each frame in the video as either a keyframe or a non-keyframe. This method leverages the advantages of classification algorithms, extracting features from each frame and making classification predictions. The second type treats keyframe detection as a regression problem, estimating a score for each frame based on relevance or importance, indicating its probability of being a keyframe. This type of model is trained using mean squared error loss, enabling a nuanced assessment of the importance of each frame. Regression methods offer greater flexibility in representing the relative importance of frames. However, both types of deep learning models require labeling all frames in the video during training. The second type, regression-based deep network models, in particular, requires accurately scoring each frame, which is very difficult and time-consuming for doctors.
[0006] Furthermore, accurate measurement of the optic nerve sheath diameter (ONSD) is crucial. This process demands a high level of experience and skill from clinicians. However, the quality of ocular ultrasound images is often poor, typically exhibiting low signal-to-noise ratio, insufficient contrast, and blurred optic nerve sheath boundaries, all of which affect the accuracy of clinical measurements. Additionally, when measuring the width of the optic nerve sheath 3 mm below the eyeball, the physician must manually measure 3 mm along the optic nerve sheath towards the eyeball and draw a perpendicular line to calculate the distance between the intersection of this line and the optic nerve sheath boundary. Due to numerous interferences and limitations in manual measurement of the optic nerve sheath, the consistency and stability of measurement results from different physicians, and even from the same physician at different time points, are poor. Therefore, there is an urgent need to develop an algorithm that can automatically, stably, and accurately measure ONSD.
[0007] To address the challenges in keyframe detection and optic nerve sheath measurement, this invention introduces a fully automated method for optimal frame detection and optic nerve sheath width measurement in fundus ultrasound videos. This method aims to diagnose optimal frames using international expert consensus on optic nerve sheath diameter imaging and measurement. Unlike existing optimal frame detection algorithms for ultrasound videos, this method strictly adheres to international expert consensus for feature selection and overall scoring, exhibiting strong interpretability and eliminating the need for physicians to annotate and score each frame. This invention is a fully automated model comprising three key modules: an automatic segmentation module for the eyeball and optic nerve sheath in ultrasound images, an automatic keyframe detection module, and an automatic ONSD measurement module at 3 mm below the eyeball. During model training, the ultrasound video is segmented into image frames, requiring only annotation of the eyeball and optic nerve sheath in a small number of image frames. After automatic segmentation of the eyeball and optic nerve sheath based on the trained segmentation model, optimal frame detection and ONSD measurement are automatically performed using only the image's inherent information. This model is the first fully automated method to detect optimal frames in fundus ultrasound videos and measure optic nerve sheath width strictly according to international expert consensus. Summary of the Invention
[0008] Objective: To address the challenges of ultrasound video segmentation, optimal frame detection, and optic nerve sheath width measurement, including significant image noise and artifacts, blurred optic nerve sheath boundaries, and difficulties in quantifying optimal frame standards, this invention redesigns the optic nerve sheath width measurement task for fundus ultrasound videos and proposes a novel, fully automated method for fundus ultrasound video segmentation, optimal frame detection, and optic nerve sheath width measurement. This model utilizes the automatic segmentation results of fundus images and international expert consensus to detect optimal frames, calculating the optic nerve sheath width at a point 3 mm below the eyeball in the extracted optimal frame image.
[0009] Technical solution: A fully automated method for optimal frame detection and optic nerve sheath width measurement in fundus ultrasound video, comprising the following steps:
[0010] a) Literature review: Collect publicly available literature and patents in relevant fields, including the current status of fundus ultrasound video processing, the current status of research on optimal frame detection in medical videos, and the current status of research on optic nerve sheath width measurement.
[0011] b) Data Collection: Seventy fundus ultrasound video data were collected from Nanjing Gulou Hospital. 762 frames were randomly selected for pixel annotation of the eyeball and optic nerve sheath regions. The collected dataset was randomly divided into training and testing sets for the segmentation model at an 8:2 ratio, and preprocessed accordingly. In addition, 40 fundus ultrasound videos included classification annotations of 160 optimal frames and 160 unqualified frames selected by the physician, arranged in a 3:1 ratio.
[0012] The scores are randomly divided into training and test sets for the scoring model at a ratio of 2.
[0013] c) Establishing a segmentation model for the eyeball and optic nerve sheath in fundus ultrasound images: Based on the nnU-Net segmentation network, an end-to-end 2D fundus ultrasound image segmentation model was constructed. The model was trained on a training set of 609 images with annotations for the eyeball and optic nerve sheath regions, achieving automatic segmentation of the eyeball and optic nerve sheath. After training, the obtained segmentation model was tested on an independent test set consisting of 153 frames.
[0014] d) Design a heuristic algorithm for extracting the optimal frame from fundus ultrasound video: Based on the four qualitative standard rules in the international expert consensus on measuring the optic nerve sheath width in fundus ultrasound video, corresponding features are extracted based on the segmentation results, and these four rules are quantified. A linear regression scoring model is also designed. Based on the regression model algorithm, the corresponding weight coefficients are automatically determined for each rule, resulting in a score for each frame in the fundus ultrasound video. The five frames with the highest scores are output as the optimal frame set for the video.
[0015] e) Design an automatic optic nerve sheath width measurement algorithm: For the five optimal frame images extracted from each video, based on the segmentation results of the eyeball and optic nerve sheath, calculate the centerline of the optic nerve sheath, locate the intersection of the centerline and the eyeball boundary 3 mm below the eyeball, and automatically measure the width of the optic nerve sheath. After removing the maximum and minimum values from the five width values, use the average of the remaining three width values as the final optic nerve sheath width.
[0016] f) Training the segmentation model: The eyeball and optic nerve sheath segmentation model constructed in c) is trained and optimized on the training set using an end-to-end training method;
[0017] g) After training, the segmentation model obtained in f) is applied to the test set to segment all images in the video of each patient. Combining the original images and the segmentation results, the algorithm constructed in d) is used to obtain the optimal frame set of ultrasound video for the left and right eyes of each patient. The algorithm in e) is used to obtain the final optic nerve sheath width of the video.
[0018] Specifically, the number of ultrasound video frames in step b) ranges from 22 to 501 frames. The video frame images have two formats: the first format has an image size of 1024×768 and a pixel resolution of [0.0834mm, 0.0834mm]; the second format has an image size of 800×600 and a pixel resolution of [0.0652mm, 0.0652mm].
[0019] Specifically, in step b), the 70 fundus ultrasound video data collected were used by two senior doctors at Gulou Hospital to perform pixel-level annotation of the eyeball and optic nerve sheath in 762 2D ultrasound images. These images were then randomly divided into training and testing sets at a ratio of 609:153. The preprocessing of the dataset involved: first, normalizing the pixel values of all images to [0,1] using the Z-score method; second, increasing the diversity of the training data through random horizontal and vertical flipping and adding random noise; and finally, randomly cropping the images in the training set to 512×512 pixels to improve training efficiency.
[0020] Specifically, step b) involves 40 fundus ultrasound videos labeled with optimal and unacceptable frames, where each video contains frame numbers for 4 optimal and 4 unacceptable frames. The image data of these optimal and unacceptable frames are used to train the weight coefficients in a linear regression model for optimal frame scoring.
[0021] Specifically, step c) of the eye and optic nerve sheath segmentation model involves feature extraction, multi-resolution feature fusion, and adaptive training. Feature extraction employs the nnU-Net framework, using a variant of the U-Net architecture to extract low-order features from the image through convolutional and pooling layers in the encoder. A multi-level feature fusion strategy combines shallow and deep features to achieve a balance between resolution and semantics, thereby improving segmentation accuracy. During training, dynamic learning rate adjustment and data augmentation techniques (random rotation, random flipping, and random scaling) are used to enhance the model's generalization ability. The loss function used to train the nnU-Net network is a combination of the average of the Dice loss and the cross-entropy (CE) loss. The final output is the image segmentation result, where the entire image is divided into three parts: the background region, the eye region, and the optic nerve sheath region. The trained nnU-Net segmentation model achieved a segmentation accuracy of 97.36% for the eye region and 90.05% for the optic nerve sheath on the test set.
[0022] Specifically, the optimal frame extraction algorithm in step d) of fundus ultrasound video needs to quantify the four rules in the international expert consensus on optic nerve sheath width measurement in fundus ultrasound images before establishing a scoring model. This application uses the trained nnU-Net segmentation model to obtain segmentation results of the eyeball and optic nerve sheath regions for each frame of the fundus ultrasound video. For optimal frame selection rule 1: whether the ultrasound image contains the lens and anterior chamber, this is a prerequisite for determining whether the frame is the optimal frame, and its quantification rules are as follows:
[0023]
[0024] Where I(x,y) represents the pixel value at position (x,y) in the original image, and M(x,y) represents the eye segmentation mask, which is 1 in the eye region and 0 in other regions. This represents the process of performing image erosion operations within structural unit K.
[0025] For optimal frame selection rule 2: whether the edge of the optic nerve sheath region is clear, the quantification rule is as follows:
[0026]
[0027] Where I(x,y) represents the pixel value at position (x,y) in the original image, and N(x,y) represents the segmentation mask of the optic nerve sheath. Represented in structural unit K e The process of performing image erosion operations within the image. Represented in structural unit K dThe process of performing image dilation calculations involves subtracting the mean gray values of the regions obtained from dilation and erosion. This difference reflects the brightness difference in the edge region of the optic nerve sheath in the ultrasound image.
[0028] For optimal frame selection rule 3: whether there are alternating two-bright-three-dark regions in the optic nerve sheath region of the image, where the "two-bright" part is the arachnoid region in medicine, and the "three-dark" part is the dura mater and optic nerve region. This application calculates the absolute difference of the pixel average value between the alternating regions of the "two-bright" and "three-dark" parts. There are four such absolute differences, and they are summed to obtain var3. The larger the sum, the more significant the change in brightness.
[0029] For optimal frame selection rule 4: whether the optic nerve sheath is displayed vertically, this application considers the angle between the center line of the optic nerve sheath and the vertical direction of the image. The smaller this angle, the greater the absolute value of the slope of the center line, and the closer the optic nerve sheath is to being vertical; the larger the angle, the smaller the absolute value of the slope of the center line, and the more tilted the optic nerve sheath is. Therefore, var4 is the angle between the center line of the nerve sheath and the vertical direction of the image.
[0030] After quantifying the four rules, four corresponding variable values are obtained. This application performs dimensionless processing on these four variables, and the final scoring model is as follows:
[0031] Var=w1×var1+w2×var2+w3×var3+w4×var4
[0032] Based on the classification and labeling of the best and unqualified frames in 40 fundus ultrasound videos by doctors, this application randomly selected 24 cases as the training set for the scoring model. The four weight coefficients in the above scoring model were determined by the LDA (linear discriminant analysis) method, where w1 = -0.2873, w2 = 0.3585, w3 = 0.1115, and w4 = -0.1179.
[0033] Finally, this application sorts all image frames in the fundus ultrasound video from highest to lowest score according to the optimal frame scoring model, and selects the top five frames with the highest scores as the optimal frame set of the video. In the test set of all 16 fundus ultrasound videos with optimal frame annotations, this application compares the top five frames selected by the above scoring model with the doctor's optimal frame annotations. It was found that the proportion of cases where the frame number with the highest predicted score by the model differs from the doctor's optimal frame number by no more than 2 is 52.17% in the total test set (i.e., the top 1 indicator). The proportion of cases where at least one of the three highest-scoring frames selected by the above scoring model differs from the doctor's optimal frame number by no more than 2 is 86.96% in the total test set (i.e., the top 3 indicator). The proportion of cases where at least one of the top five highest-scoring frames selected by the above scoring model differs from the doctor's optimal frame number by no more than 2 is 100% in the total test set (i.e., the top 5 indicator).
[0034] Specifically, the calculation process of the automatic measurement algorithm for optic nerve sheath width in the fundus ultrasound video in step e) is as follows: First, extract the optic nerve sheath centerline l1 based on the segmentation results of the five highest-scoring optimal frame images selected by the previous scoring model, and calculate the intersection point x1 between this centerline and the eyeball. Then, based on the pixel resolution of the image, calculate the point x2 3mm down from the centerline of the optic nerve sheath along the intersection point x1. Draw a perpendicular line l2 from the centerline l1 at point x2, and then calculate the intersection points x3 and x4 between l2 and the edge of the optic nerve sheath. Finally, calculate the distance between x3 and x4. For the five frames in the optimal frame set of the video, calculate the optic nerve sheath width value according to the above process, remove one maximum and one minimum value, and take the average of the remaining three values as the final optic nerve sheath width value.
[0035] Beneficial Effects: This invention utilizes the automatic segmentation results of the eyeball and optic nerve sheath in fundus ultrasound images and international expert consensus to detect the optimal frame of the ultrasound video. From the extracted optimal frame image, the width of the optic nerve sheath at a point 3 mm below the eyeball is automatically measured. It is worth noting that the optimal frame extraction algorithm of this invention is a mathematical modeling and quantification of medical diagnostic standards. Unlike other existing scoring methods based on deep network models, it is an interpretable quantitative scoring method that does not require doctors to label all the optimal frames in the fundus ultrasound video; only a small number of typical optimal frames and unqualified frames are needed.
[0036] Attached image content
[0037] Figure 1 This is an overall framework diagram of the method proposed in this invention;
[0038] Figure 2This is a comparison diagram of the segmentation results and doctor annotations in the method framework proposed in this invention, where the first column is the original image frame, the second column is the original image frame and doctor annotations, and the third column is the original image frame and segmentation results.
[0039] Figure 3 The visualization results of the quantitative indicators in the framework of the optimal frame detection method for fundus ultrasound proposed in this invention are as follows: (a) is the visualization of standard plane selection rule 1: "whether there is a lens and anterior chamber in the ultrasound image", (b) is the visualization of standard plane selection rule 2: "whether the edge of the optic nerve sheath region is clear", (c) is the visualization of standard plane selection rule 3: "whether there are alternating two bright and three dark regions in the optic nerve sheath region", and (d) is the visualization of standard plane selection rule 4: "whether the optic nerve sheath is displayed in the vertical direction".
[0040] Figure 4 This is a visualization of the contribution of the four quantitative indicators in the fundus ultrasound image scoring model proposed in this invention to the model.
[0041] Figure 5 This is a visualization of the automatic measurement method for optic nerve sheath width in fundus ultrasound images proposed in this invention. Detailed Implementation
[0042] The objectives, technical solutions, and advantages of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0043] This invention proposes a fully automated method for optimal frame detection and optic nerve sheath width measurement in fundus ultrasound videos. This method automatically segments the eyeball and optic nerve sheath regions in fundus ultrasound images. Then, based on the segmentation results and four rules from a quantified international expert consensus, each frame in the fundus ultrasound video is automatically scored. The five highest-scoring frames are selected as the optimal frame set. Finally, the width of the optic nerve sheath 3 mm below the eyeball in the selected five optimal frames is automatically measured. After removing the maximum and minimum width values, the average of the remaining three width values is taken as the final optic nerve sheath width value. The overall flowchart of this invention is shown below. Figure 1 As shown, the specific steps include:
[0044] a) Data Collection: Seventy fundus ultrasound video data were collected from Nanjing Gulou Hospital. For each video, it was first divided into image frames in chronological order, and all image frames were converted into grayscale images. Then, doctors selected and labeled the fundus region and optic nerve sheath region in 762 images as the dataset for the deep network segmentation model. These labeled images were randomly divided into training and test sets in an 8:2 ratio.
[0045] b) Establishing an eyeball and optic nerve sheath segmentation model: Based on the nnU-Net segmentation network, an end-to-end 2D fundus ultrasound image segmentation model was constructed. The parameters used for model training are shown in Table 1. After training, eyeball and optic nerve sheath segmentation was performed on all image frames of all patients for subsequent extraction of the optimal frame.
[0046] Table 1. Parameters used for model training
[0047] Batch size 13 Initial epochs 1000 Patch size (448,576) Initial lr 0.01 Weightdecay 0.0003
[0048] c) Design a heuristic video optimal frame extraction algorithm: Based on the segmentation results of all image frames and the international consensus statement standard, design the following four rule-based quantification indicators and the final optic nerve sheath detection indicator. Figure 3 A visualization of the information quantified for each indicator:
[0049] var1 is used to quantify rule 1: "Whether there is a lens and anterior chamber in the ultrasound image".
[0050]
[0051] var2 is used to quantify rule 2: "whether the edge of the optic nerve sheath region is clear".
[0052]
[0053] Var3 is used to quantify rule 3: "Whether there are alternating bright and dark areas in the optic nerve sheath region," and Var4 is used to quantify rule 4: "Whether the optic nerve sheath is displayed vertically." Then, linear discriminant analysis is performed.
[0054] The (LDA) method, based on a small number of optimal and unqualified frames labeled by doctors, determines four weighting coefficients. Ultimately, the scoring rules of this application are as follows:
[0055] Var=-0.2873×var1+0.3585×var2+0.11.15×var3-0.1179×var4
[0056] All image frames in the fundus ultrasound video are scored based on the final metric Var, and the five frames with the highest scores are selected as the optimal frame set for the video.
[0057] d) Design of an algorithm for measuring the width of the optic nerve sheath: For each selected optimal frame set in the fundus ultrasound video, this application automatically calculates the width of the optic nerve sheath in five frames based on the segmentation results. Then, the maximum and minimum values of these five width values are removed, and the average of the remaining three values is taken as the final optic nerve sheath width. The visualization result is shown below. Figure 3 As shown.
[0058] This invention first processes fundus ultrasound videos and adds the doctor's annotations of the eyeball and optic nerve sheath to obtain a 2D fundus ultrasound dataset. An automatic segmentation model for the eyeball and optic nerve sheath in fundus ultrasound images is then trained based on the nnU-Net deep network. On the test dataset, this segmentation model achieves a Dice of 97.36% for the eyeball region and 90.05% for the optic nerve sheath. Next, this application uses this segmentation model to segment all image frames of all ultrasound videos and designs a quantifiable and interpretable scoring model based on international expert consensus on optic nerve sheath width measurement in fundus ultrasound images. This scoring model is used to extract the five highest-scoring frames from each video as the optimal frame set. Compared to the optimal frame set selected by the doctor, the five frames selected by this application's optimal frame extraction algorithm achieve a top-1 detection accuracy of 52.17%, a top-3 detection accuracy of 86.96%, and a top-5 detection accuracy of 100%. Finally, this application automatically calculates the width values of the optic nerve sheath in the five best frames of each video, and then calculates the trimmed average value by removing the highest and lowest scores from them, which is taken as the optic nerve sheath width measured in the fundus ultrasound video.
Claims
1. A fully automatic method for fundus ultrasound video optimal frame detection and optic nerve sheath width measurement, characterized in that, The method comprises the following steps: a) collecting data: collecting fundus ultrasound video data; the collected data is randomly divided into a training set and a test set according to a certain proportion, and corresponding pretreatment is performed; b) establishing an eyeball and optic nerve sheath segmentation model: based on the nnU-Net segmentation network, an end-to-end 2D ultrasound image segmentation model is constructed to automatically segment the eyeball and the optic nerve sheath; c) designing a heuristic video optimal frame extraction algorithm: according to the standard plane selection rules of the ultrasound video, the rules are quantified and each frame of each video is scored, and the top five frames with the highest scores are output as the optimal frame set; d) designing an optic nerve sheath width measurement algorithm: according to the original image information and the segmentation result, the optic nerve sheath width of each image in the optimal frame set at 3mm below the eyeball is calculated by using the center line of the optic nerve sheath, and then the trimmed average value of the optic nerve sheath width values of all images in the optimal frame set is calculated as the optic nerve sheath width measurement value in the video; e) training the segmentation model: the eyeball and optic nerve sheath segmentation model constructed in b) is trained and optimized on the training set by using an end-to-end training method; f) after the training is completed, the segmentation model obtained in e) is applied to the test set, all images in the video of each patient are segmented, and the original image and the segmentation result are combined to obtain the optimal frame set of the left and right eye ultrasound videos of each patient by using the algorithm constructed in c), and the final optic nerve sheath width of the video is obtained by using the algorithm in d); In step c), the heuristic video optimal frame extraction algorithm comprises quantifying four ultrasound video standard plane selection rules in the international expert consensus, and scoring each frame of the video; The four ultrasound video standard plane selection rules and the corresponding quantification rules are as follows: Optimal frame selection rule 1: whether there is a lens and an anterior chamber in the fundus ultrasound video frame image; In the formula, I(x, y) represents a pixel value of the original image at position (x, y), and M(x, y) represents a segmentation mask of the eyeball, being 1 in the eyeball region and 0 in other regions, represents a process of performing an image erosion operation within the structural unit K, and i is a coordinate offset within the structural unit K. Optimal frame selection rule 2: whether the edge of the optic nerve sheath region is clear; where I(x, y) represents the pixel value of the original image at position (x, y), and N(x, y) represents the segmentation mask of the optic nerve sheath, represents a process of performing an image erosion operation in the structural unit K e , represents a process of performing an image dilation operation in the structural unit K d , and the difference between the average values of the image gray values obtained by the dilation and the erosion respectively reflects the brightness difference of the edge region of the optic nerve sheath in the ultrasound image. Optimal frame selection rule 3: whether the optic nerve sheath region in the image has alternating two-light and three-dark regions; The "two-light" part is the arachnoid region in medicine, and the "three-dark" part is the dura mater and optic nerve region; the absolute difference value of the average value of pixels between the "two-light" part and the "three-dark" part alternating region is calculated, and the sum of the four absolute difference values is obtained as var3; the larger the sum, the more significant the bright-dark change; Optimal frame selection rule 4: whether the optic nerve sheath is displayed along the vertical direction; Considering the angle between the center line of the optic nerve sheath and the vertical direction of the image, the smaller the angle, the larger the absolute value of the center line slope, and the closer the optic nerve sheath to the vertical; the larger the angle, the smaller the absolute value of the center line slope, and the more inclined the optic nerve sheath, and var4 is the angle between the center line of the optic nerve sheath and the vertical direction of the image; The scoring formula is as follows: Var=w1×var1+w2×var2+w3×var3+w4×var4 In the formula, w1, w2, w3 and w4 are weight coefficients of the four quantification rules of "whether there is a lens and an anterior chamber in the ultrasound image", "whether the edge of the optic nerve sheath region is clear", "whether the optic nerve sheath region has alternating two-light and three-dark regions", and "whether the optic nerve sheath is displayed along the vertical direction".
2. The fully automatic method for optimal frame detection and optic nerve sheath width measurement from fundus ultrasound videos according to claim 1, characterized in that: In step a), the collected data is randomly divided into a training set and a test set for the segmentation model in a ratio of 8:2; the preprocessing specifically comprises: first, normalizing the pixel values of all fundus ultrasound video frame images to [0, 1] by the Z-score method; second, performing random horizontal flipping, random vertical flipping and adding random noise; and finally, randomly cropping the fundus ultrasound video frame images in the training set to 512x512.
3. The fully automatic method for optimal frame detection and optic nerve sheath width measurement from fundus ultrasound videos according to claim 1, characterized in that: In step b), the loss function used for training the nnU-Net network is the average combination of the Dice loss and the cross-entropy CE loss; the final output is the segmentation result of the image, i.e. the whole image is divided into three parts: the background region, the eyeball region and the optic nerve sheath region.
4. The fully automatic method for optimal frame detection and optic nerve sheath width measurement from fundus ultrasound videos according to claim 1, wherein: In step d), the optic nerve sheath width measurement algorithm calculates the center line of the optic nerve sheath according to the input optimal frame of the patient, locates to 3 millimeters below the eyeball along the intersection of the center line and the eyeball boundary, and automatically measures the width of the optic nerve sheath; after removing one maximum value and one minimum value from the five width values, the average value of the remaining three width values is taken as the final optic nerve sheath width.
Citation Information
Patent Citations
Artificial intelligence-based optic nerve sheath positioning system and method
CN117635556A