Brain structure automatic measurement and optimization method based on medical ultrasonic image

By using deep learning models to identify and optimize the segmented contours of brain structures, calculate the brain midline, and process the Region of Interest (ROI), the problem of large errors in traditional manual measurements is solved, and automatic and accurate brain structure measurement is achieved.

CN121280346APending Publication Date: 2026-01-06HUNAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511368212.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-24
Publication Date
2026-01-06

AI Technical Summary

Technical Problem

In traditional medical ultrasound images, the measurement results of brain structures such as the cavum septum pellucidum and the posterior fossa cistern vary greatly, mainly due to the high noise of ultrasound images, blurred boundaries, and reliance on manual annotation by doctors, resulting in large measurement errors.

Method used

A deep learning model was used for automatic measurement and optimization of brain structures. By identifying the segmentation contours of the posterior fossa cistern and cavum septum pellucidum, the geometric midpoint was calculated to fit the brain midline, and ROI region extraction and segmentation morphology optimization were performed. Finally, tolerance analysis was conducted by combining the initial and optimized measurement points to determine the final measurement results.

Benefits of technology

It enables automatic, accurate, and efficient measurement of brain structures in medical ultrasound images, reducing measurement errors and improving measurement accuracy and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121280346A_ABST
    Figure CN121280346A_ABST
Patent Text Reader

Abstract

The invention relates to a brain structure automatic measurement and optimization method based on a medical ultrasonic image, and the method comprises the steps: inputting a to-be-measured ultrasonic image into a deep learning model, and carrying out the recognition of a segmentation contour of a posterior fossa pool and a transparent separation cavity in a brain structure; respectively calculating corresponding geometric midpoints from the segmented contours of the posterior cranial fossa pool and the transparent compartment, and fitting a straight line based on the geometric midpoints to obtain a brain midline representing a brain midaxis; processing the segmented contours of the posterior cranial fossa pool and the transparent compartment based on the midbrain line, and respectively determining initial measurement points of the posterior cranial fossa pool and the transparent compartment; based on the segmentation contours of the posterior fossa pool and the transparent compartment, respectively extracting ROI regions of the posterior fossa pool and the transparent compartment, respectively carrying out segmentation morphological optimization on the ROI regions, and determining optimized measurement points of the posterior fossa pool and the transparent compartment based on the optimized images; the initial measurement point and the optimized measurement point are combined to carry out tolerance analysis, and the final measurement results of the posterior cranial fossa pool and the transparent compartment are respectively determined, so that the measurement error is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of medical image processing technology, and in particular to an automatic measurement and optimization method for brain structure based on medical ultrasound images. Background Technology

[0002] In fetal neurological examinations, the cavum septum pellucidum and posterior fossa cistern are important diagnostic indicators. Measurement of the cavum septum pellucidum (CSP) can be used to diagnose neurological disorders such as corpus callosum dysplasia and hydrocephalus. The width of the posterior fossa cistern (CM) can be used to screen for conditions such as cerebellar dysplasia and Dandy-Walker syndrome. Traditional measurements rely primarily on doctors manually marking measurement points. Due to the high noise and blurred boundaries in ultrasound images, and the varying experience and skill levels of different doctors, measurements of the same structure can differ significantly, resulting in substantial measurement errors. Summary of the Invention

[0003] Therefore, it is necessary to provide a method, apparatus, computer equipment, and storage medium for automatic measurement and optimization of brain structures based on medical ultrasound images that can reduce measurement errors, in order to address the above problems.

[0004] The first aspect of this application provides an automatic measurement and optimization method for brain structure based on medical ultrasound images, including:

[0005] A deep learning model for acquiring ultrasound images of the target brain structure and for brain structure recognition is used; the deep learning model is trained using high-performance computing and parallel computing techniques.

[0006] The ultrasound image to be tested is input into the deep learning model to identify the segmentation contours of the posterior fossa cistern and cavum septum pellucidum in the brain structure;

[0007] From the segmented contours of the posterior fossa cistern and the cavum septum pellucidum, the corresponding geometric midpoints are calculated respectively, and the midline of the brain representing the brain axis is obtained by fitting a straight line based on the geometric midpoints.

[0008] The segmentation contours of the posterior fossa cistern and cavum septum pellucidum were processed based on the brain midline to determine the initial measurement points for the posterior fossa cistern and cavum septum pellucidum, respectively.

[0009] Based on the segmented contours of the posterior fossa cistern and the cavity of septum pellucidum, the ROI regions of the posterior fossa cistern and the cavity of septum pellucidum are extracted respectively;

[0010] The ROI regions of the posterior fossa cistern and the cavity of septum pellucidum were segmented and morphologically optimized, and the optimized measurement points of the posterior fossa cistern and the cavity of septum pellucidum were determined based on the optimized images.

[0011] Tolerance analysis was performed by combining the initial measurement points and the optimized measurement points to determine the final measurement results of the posterior fossa cistern and the cavity septum pellucidum.

[0012] In one embodiment, the corresponding geometric midpoints are calculated from the segmented contours of the posterior fossa cistern and the cavum septum pellucidum, respectively. A straight line representing the brain's central axis is obtained by fitting a straight line based on these geometric midpoints, including:

[0013] The segmentation contours of the posterior cranial fossa cistern and the cavity of septum pellucidum were analyzed separately, and their respective geometric midpoints were calculated.

[0014] By fitting a straight line using the least squares method based on two geometric midpoints, the brain midline, representing the brain's central axis, is obtained.

[0015] In one embodiment, the segmentation contours of the posterior fossa cistern and cavum septum pellucidum are processed based on the brain midline to determine initial measurement points for the posterior fossa cistern and cavum septum pellucidum, respectively, including:

[0016] Based on the slope of the midline of the brain and the midpoint of the segmentation contour of the cavity septum pellucidum, the segmentation contour of the cavity pellucidum is rotated around the midpoint, and the lengths of the segmentation contour of the cavity pellucidum in the horizontal and vertical directions are calculated. The segmentation contour of the cavity pellucidum is fitted with an circumscribed regular rectangle, and the initial measurement points of the cavity pellucidum are determined based on the upper and lower boundaries of the rectangle in the vertical direction.

[0017] Multiple parallel straight lines are generated along the midline of the brain. The intersection points of each straight line with the segmentation contour of the posterior fossa cistern are obtained. The two points with the largest distance between the intersection points are selected as the initial measurement points of the posterior fossa cistern.

[0018] In one embodiment, based on the segmented contours of the posterior fossa cistern and the cavum septum pellucidum, the Regions of Interest (ROIs) of the posterior fossa cistern and the cavum septum pellucidum are extracted, including:

[0019] The ROI region of the transparent cavity is dynamically extracted based on the top, bottom, left, and right boundaries of the circumscribed rectangle of the segmentation contour of the transparent cavity.

[0020] The ROI region of the posterior fossa is dynamically extracted based on the upper, lower, left, and right endpoints of the segmentation contour of the posterior fossa cistern.

[0021] In one embodiment, the ROI regions of the posterior fossa cistern and the cavity of septum pellucidum are segmented and morphologically optimized, and optimized measurement points for the posterior fossa cistern and the cavity of septum pellucidum are determined based on the optimized images, including:

[0022] Gaussian filtering and edge enhancement were applied to the ROI region of the posterior fossa cistern. The processed image was then binarized using Otsu binarization. Based on the binarized image, the optimized measurement points of the posterior fossa cistern were determined.

[0023] The ROI region of the transparent cavity is filtered and enhanced, and the processed image is binarized using Otsu. Based on the binarized image, the optimized measurement points of the transparent cavity are determined.

[0024] In one embodiment, Gaussian filtering and edge enhancement are applied to the ROI region of the posterior fossa cistern, and Otsu binarization is performed on the processed image. Based on the binarized image, optimized measurement points of the posterior fossa cistern are determined, including:

[0025] The ROI region of the posterior fossa cistern was processed using a combination of Gaussian filtering and edge enhancement. The processed image was then binarized using the Otsu thresholding method to obtain the binarized image.

[0026] The binarized image is merged with the segmented contour of the posterior fossa cistern, the maximum inner contour is found and smoothed, and the intersection of the brain midline and the maximum inner contour is calculated to obtain the optimized measurement point.

[0027] In one embodiment, the ROI region of the transparent cavity is filtered and image enhanced, the processed image is Otsu binarized, and the optimized measurement points of the transparent cavity are determined based on the binarized image, including:

[0028] The ROI region of the transparent cavity is processed by bilateral filtering combined with unsharpened mask. The gray values ​​of the processed image are binarized using the Otsu thresholding method. Then, the binarized image is dilated to obtain the dilated image.

[0029] The contours of all transparent cavities are obtained from the dilated image. The maximum inner contour is found and smoothed to obtain the final contour. The intersection of the final contour with the line connecting the two initial measurement points of the transparent cavity is obtained to obtain the optimized measurement points.

[0030] In one embodiment, obtaining a deep learning model for brain structure recognition includes:

[0031] Training data for standard cross-sections of brain structure and an initial deep learning model are obtained; the initial deep learning model is either a Solov2 model or a YOLOv8 model.

[0032] The training data is divided into multiple subsets and distributed to GPUs on different computing nodes for processing;

[0033] The gradient values ​​calculated by the GPUs of each computing node are aggregated to update the model parameters of the initial deep learning model, resulting in a deep learning model for brain structure recognition.

[0034] In one embodiment, the deep learning model is trained using a two-stage segmentation network structure, with an enhanced attention mechanism for key structures added to the network head, and a loss function constructed for the key structures. The deep learning model is trained using mixed precision single-precision and half-precision floating-point numbers, coordinates the numerous stream processors and threads of the GPU by constructing a kernel function, optimizes the data access path using shared memory technology, and performs thread and block-level scheduling optimization.

[0035] A second aspect of this application provides an automatic measurement and optimization device for brain structure based on medical ultrasound images, comprising:

[0036] The data acquisition module is used to acquire the ultrasound image to be tested, as well as a deep learning model for brain structure recognition; the deep learning model is trained using high-performance computing and parallel computing technologies.

[0037] The image recognition module is used to input the ultrasound image to be tested into the deep learning model to identify the segmentation contours of the posterior cranial fossa cistern and cavum septum pellucidum in the brain structure;

[0038] The contour analysis module is used to calculate the corresponding geometric midpoints from the segmented contours of the posterior fossa cistern and the cavum septum pellucidum, and to obtain the brain midline representing the brain axis by fitting a straight line based on the geometric midpoints.

[0039] The data processing module is used to process the segmentation contours of the posterior fossa cistern and the cavum septum pellucidum based on the midline of the brain, and to determine the initial measurement points of the posterior fossa cistern and the cavum septum pellucidum, respectively.

[0040] The contour segmentation module is used to segment contours based on the posterior fossa cistern and the cavity of septum pellucidum, and extract the ROI regions of the posterior fossa cistern and the cavity of septum pellucidum, respectively.

[0041] The measurement optimization module is used to perform segmentation morphological optimization on the ROI regions of the posterior fossa cistern and the cavity of septum pellucidum, and to determine the optimized measurement points of the posterior fossa cistern and the cavity of septum pellucidum based on the optimized images.

[0042] The tolerance analysis module is used to perform tolerance analysis by combining the initial measurement points and the optimized measurement points to determine the final measurement results of the posterior fossa cistern and the septum pellucidum, respectively.

[0043] A third aspect of this application provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the above-described method.

[0044] A fourth aspect of this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the above-described method.

[0045] A fifth aspect of this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the above-described method.

[0046] The aforementioned method, apparatus, computer equipment, storage medium, and computer program product for automatic measurement and optimization of brain structures based on medical ultrasound images acquire the ultrasound image to be measured and a deep learning model for brain structure recognition; input the ultrasound image to be measured into the deep learning model to identify the segmentation contours of the posterior fossa cistern and cavum septum pellucidum in the brain structures; calculate the corresponding geometric midpoints from the segmentation contours of the posterior fossa cistern and cavum septum pellucidum, and obtain the brain midline representing the brain axis by fitting a straight line based on the geometric midpoints; process the segmentation contours of the posterior fossa cistern and cavum septum pellucidum based on the brain midline to determine the initial measurement points of the posterior fossa cistern and cavum septum pellucidum respectively; extract the Regions of Interest (ROIs) of the posterior fossa cistern and cavum septum pellucidum respectively based on the segmentation contours of the posterior fossa cistern and cavum septum pellucidum; perform segmentation morphological optimization on the ROIs of the posterior fossa cistern and cavum septum pellucidum respectively, and determine the optimized measurement points of the posterior fossa cistern and cavum septum pellucidum based on the optimized images; and perform tolerance analysis by combining the initial measurement points and the optimized measurement points to determine the final measurement results of the posterior fossa cistern and cavum septum pellucidum respectively. After identifying the segmentation contours of the posterior fossa cistern and cavum septum pellucidum using a deep learning model, the midline of the brain, representing the brain's central axis, is calculated as a reference benchmark for measurement. The segmentation contours of the posterior fossa cistern and cavum septum pellucidum are processed to determine initial measurement points. Then, the ROI regions of the posterior fossa cistern and cavum septum pellucidum are extracted and segmentation morphology is optimized to determine the optimized measurement points. Tolerance analysis is performed on the measurement points before and after optimization to determine the final measurement results. This achieves accurate and efficient automatic measurement and optimization of brain structures, reducing measurement errors. Attached Figure Description

[0047] Figure 1 This is a flowchart of an automatic measurement and optimization method for brain structure based on medical ultrasound images in one embodiment;

[0048] Figure 2 This is a schematic diagram showing the segmented outline of the posterior fossa cistern and the cavity septum pellucidum in one embodiment;

[0049] Figure 3 This is a schematic diagram of the brain midline calculated in one embodiment;

[0050] Figure 4 This is a schematic diagram of the ROI region after the transparent cavity has been extracted in one embodiment;

[0051] Figure 5 This is a binarized image of the transparent cavity calculated by Otsu in one embodiment;

[0052] Figure 6 This is a schematic diagram comparing measurement points before and after optimization of the transparent cavity in one embodiment;

[0053] Figure 7 This is a schematic diagram comparing measurement points before and after optimization of the transparent cavity in another embodiment;

[0054] Figure 8 This is a binarized image of the posterior fossa cistern calculated by Otsu in one embodiment;

[0055] Figure 9 This is a schematic diagram comparing measurement points before and after optimization of the posterior cranial fossa cistern in one embodiment.

[0056] Figure 10 This is a schematic diagram comparing measurement points before and after optimization of the posterior cranial fossa cistern in another embodiment;

[0057] Figure 11 This is a structural block diagram of an automatic brain structure measurement and optimization device based on medical ultrasound images in one embodiment;

[0058] Figure 12 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0059] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0060] In one embodiment, such as Figure 1 As shown, an automatic measurement and optimization method for brain structure based on medical ultrasound images is provided, including:

[0061] Step S110: Acquire the ultrasound image to be tested and the deep learning model for brain structure recognition.

[0062] Specifically, the ultrasound images to be tested can be fetal medical ultrasound images from prenatal ultrasound examinations. Ultrasound examinations can clearly display images of various fetal organs, which is of great significance for clarifying malformation diagnoses and reducing the birth rate of defective fetuses. The deep learning model is trained using high-performance computing and parallel computing techniques. By incorporating high-performance computing and parallel computing techniques, training efficiency and model deployment performance are improved. Based on the processing requirements of fetal ultrasound images, the image recognition and segmentation algorithms are reconstructed to adapt to the parallel processing characteristics of GPU architecture.

[0063] Furthermore, the deep learning model is trained using a two-stage segmentation network structure. An attention mechanism to enhance focus on key structures (such as coronal and sagittal sections of the brain) is added to the network head, and a loss function is constructed. During model training, the two-stage segmentation network structure is used to improve the model's ability to perceive features of key structural regions. Simultaneously, a customized loss function is designed to address the differences in feature distribution across different sections, enhancing the model's ability to focus on important anatomical structures and effectively improving the accuracy of section recognition and segmentation. The introduction of an attention mechanism emphasizes the importance of key structures, meaning the model prioritizes relevant important areas. In addition, a loss function designed for key structures ensures that the model pays more attention to different components of brain structures during training.

[0064] In one embodiment, step S110 of obtaining a deep learning model for brain structure recognition includes: obtaining training data of standard cross-sections of brain structure and an initial deep learning model; dividing the training data into multiple subsets and distributing them to GPUs of different computing nodes for processing; and summarizing the gradient values ​​calculated by the GPUs of each computing node to update the model parameters of the initial deep learning model, thereby obtaining a deep learning model for brain structure recognition.

[0065] The initial deep learning model is a Solov2 model, a YOLOv8 model, or another type of model. The training data, consisting of standard cross-sections of brain structures, is labeled and used for model training. The labels can include information such as the size and location of different brain structures. During training, the training data is divided into multiple subsets and distributed to different GPUs on different computing nodes for processing. Each GPU computes the gradient of its subset of data, and then the gradients are aggregated to update the model parameters. This method significantly improves training speed. Training multiple copies of the model simultaneously on multiple GPUs, independently processing different data subsets and aggregating gradients, effectively improves training speed and model convergence efficiency.

[0066] Furthermore, deep learning models employ mixed-precision training, combining single-precision and half-precision floating-point numbers. This mixed-precision training technique reduces memory usage and accelerates computation. Specifically, mixed-precision training utilizes FP16 and FP32 mixed-precision calculations, reducing GPU memory overhead and increasing computation speed, significantly improving training performance, especially while maintaining model precision.

[0067] Deep learning models also coordinate the numerous stream processors and threads of the GPU through the construction of kernel functions, unleashing the potential of parallel computing. They employ shared memory technology to optimize data access paths, effectively alleviating data transmission bottlenecks and improving the smoothness and efficiency of data processing. Furthermore, they perform thread and block-level scheduling optimizations. Specifically, based on model algorithm and structure optimization, fine-grained optimizations of the GPU's underlying computation are further performed using CUDA programming techniques to maximize hardware resource utilization efficiency.

[0068] Efficient Kernel Function Design: By combining the GPU thread block structure, the kernel function scheduling logic and kernel execution path are optimized to improve the throughput of a single computing module.

[0069] Memory access optimization: Techniques such as shared memory, register reuse, and memory alignment are used to reduce GPU global memory access latency and lower bandwidth bottlenecks.

[0070] Thread and block granular scheduling optimization: Reasonably set the thread block size and grid structure to reduce idle and synchronization overhead between threads and improve parallel efficiency.

[0071] Step S120: Input the ultrasound image to be tested into the deep learning model to identify the segmentation contours of the posterior cranial fossa cistern and cavum septum pellucidum in the brain structure.

[0072] After training to obtain a deep learning model, the ultrasound image to be tested is input into the deep learning model, which can obtain the segmentation contours of the posterior fossa cistern and cavum septum pellucidum in brain structures. Specifically, the ultrasound image to be tested is divided into multiple image blocks, and multiple image blocks are computed in parallel by GPUs on different computing nodes, which can automatically identify the segmentation contours of the posterior fossa cistern and cavum septum pellucidum in brain structures. Figure 2 The diagram shows the segmented outlines of the posterior cranial fossa cistern and cavum septum pellucidum, as marked in the brain structures.

[0073] Step S130: Calculate the corresponding geometric midpoints from the segmented contours of the posterior fossa cistern and the cavum septum pellucidum, and fit a straight line based on these geometric midpoints to obtain the brain midline representing the brain's central axis. Specifically, analyze the segmented contours of the posterior fossa cistern and the cavum septum pellucidum separately, and calculate their respective geometric midpoints; fit a straight line based on the two geometric midpoints using the least squares method to obtain the brain midline representing the brain's central axis.

[0074] From the segmented contours of the posterior fossa cistern and cavum septum pellucidum, geometric analysis is first performed on the image to calculate their respective geometric midpoints. Then, based on these two geometric midpoints, a straight line is fitted using the least squares method to obtain a midline representing the brain's central axis, as shown below. Figure 3 The red line shown is the brain midline. This midline serves as a benchmark for subsequent measurements and effectively reduces errors caused by ambiguity in other anatomical structures.

[0075] Step S140: Process the segmentation contours of the posterior fossa cistern and cavum septum pellucidum based on the brain midline to determine the initial measurement points of the posterior fossa cistern and cavum septum pellucidum, respectively.

[0076] For the cavum septum pellucidum, the segmentation contour of the cavum pellucidum can be rotated around its midpoint based on the slope of the brain midline and the midpoint of the contour. The lengths of the segmentation contour in the horizontal and vertical directions are calculated, and a circumscribed regular rectangle is fitted to the contour. The initial measurement points of the cavum pellucidum are determined based on the upper and lower vertical boundaries of the rectangle. For the posterior fossa cistern, multiple parallel straight lines can be generated along the brain midline. The intersection points of each line with the segmentation contour of the posterior fossa cistern are obtained, and the two points with the largest distance between the intersection points are selected as the initial measurement points of the posterior fossa cistern.

[0077] Step S150: Based on the segmentation contours of the posterior fossa cistern and the cavum septum pellucidum, the Regions of Interest (ROIs) for both are extracted. Specifically, for the cavum pellucidum, the ROI is dynamically extracted based on the top, bottom, left, and right boundaries of the circumscribed rectangle of the segmentation contour. For the posterior fossa cistern, the ROI is dynamically extracted based on the top, bottom, left, and right endpoints of the segmentation contour.

[0078] Step S160: Perform segmentation morphological optimization on the ROI regions of the posterior fossa cistern and the cavity of septum pellucidum, respectively, and determine the optimized measurement points of the posterior fossa cistern and the cavity of septum pellucidum based on the optimized images.

[0079] The process involves applying Gaussian filtering and edge enhancement to the Region of Interest (ROI) of the posterior fossa cistern, followed by Otsu binarization of the processed image. Optimized measurement points for the posterior fossa cistern are then determined based on the binarized image. Specifically, a combination of Gaussian filtering and edge enhancement is used to process the ROI of the posterior fossa cistern. The processed image is then binarized using the Otsu thresholding method to obtain the binarized image. This binarized image is then merged with the segmented contour of the posterior fossa cistern, the maximum inner contour is found and smoothed, and the intersection of the brain midline and the maximum inner contour is calculated to obtain the optimized measurement points.

[0080] Furthermore, filtering and image enhancement are performed on the ROI region of the transparent cavity. The processed image is then binarized using Otsu's algorithm. Based on the binarized image, the optimized measurement points of the transparent cavity are determined. A bilateral filtering method combined with an unsharpened mask can be used to process the ROI region of the transparent cavity. The processed image is then binarized using Otsu's thresholding method, followed by dilation processing to obtain the dilated image. The contours of all transparent cavities are obtained from the dilated image. The contour with the largest inner edge is found and smoothed to obtain the final contour. The intersection of the final contour with the line connecting the two initial measurement points of the transparent cavity is then obtained, yielding the optimized measurement points.

[0081] Step S170: Perform tolerance analysis by combining the initial measurement points and the optimized measurement points to determine the final measurement results of the posterior fossa cistern and the cavity septum pellucidum, respectively.

[0082] After obtaining the optimized measurement points for the posterior fossa cistern and cavum septum pellucidum, a tolerance analysis is performed by combining the initial and optimized measurement points for the posterior fossa cistern. If the difference between the two exceeds a preset threshold, the initial measurement point is taken as the final measurement result for the posterior fossa cistern; otherwise, the optimized measurement point is taken as the final measurement result. Similarly, for the cavum septum pellucidum, a tolerance analysis is performed by combining the initial and optimized measurement points. If the difference between the two exceeds a set threshold, the initial measurement point is taken as the final measurement result for the cavum septum pellucidum; otherwise, the optimized measurement point is taken as the final measurement result.

[0083] Specifically, the measurement and optimization of the transparent cavity includes the following steps:

[0084] 1. Contour Extraction and Measurement: Based on the deep learning model, the segmented contour of the septum pellucidum is obtained. Using the slope of the midline of the brain and the midpoint of the segmented region of the septum pellucidum, the segmented contour is rotated around its midpoint. The lengths of the segmented contour in the horizontal and vertical directions are calculated. Then, a circumscribed regular rectangle is fitted to the contour, and the initial measurement points of the septum pellucidum are determined based on the upper and lower vertical boundaries of the rectangle.

[0085] 2. Dynamic ROI Region Extraction: Based on the top, bottom, left, and right boundaries of the circumscribed rectangle of the segmented contour, the ROI region of the transparent cavity is calculated and dynamically extracted, such as... Figure 4 As shown.

[0086] 3. Filtering and Image Enhancement: The image of the ROI region is processed by bilateral filtering combined with unsharpened mask. This method enhances the structural edges of the posterior fossa cistern while denoising, thereby improving the accuracy of subsequent binarization and contour detection.

[0087] 4. Otsu Binarization and Dilation: For the image after filtering and image enhancement, the Otsu thresholding method is used to calculate the threshold within the ROI region. Then, the image is binarized based on this threshold to obtain a binarized image. For the measurement of the septum pellucidum, due to the differences in brightness and contrast between different ultrasound images, the final threshold is determined to be 1.1 times the threshold calculated by the Otsu method. Then, the binarized image is dilated once, with a dilation kernel of 3×3. Figure 5 The image shown is the binarized image after Otsu's calculation.

[0088] 5. Edge Measurement Point Optimization: Based on the binarized and dilated images, obtain the contours of all transparent cavity regions, find the maximum inner contour, and smooth this contour to obtain the final contour. Then, fit a straight line based on two initial measurement points, find the intersection points of this line and the final contour, and use the two intersection points as the optimized measurement points. Figure 6 and Figure 7 The image shows a comparison between the initial measurement point (left) and the optimized measurement point (right). Based on the minimum bounding rectangle, the upper and lower measurement points of the transparent cavity can be accurately optimized.

[0089] 6. Tolerance Analysis: Set a threshold and determine whether to use the optimized measurement point based on the difference between the optimized point and the unoptimized point. If the difference between the two points exceeds the threshold, the initial measurement point is used; otherwise, the optimized measurement point is used.

[0090] The measurement and optimization of the posterior cranial fossa cistern includes the following steps:

[0091] 1. Initial measurement points are obtained using the maximum parallel distance method based on the brain midline: Based on the previously obtained brain midline, multiple parallel straight lines are generated along the brain midline in the selected posterior fossa cistern segmentation contour. The intersection points of each straight line with the posterior fossa cistern contour are calculated. The two points with the largest distance between the intersection points are selected as the measurement endpoints of the posterior fossa cistern, thus obtaining the initial measurement points.

[0092] 2. Dynamic ROI region extraction: Based on the upper, lower and left, and right endpoints of the posterior fossa cistern outline, the ROI region of the posterior fossa cistern structure is dynamically extracted.

[0093] 3. Gaussian filtering and edge enhancement: A combination of Gaussian filtering (kernel size 5*5) and edge enhancement (using the Laplacian operator) is used to process the cropped ROI region. The purpose is to reduce noise interference while enhancing the clarity of the edges, which facilitates subsequent Otsu binarization.

[0094] 4. Otsu Binarization: The processed image is binarized to grayscale values, and Otsu's thresholding method is used for image segmentation. A binary mask is generated. Experimentally, the final threshold was determined to be 1.2 times the threshold calculated using Otsu's method. Figure 8 The image shown is the segmented region image after Otsu binarization.

[0095] 5. Optimization of measurement points: The Otsu-binded image is merged with the segmented contour of the posterior fossa cistern. The largest inner contour is found and smoothed. The intersection of the brain midline and this contour is calculated, which is the optimized measurement point.

[0096] 6. Tolerance Analysis: Based on the pre-set tolerance ratio, calculate the error between the optimized measurement point and the initial measurement point. If the distance between the optimized measurement point and the initial measurement point is within a reasonable range, the optimized measurement point is accepted; otherwise, the initial measurement point is used. Figure 9 and Figure 10 The image shows a comparison between the initial measurement point (left) and the optimized measurement point (right). The measurement points in the posterior fossa cistern can be accurately optimized based on the maximum distance method parallel to the brain midline.

[0097] The aforementioned automatic measurement and optimization method for brain structures based on medical ultrasound images employs deep learning segmentation, edge detection, segmentation morphology optimization, and geometric fitting techniques. Segmentation morphology optimization utilizes Otsu binarization and edge detection to enhance the contour of the measurement region, and morphological dilation to improve the stability of boundary detection. ROI region segmentation and contour smoothing are used to automatically optimize measurement points. This method enables automatic measurement of target structures in medical ultrasound images, improving measurement accuracy, robustness, and automation.

[0098] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0099] Based on the same inventive concept, this application also provides an automatic measurement and optimization device for brain structure based on medical ultrasound images for implementing the above-mentioned automatic measurement and optimization method for brain structure based on medical ultrasound images. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more embodiments of the automatic measurement and optimization device for brain structure based on medical ultrasound images provided below can be found in the limitations of the automatic measurement and optimization method for brain structure based on medical ultrasound images described above, and will not be repeated here.

[0100] In one embodiment, such as Figure 11 As shown, an automatic measurement and optimization device for brain structure based on medical ultrasound images is also provided, including: a data acquisition module 110, an image recognition module 120, a contour analysis module 130, a data processing module 140, a contour segmentation module 150, a measurement optimization module 160, and a tolerance analysis module 170, wherein:

[0101] The data acquisition module 110 is used to acquire the ultrasound image to be tested and the deep learning model for brain structure recognition; the deep learning model is trained through high-performance computing and parallel computing technology.

[0102] The image recognition module 120 is used to input the ultrasound image to be tested into the deep learning model to identify the segmentation contours of the posterior cranial fossa cistern and cavum septum pellucidum in the brain structure.

[0103] The contour analysis module 130 is used to calculate the corresponding geometric midpoints from the segmented contours of the posterior fossa cistern and the cavum septum pellucidum, and to obtain the brain midline representing the brain axis by fitting a straight line based on the geometric midpoints.

[0104] The data processing module 140 is used to process the segmentation contours of the posterior fossa cistern and the cavum septum pellucidum based on the brain midline, and to determine the initial measurement points of the posterior fossa cistern and the cavum septum pellucidum, respectively.

[0105] The contour segmentation module 150 is used to segment contours based on the posterior fossa cistern and the septum pellucidum, and extract the ROI regions of the posterior fossa cistern and the septum pellucidum, respectively.

[0106] The measurement optimization module 160 is used to perform segmentation morphological optimization on the ROI regions of the posterior fossa cistern and the cavity of septum pellucidum, respectively, and to determine the optimized measurement points of the posterior fossa cistern and the cavity of septum pellucidum based on the optimized images.

[0107] The tolerance analysis module 170 is used to perform tolerance analysis by combining the initial measurement points and the optimized measurement points to determine the final measurement results of the posterior fossa cistern and the cavity septum pellucidum, respectively.

[0108] In one embodiment, the data acquisition module 110 acquires training data of standard cross-sections of brain structures and an initial deep learning model; the initial deep learning model is a Solov2 model or a YOLOv8 model; the training data is divided into multiple subsets and distributed to GPUs of different computing nodes for processing; the gradient values ​​calculated by the GPUs of each computing node are aggregated to update the model parameters of the initial deep learning model, thereby obtaining a deep learning model for brain structure recognition.

[0109] In one embodiment, the contour analysis module 130 analyzes the segmented contours of the posterior fossa cistern and the cavum septum pellucidum, respectively, and calculates their respective geometric midpoints; based on the two geometric midpoints, a straight line is fitted using the least squares method to obtain the brain midline representing the brain axis.

[0110] In one embodiment, the data processing module 140, based on the slope of the midline of the brain and the midpoint of the segmentation contour of the septum pellucidum, rotates the segmentation contour of the septum pellucidum around its midpoint, calculates the length of the segmentation contour of the septum pellucidum in the horizontal and vertical directions, performs circumscribed regular rectangle fitting on the segmentation contour of the septum pellucidum, determines the initial measurement points of the septum pellucidum based on the upper and lower boundaries of the rectangle in the vertical direction, generates multiple parallel straight lines along the direction of the midline of the brain, obtains the intersection points of each straight line with the segmentation contour of the posterior fossa cistern, and selects the two points with the largest distance between the intersection points as the initial measurement points of the posterior fossa cistern.

[0111] In one embodiment, the contour segmentation module 150 dynamically extracts the ROI region of the septum pellucidum based on the top, bottom, left, and right boundaries of the circumscribed rectangle of the segmentation contour of the septum pellucidum; and dynamically extracts the ROI region of the posterior fossa cisterns based on the top, bottom, left, and right endpoints of the segmentation contour of the posterior fossa cisterns.

[0112] In one embodiment, the measurement optimization module 160 performs Gaussian filtering and edge enhancement on the ROI region of the posterior fossa cistern, performs Otsu binarization on the processed image, and determines the optimized measurement points of the posterior fossa cistern based on the binarized image; it also performs filtering and image enhancement on the ROI region of the septum pellucidum, performs Otsu binarization on the processed image, and determines the optimized measurement points of the septum pellucidum based on the binarized image.

[0113] In one embodiment, the measurement optimization module 160 uses a combination of Gaussian filtering and edge enhancement to process the ROI region of the posterior fossa cistern. The processed image is then binarized using the Otsu thresholding method to obtain a binarized image. The binarized image is then merged with the segmented contour of the posterior fossa cistern, the maximum inner contour is found and smoothed, and the intersection of the brain midline and the maximum inner contour is calculated to obtain the optimized measurement point.

[0114] In one embodiment, the measurement optimization module 160 uses bilateral filtering combined with an unsharpened mask to process the ROI region of the transparent cavity. The processed image is binarized using the Otsu thresholding method, and then the binarized image is dilated to obtain the dilated image. The contours of all transparent cavities are obtained based on the dilated image. The maximum inner contour is found and smoothed to obtain the final contour. The intersection of the final contour and the line connecting the two initial measurement points of the transparent cavity is obtained to obtain the optimized measurement point.

[0115] The modules in the aforementioned automatic brain structure measurement and optimization device based on medical ultrasound images can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the corresponding operations of each module.

[0116] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 12 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements an automatic measurement and optimization method for brain structure based on medical ultrasound images. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0117] Those skilled in the art will understand that Figure 12The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0118] In one embodiment, a computer device is also provided. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method described above.

[0119] In one embodiment, a computer-readable storage medium is also provided. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the above-described method.

[0120] In one embodiment, a computer program product is also provided. The computer program product includes a computer program that, when executed by a processor, implements the steps of the method described above.

[0121] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0122] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0123] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for automatic measurement and optimization of brain structures based on medical ultrasound images, characterized in that, The application relates to a method for measuring the posterior fossa pool and the septum pellucidum cavity in an ultrasound image, comprising the following steps: obtaining an ultrasound image to be measured and a deep learning model for recognizing brain structures; the deep learning model is obtained by high-performance computing and parallel computing technology; inputting the ultrasound image to be measured into the deep learning model to recognize and obtain the segmentation contour of the posterior fossa pool and the septum pellucidum cavity in the brain structure; calculating the corresponding geometric midpoints from the segmentation contour of the posterior fossa pool and the septum pellucidum cavity, fitting a straight line based on the geometric midpoints to obtain the brain midline representing the central axis of the brain; processing the segmentation contour of the posterior fossa pool and the septum pellucidum cavity based on the brain midline to determine the initial measurement points of the posterior fossa pool and the septum pellucidum cavity respectively; extracting the ROI regions of the posterior fossa pool and the septum pellucidum cavity based on the segmentation contour of the posterior fossa pool and the septum pellucidum cavity respectively; performing segmentation and morphological optimization on the ROI regions of the posterior fossa pool and the septum pellucidum cavity respectively, and determining the optimized measurement points of the posterior fossa pool and the septum pellucidum cavity based on the optimized images; performing tolerance analysis on the initial measurement points and the optimized measurement points to determine the final measurement results of the posterior fossa pool and the septum pellucidum cavity respectively.

2. The method of claim 1, wherein, calculating the corresponding geometric midpoints from the segmentation contour of the posterior fossa pool and the septum pellucidum cavity, fitting a straight line based on the geometric midpoints to obtain the brain midline representing the central axis of the brain, comprising the following steps: analyzing the segmentation contour of the posterior fossa pool and the septum pellucidum cavity respectively, and calculating the geometric midpoints of the two respectively; fitting a straight line based on the two geometric midpoints by using the least square method to obtain the brain midline representing the central axis of the brain.

3. The method of claim 1, wherein, processing the segmentation contour of the posterior fossa pool and the septum pellucidum cavity based on the brain midline to determine the initial measurement points of the posterior fossa pool and the septum pellucidum cavity respectively, comprising the following steps: rotating the segmentation contour of the septum pellucidum cavity around the midpoint of the segmentation contour of the septum pellucidum cavity based on the slope of the brain midline and the midpoint of the segmentation contour of the septum pellucidum cavity, calculating the length of the segmentation contour of the septum pellucidum cavity in the horizontal and vertical directions, performing circumscribed rectangle fitting on the segmentation contour of the septum pellucidum cavity, and determining the initial measurement points of the septum pellucidum cavity according to the upper and lower boundaries of the rectangle in the vertical direction; generating a plurality of parallel straight lines along the direction of the brain midline, obtaining the intersection points of the straight lines and the segmentation contour of the posterior fossa pool, and selecting the two points with the maximum distance between the intersection points as the initial measurement points of the posterior fossa pool.

4. The method of claim 3, wherein, extracting the ROI regions of the posterior fossa pool and the septum pellucidum cavity based on the segmentation contour of the posterior fossa pool and the septum pellucidum cavity respectively, comprising the following steps: dynamically intercepting the ROI region of the septum pellucidum cavity according to the upper and lower and left and right boundaries of the circumscribed rectangle of the segmentation contour of the septum pellucidum cavity; dynamically intercepting the ROI region of the posterior fossa pool according to the upper and lower and left and right endpoints of the segmentation contour of the posterior fossa pool.

5. The method of claim 1, wherein, performing segmentation and morphological optimization on the ROI regions of the posterior fossa pool and the septum pellucidum cavity respectively, and determining the optimized measurement points of the posterior fossa pool and the septum pellucidum cavity based on the optimized images, comprising the following steps: performing Gaussian filtering and edge enhancement on the ROI region of the posterior fossa pool, performing Otsu binarization on the processed image, and determining the optimized measurement points of the posterior fossa pool based on the binarized image; performing filtering and image enhancement on the ROI region of the septum pellucidum cavity, performing Otsu binarization on the processed image, and determining the optimized measurement points of the septum pellucidum cavity based on the binarized image.

6. The method of claim 5, wherein, The ROI region of the posterior fossa pool is subjected to Gaussian filtering and edge enhancement, and the processed image is subjected to Otsu binarization, and the optimized measurement points of the posterior fossa pool are determined based on the binarized image, including: The ROI region of the posterior fossa pool is subjected to Gaussian filtering and edge enhancement, and the processed image is subjected to Otsu binarization, and the optimized measurement points of the posterior fossa pool are determined based on the binarized image, including: The binarized image is combined with the segmentation contour of the posterior fossa pool, the maximum inner contour is found and smoothed, the intersection of the brain midline and the maximum inner contour is calculated, and the optimized measurement points are obtained.

7. The method of claim 5, wherein, The ROI region of the septum pellucidum cavity is subjected to filtering and image enhancement, and the processed image is subjected to Otsu binarization, and the optimized measurement points of the septum pellucidum cavity are determined based on the binarized image, including: The ROI region of the septum pellucidum cavity is subjected to filtering and image enhancement, and the processed image is subjected to Otsu binarization, and the optimized measurement points of the septum pellucidum cavity are determined based on the binarized image, including: The binarized image is combined with the segmentation contour of the posterior fossa pool, the maximum inner contour is found and smoothed, the intersection of the brain midline and the maximum inner contour is calculated, and the optimized measurement points are obtained.

8. The method according to any one of claims 1 to 7, characterized in that, A deep learning model for brain structure recognition is obtained, including: Obtain training data of brain structure standard section and initial deep learning model; the initial deep learning model is solov2 model or yolov8 model; The training data is divided into multiple subsets and distributed to different computing nodes for processing; The gradient values calculated by the GPUs of each computing node are summarized to update the model parameters of the initial deep learning model to obtain the deep learning model for brain structure recognition.

9. The method of claim 8, wherein, The deep learning model is trained using a two-stage segmentation network structure, an attention mechanism for key structures is added to the network head, and a loss function is constructed for key structures; the deep learning model uses single-precision and half-precision floating-point numbers for mixed-precision training, coordinates the numerous stream processors and threads of the GPU by constructing a Kernel function, optimizes the data access path using shared memory technology, and performs thread and block granularity scheduling optimization.

10. An apparatus for automatic measurement and optimization of brain structures based on medical ultrasound images, characterized by, Including: A data acquisition module for obtaining a to-be-tested ultrasound image and a deep learning model for brain structure recognition; The deep learning model is trained by high-performance computing and parallel computing technology; An image recognition module for inputting the to-be-tested ultrasound image into the deep learning model to recognize the segmentation contour of the posterior fossa pool and the septum pellucidum cavity in the brain structure; A contour analysis module for calculating the corresponding geometric center from the segmentation contour of the posterior fossa pool and the septum pellucidum cavity, and fitting a straight line based on the geometric center to obtain a brain midline representing the brain axis; A data processing module for processing the segmentation contour of the posterior fossa pool and the septum pellucidum cavity based on the brain midline to determine the initial measurement points of the posterior fossa pool and the septum pellucidum cavity; The contour segmentation module is configured to extract ROI regions of the posterior fossa pool and the cavum septi pellucidi based on segmentation contours of the posterior fossa pool and the cavum septi pellucidi, respectively. The measurement optimization module is configured to perform segmentation morphological optimization on the ROI regions of the posterior fossa pool and the cavum septi pellucidi, respectively, and determine optimized measurement points of the posterior fossa pool and the cavum septi pellucidi based on the optimized images. The tolerance analysis module is configured to perform tolerance analysis on the initial measurement points and the optimized measurement points, and determine final measurement results of the posterior fossa pool and the cavum septi pellucidi, respectively.