Thymus index measurement method and device, equipment and storage medium

By applying deep learning segmentation algorithm in chest CT images, the rapid and accurate measurement of thymus indicators is achieved, and the problem of time-consuming and error-prone manual measurement in the prior art is solved, and the measurement efficiency and accuracy are improved.

CN120070324APending Publication Date: 2025-05-30BEIJING WANDONG MEDICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510008577.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-03
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

When measuring thymus indicators, the prior art relies on the subjective judgment of the radiologist. Manual segmentation and measurement are time-consuming and prone to errors. The results are greatly affected by the doctor's experience and fatigue.

Method used

Using deep learning segmentation and intelligent measurement algorithm based on CT images, through a two-stage segmentation strategy, the chest image is first roughly segmented, the area of ​​interest containing the thymus is extracted, and then the area of ​​interest is subdivided to realize automatic measurement of thymus indexes.

Benefits of technology

It realizes rapid and accurate measurement of thymus indicators, improves measurement speed and accuracy, reduces errors in manual operation, and is suitable for immune health assessment and diagnosis of immune-related diseases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070324A_ABST
    Figure CN120070324A_ABST
Patent Text Reader

Abstract

The invention relates to a thymus index measuring method and device, equipment and a storage medium. According to the scheme, when each index is measured, firstly, the chest image is obtained, the chest image is subjected to coarse segmentation to obtain the first segmentation result, the region-of-interest containing the thymus is obtained from the first segmentation result, the region-of-interest is subjected to fine segmentation to obtain the second segmentation result, and each thymus index is automatically measured by using the second segmentation result. Therefore, when the chest image is segmented, the chest image is firstly subjected to coarse segmentation, the region-of-interest containing the thymus is extracted, and then the region-of-interest is subjected to fine segmentation, so that a more accurate segmentation result is obtained, and accurate positioning of the thymus boundary is realized; the thymus indexes can be automatically and accurately measured based on the segmentation result, and the measurement speed is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of thymus measurement, and particularly to a method, device, equipment and storage medium for measuring thymus indexes. Background Art

[0002] The thymus is a key gland located in the chest cavity and is mainly responsible for the development and maturation of T cells. In the immune system, T cells play a crucial role and participate in the immune response to foreign pathogens and tumor cells. The function of the thymus is closely related to individual immune health, and its health status often reflects the overall immune capacity of the body. With the increase of age, the thymus gradually atrophies and its function weakens, which may lead to immune system dysfunction and increase the risk of autoimmune diseases and infections. Therefore, understanding the structural and functional status of the thymus has important clinical value for early diagnosis and treatment. In the related art, imaging methods such as CT (Computed Tomography) and MRI (Magnetic Resonance Imaging) are mainly used to obtain the anatomical information of the thymus. However, these methods rely on the subjective judgment of radiologists and require radiologists to manually segment, label and measure the thymus step by step. Manually segmenting and measuring the anatomical parameters of the thymus is both time-consuming and error-prone, and the results are greatly affected by the experience and fatigue degree of doctors.

[0003] Therefore, how to quickly and accurately measure thymus indexes is a problem that needs to be solved by those skilled in the art. Summary of the Invention

[0004] This application provides a method, device, equipment and storage medium for measuring thymus indexes, so as to quickly and accurately measure thymus indexes.

[0005] In the first aspect, this application provides a method for measuring thymus indexes, and the measuring method includes:

[0006] Obtain a chest imaging image;

[0007] Perform rough segmentation on the chest imaging image to obtain a first segmentation result;

[0008] Obtain a region of interest containing the thymus from the first segmentation result;

[0009] Perform fine segmentation on the region of interest to obtain a second segmentation result;

[0010] Automatically measure each thymus index by using the second segmentation result.

[0011] Optionally, automatically measuring each thymus index by using the second segmentation result includes:

[0012] Determine the total number of voxels in the thymus region using the second segmentation result;

[0013] Calculate the thymus volume using the total number of voxels and the volume of a single voxel;

[0014] Calculate the average HU value of the thymus region based on the total number of voxels and the HU value of each voxel.

[0015] Optionally, automatically measure various thymus indices using the second segmentation result, including:

[0016] Determine each slice of the thymus region using the second segmentation result;

[0017] Determine the number of slice voxels for each slice;

[0018] Take the slice with the largest number of slice voxels as the largest thymus slice;

[0019] Determine the largest inscribed circle from the largest thymus slice;

[0020] Calculate the average HU value of the inscribed circle using the HU values of the voxels within the largest inscribed circle.

[0021] Optionally, automatically measure various thymus indices using the second segmentation result, including:

[0022] Determine the X-axis range and vertex coordinates of the thymus region using the second segmentation result;

[0023] Determine the comparison range based on the X-axis range;

[0024] Determine the thymus type based on the X-axis coordinate value of the vertex coordinates and the comparison range;

[0025] If the thymus type is non-conical, adjust the X-axis coordinate value of the vertex coordinates according to the comparison range.

[0026] Optionally, automatically measure various thymus indices using the second segmentation result, including:

[0027] Determine the X-axis range and Y-axis range of the thymus region using the second segmentation result;

[0028] Determine the transverse diameter of the thymus based on the X-axis range and the X-axis pixel pitch;

[0029] Determine the anteroposterior diameter of the thymus based on the Y-axis range and the Y-axis pixel pitch.

[0030] Optionally, automatically measure various thymus indices using the second segmentation result, including:

[0031] Determine the vertex coordinates, left boundary point coordinates, and right boundary point coordinates of the thymus region using the second segmentation result;

[0032] Calculate the length of the left lobe according to the vertex coordinates and the left boundary point coordinates, and calculate the length of the right lobe according to the vertex coordinates and the right boundary point coordinates;

[0033] Determine the base point coordinates using the vertex coordinates; the X-axis coordinate value of the base point coordinates is the X-axis coordinate value of the vertex coordinates, and the Y-axis coordinate value of the base point coordinates is the minimum value of the thymus region on the Y-axis;

[0034] Take the distance value between the base point coordinates and the left lobe line as the left lobe thickness, and take the distance value between the base point and the right lobe line as the right lobe thickness;

[0035] Wherein, the left lobe line is the line between the vertex coordinates and the left boundary point coordinates, and the right lobe line is the line between the vertex coordinates and the right boundary point coordinates.

[0036] Optionally, obtaining the first segmentation result by coarsely segmenting the chest imaging image includes:

[0037] Input the chest imaging image into the first medical image segmentation model, and coarsely segment the chest imaging image through the first medical image segmentation model to obtain the first segmentation result;

[0038] Correspondingly, obtaining the second segmentation result by finely segmenting the region of interest includes:

[0039] Input the region of interest into the second medical image segmentation model, and finely segment the region of interest through the second medical image segmentation model to obtain the second segmentation result;

[0040] Wherein, both the first medical image segmentation model and the second medical image segmentation model are nnUNet models.

[0041] In a second aspect, the present application provides a measurement device for thymus indicators, and the measurement device includes:

[0042] A first acquisition module, configured to acquire a chest imaging image;

[0043] A first segmentation module, configured to coarsely segment the chest imaging image to obtain a first segmentation result;

[0044] A second acquisition module, configured to acquire a region of interest containing the thymus from the first segmentation result;

[0045] A second segmentation module, configured to finely segment the region of interest to obtain a second segmentation result;

[0046] A measurement module for automatically measuring each thymus index by using the second segmentation result.

[0047] In a third aspect, the present application provides an electronic device, including:

[0048] A processor, a memory, and a computer program stored on the memory and executable on the processor, wherein the processor executes the steps of the measurement method of the present application through the computer program.

[0049] In a fourth aspect, the present application further provides a computer storage medium storing computer-executable instructions for executing the steps of the measurement method of the present application.

[0050] The above technical solutions provided by the embodiments of the present application have the following advantages compared with the prior art: The present application provides a measurement solution for thymus indexes. When measuring each index, this solution first obtains a chest image, performs rough segmentation on the chest image to obtain a first segmentation result, obtains a region of interest containing the thymus from the first segmentation result, performs fine segmentation on the region of interest to obtain a second segmentation result, and automatically measures each thymus index by using the second segmentation result. It can be seen that when segmenting the chest image in the present application, after first performing rough segmentation on the chest image, extracting the region of interest containing the thymus, and then performing fine segmentation on the region of interest, a more accurate segmentation result can be obtained, realizing the accurate positioning of the thymus boundary; based on the segmentation result, the present application can automatically and accurately measure each thymus index, improving the measurement speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present invention and used together with the specification to explain the principles of the present invention.

[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for describing the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0053] One or more embodiments are illustrated by the pictures in the corresponding drawings. These illustrative descriptions do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements, unless otherwise stated, and the drawings in the figures do not constitute a proportional limitation.

[0054] Figure 1 It is a schematic flowchart of a measurement method for thymus indexes provided by an embodiment of the present application;

[0055] Figure 2 Schematic flowchart of another method for measuring thymus indexes provided by an embodiment of the present application;

[0056] Figure 3 Schematic flowchart of a measurement method based on chest CT images provided by an embodiment of the present application;

[0057] Figure 4 Schematic flowchart of a two-stage segmentation method provided by an embodiment of the present application;

[0058] Figure 5a Schematic cross-sectional view of manual delineation provided by an embodiment of the present application;

[0059] Figure 5b Schematic coronal view of manual delineation provided by an embodiment of the present application;

[0060] Figure 5c Schematic sagittal view of manual delineation provided by an embodiment of the present application;

[0061] Figure 5d Schematic cross-sectional view of automatic segmentation provided by an embodiment of the present application;

[0062] Figure 5e Schematic coronal view of automatic segmentation provided by an embodiment of the present application;

[0063] Figure 5f Schematic sagittal view of automatic segmentation provided by an embodiment of the present application;

[0064] Figure 6 Schematic diagram of selecting the largest inscribed circle provided by an embodiment of the present application;

[0065] Figure 7 Schematic flowchart of an index measurement method provided by an embodiment of the present application;

[0066] Figure 8a Schematic diagram of manual delineation result provided by an embodiment of the present application;

[0067] Figure 8b Schematic diagram of automatic segmentation result provided by an embodiment of the present application;

[0068] Figure 8c Schematic diagram of automatically measuring various indexes provided by an embodiment of the present application;

[0069] Figure 8d Schematic diagram of inscribed circle selection provided by an embodiment of the present application;

[0070] Figure 9 Schematic structural diagram of a thymus index measurement device provided by an embodiment of the present application;

[0071] Figure 10 A schematic structural diagram of an electronic device provided by an embodiment of the present application. Specific implementation manners

[0072] Currently, when manually splitting and measuring the thymus, there is a large amount of workload, which limits its application efficiency in clinical practice. In addition, it is difficult to guarantee the accuracy and consistency of manual splitting, especially in cases where the thymus structure is complex or the boundary is unclear, which further increases the difficulty of accurately evaluating the thymus.

[0073] Therefore, the embodiments of the present application disclose a method, device, equipment and storage medium for measuring thymus indicators. Through deep learning segmentation and intelligent measurement algorithms based on CT images, rapid and accurate extraction of key indicators such as the volume, density, transverse diameter, anteroposterior diameter, and the lengths and thicknesses of the left and right lobes of the thymus can be achieved, which is used for immune health assessment and the diagnosis of immune-related diseases.

[0074] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0075] The following disclosure provides many different embodiments or examples for implementing different structures of the present invention. To simplify the disclosure of the present invention, the components and settings of specific examples are described below. Of course, they are only examples and are not intended to limit the present invention. In addition, the present invention may repeat reference numerals and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0076] See Figure 1 , a schematic flowchart of a method for measuring thymus indicators provided by an embodiment of the present application. The measurement method includes the following steps:

[0077] S101. Obtain a chest image;

[0078] In the present application, the chest image is an image for measuring thymus indicators, and the chest image can be a CT image or an MRI image, which is not specifically limited herein.

[0079] Before segmenting the chest imaging images in this application, data preprocessing can be performed on the chest imaging images, and this preprocessing includes normalization processing and resampling processing. Among them, when performing normalization processing in this application, the chest imaging images can be processed by Z-score normalization (standard deviation normalization method) to reduce the contrast differences between different images. When performing resampling processing in this application, the images can be resampled to a predetermined standard. For example, the images can be resampled to a unified voxel spacing of 0.715×0.715×1.5mm to ensure that different images are processed at the same resolution.

[0080] S102. Coarsely segment the chest imaging images to obtain a first segmentation result;

[0081] In this application, a two-stage segmentation strategy can be adopted to segment the chest imaging images. For the sake of distinction in this application, the segmentation in the first stage is called coarse segmentation, and the segmentation in the second stage is called fine segmentation. The segmentation models used for coarse segmentation and fine segmentation are of the same type, but the input data and output data are completely different. This application effectively reduces the interference of non-thymus regions through two-step segmentation and improves the segmentation accuracy. When performing coarse segmentation in the first stage of this application, the data input into the segmentation model is the chest imaging images. The segmentation model performs a preliminary segmentation on the chest imaging images, extracts features using a larger convolution stride, and the obtained segmentation result is called the first segmentation result.

[0082] S103. Obtain the region of interest containing the thymus from the first segmentation result;

[0083] The first segmentation result obtained in this application only performs a preliminary segmentation on the thymus region in the chest imaging images. To improve the segmentation effect, this application crops the image based on the first segmentation result and only retains the region of interest (ROI) containing the thymus. The region of interest refers to the area that needs to be processed by outlining it in the form of a square, circle, ellipse, irregular polygon, etc. in image processing. The region of interest in this application is the region containing the thymus in the first segmentation result. By cropping the region of interest containing the thymus in this way, the interference of background noise can be effectively reduced, and the model's attention to the details of the thymus is enhanced.

[0084] S104. Fine-segment the region of interest to obtain a second segmentation result;

[0085] After obtaining the region of interest in this application, the region of interest is used as input data and input into the segmentation model again. The segmentation model performs a re-segmentation on the region of interest, and the obtained segmentation result is the second segmentation result. In this way, the thymus region can be further finely segmented to improve the segmentation accuracy.

[0086] S105. Automatically measure each thymus index using the second segmentation result.

[0087] In the second segmentation result obtained in this application, it includes the final segmentation result of the thymus region. Based on this segmentation result, this application adopts an automated algorithm based on voxel statistics and geometric features to achieve the automatic measurement of each thymus index. In this application, the thymus index includes: indicators such as the volume of the thymus, HU value (measurement unit), maximum slice, transverse diameter, and anteroposterior diameter.

[0088] In summary, when measuring each index in this solution, first obtain the chest imaging image, perform rough segmentation on the chest imaging image to obtain the first segmentation result, obtain the region of interest containing the thymus from this first segmentation result, perform fine segmentation on the region of interest to obtain the second segmentation result, and automatically measure each thymus index using the second segmentation result. It can be seen that when this application performs segmentation on the chest imaging image, after first performing rough segmentation on the chest imaging image, extracting the region of interest containing the thymus, and then performing fine segmentation on the region of interest, a more accurate segmentation result can be obtained, achieving accurate positioning of the thymus boundary; based on the segmentation result, this application can automatically and accurately measure each thymus index, improving the measurement speed.

[0089] See Figure 2 , which is a schematic flowchart of another method for measuring thymus indices provided by an embodiment of this application. This measurement method includes the following steps:

[0090] S201. Obtain a chest imaging image;

[0091] S202. Input the chest imaging image into the first medical image segmentation model, and perform rough segmentation on the chest imaging image through the first medical image segmentation model to obtain the first segmentation result;

[0092] S203. Obtain the region of interest containing the thymus from the first segmentation result;

[0093] S204. Input the region of interest into the second medical image segmentation model, and perform fine segmentation on the region of interest through the second medical image segmentation model to obtain the second segmentation result; wherein, both the first medical image segmentation model and the second medical image segmentation model are nnUNet models;

[0094] S205. Automatically measure each thymus index using the second segmentation result.

[0095] In this application, the nnUNet (Neural Network U-Net) structure of the Thy-uNET model is used to process images. Therefore, both the first medical image segmentation model and the second medical image segmentation model in this application are nnUNet models. The nnUNet model is a deep learning framework for medical image segmentation and is particularly suitable for the segmentation task of multi-modal medical images.

[0096] When this application uses the nnUNet model to segment chest imaging images, it is processed in two stages. In the first stage, the first medical image segmentation model is used to roughly segment the chest imaging images to obtain the first segmentation result. In the second stage, it is also processed based on the nnUNet model. However, in this application, in order to reduce the interference of background noise and enhance the model's attention to thymus details, it is necessary to crop the first segmentation result, focus on the foreground area, and only retain the region of interest containing the thymus. After the second medical image segmentation model processes this region of interest, the second segmentation result is obtained.

[0097] It should be noted that when training the first medical image segmentation model and the second medical image segmentation model in this application, except for the different input data during the training process of the two models, other settings are kept consistent. The synergistic effect of the two stages enables the model to achieve a significant performance improvement in thymus segmentation. Among them, the training data input to the first medical image segmentation model is the sample chest imaging images, and the training data of the second medical image segmentation model is: after foreground cutting the segmentation result output by the first medical image segmentation model, the retained region of interest containing the thymus area. Through this training method, the details of the segmentation can be enhanced. To ensure the stability and reproducibility of the model, the preprocessing and other training parameters are all set to the default settings of nnUNet.

[0098] In this application, the first medical image segmentation model and the second medical image segmentation model can be the same nnUNet model or different nnUNet models, which is not specifically limited here; if it is the same nnUNet model, then the nnUNet model outputs the first segmentation result, and after obtaining the region of interest containing the thymus area, it is input into the nnUNet model again to obtain the second segmentation result; if they are different nnUNet models, then the first nnUNet model outputs the first segmentation result, and after obtaining the region of interest containing the thymus area, it is input into the second nnUNet model to obtain the second segmentation result.

[0099] Moreover, to address the issue of the small and easily overlooked thymus proportion in the dataset in this application, the weight of the thymus category is increased in the loss function, that is: there are 3 categories in the data, category 0 is the background, category 1 is the thymus, and category 2 is the heart. Labeling the heart is to prevent the heart area from being recognized as the thymus during segmentation, resulting in false positives. Since the volume of the heart is much larger than that of the thymus, this will cause a problem of data imbalance. Therefore, when calculating the loss function in this application, the proportion of the thymus category can be increased. For example, the loss weight of the thymus category can be increased to 10 times that of the heart. Through this adjustment, this application strengthens the model's attention to the learning of the thymus region, enabling it to more accurately capture the approximate position and morphological information of the thymus.

[0100] See Figure 3 , which is a schematic flow diagram of a measurement method based on chest CT images provided by an embodiment of this application. Through Figure 3 it can be seen that after automatically segmenting the chest CT image through the Thy-uNET model, a segmentation result is obtained, and the segmentation result is accurately evaluated through the automatic measurement algorithm of the thymus to obtain the final measurement result. See Figure 4 , which is a schematic flow diagram of a two-stage segmentation method provided by an embodiment of this application. Through Figure 4 it can be seen that the input image is input into the nnUNet model. After a rough segmentation in the first stage by the nnUNet model, a rough segmentation result is obtained. The region of interest containing the thymus in the rough segmentation result is obtained and input into the Thy-uNET model to obtain the final segmentation result.

[0101] See Figure 5a , which is a schematic cross-sectional view of manual delineation provided by an embodiment of this application. See Figure 5b , which is a schematic coronal view of manual delineation provided by an embodiment of this application. See Figure 5c , which is a schematic sagittal view of manual delineation provided by an embodiment of this application. See Figure 5d , which is a schematic cross-sectional view of automatic segmentation provided by an embodiment of this application. See Figure 5e , which is a schematic coronal view of automatic segmentation provided by an embodiment of this application. See Figure 5f , which is a schematic sagittal view of automatic segmentation provided by an embodiment of this application. By comparing Figure 5a and Figure 5d 's cross-section, comparing Figure 5b and Figure 5e 's coronal plane, comparing Figure 5c and Figure 5fIn the sagittal plane, it can be seen that the segmentation result output by the segmentation algorithm of the present application is very similar to the result outlined manually; moreover, the experimental results show that the segmentation result obtained by the present application and the standard segmentation result outlined manually reach 0.8 in terms of the Dice Similarity Coefficient (DSC), which is significantly higher than the performance of existing single-stage models.

[0102] In summary, it can be seen that the two-stage segmentation strategy of the Thy-uNET model used in the present application enables the model to effectively focus on the thymus region, gradually improving the segmentation accuracy from rough segmentation to fine segmentation, avoiding the interference of surrounding tissues, achieving high-resolution fine segmentation of the thymus boundary, and laying a solid foundation for subsequent measurement of various indicators.

[0103] Based on any of the above embodiments, the present application discloses the specific process of automatically measuring each thymus indicator using the second segmentation result. Here, the calculation process of each indicator is specifically described:

[0104] I. Determination process of thymus volume and average HU value:

[0105] Use the second segmentation result to determine the total number of voxels in the thymus region; use the total number of voxels and the volume of a single voxel to calculate the thymus volume; calculate the average HU value of the thymus region according to the total number of voxels and the HU value of each voxel.

[0106] In the present application, in order to evaluate the size and density of the thymus, it is necessary to calculate the total volume and average HU value of the thymus. The present application can accurately locate the thymus region according to the mask data of the thymus in the second segmentation result. Since both the CT data and the mask data are 3D data, the present application sets the thymus mask as M(i,j,k), where i, j, k represent positions in 3D space. Inside the thymus region, the mask data M(i,j,k) = 1, and in other regions, the mask data M(i,j,k) = 0, thereby identifying the exact position of the thymus.

[0107] The present application first calculates the total number of voxels N in the thymus region. The total number of voxels is obtained by summing the mask data M(i,j,k) in the entire image volume. Set the spatial resolution as: S=(dx,dy,dz), where dx, dy, dz respectively represent the voxel spacing of the X-axis, Y-axis, and Z-axis in 3D space. The volume V of a single voxel voxel is V voxel =dx×dy×dz. In the present application, the calculation method of the thymus volume V thymic is:

[0108] V thymic =N×V voxel .

[0109] In this application, the average HU value C of the thymus region TR is obtained by calculating the average of the HU values within the thymus region:

[0110]

[0111] where TR (Thymus Region) represents the thymus region, and CT(i,j,k) represents the HU value at position (i,j,k) in the CT image.

[0112] II. Determination process of the average HU value of the largest thymus slice and the largest inscribed circle:

[0113] Use the second segmentation result to determine each slice of the thymus region; determine the number of slice voxels for each slice; take the slice with the largest number of slice voxels as the largest thymus slice; determine the largest inscribed circle from the largest thymus slice; use the HU values of the voxels within the largest inscribed circle to calculate the average HU value of the inscribed circle.

[0114] In this application, the largest thymus slice is the slice with the largest thymus area, that is, the slice with the largest number of voxels. Therefore, in this application, by traversing each slice along the Z-axis, calculating the number of slice voxels V(z) of the thymus voxels on each slice, taking the slice with the largest number of slice voxels as the largest thymus slice, and determining the slice index z of the largest thymus slice max .

[0115] Moreover, in the slice with the largest thymus area in this application, the largest circle completely contained within the thymus region can be identified to evaluate the uniformity of thymus density. See Figure 6 , which is a schematic diagram of the selection of the largest inscribed circle disclosed in the embodiment of this application. Apply the Euclidean distance transform to the thymus region in Figure 6 , calculate the distance D(i,j) from each thymus point to the nearest background point, take the point with the largest distance as the center c of the inscribed circle, and this largest distance is its radius R. The average HU value C of the largest inscribed circle circle is obtained by calculating the average of the HU values of the pixels within the circle.

[0116] III. Determination process of the thymus type:

[0117] Use the second segmentation result to determine the X-axis range and vertex coordinates of the thymus region; determine the comparison range according to the X-axis range; determine the thymus type according to the X-axis coordinate value of the vertex coordinates and the comparison range; if the thymus type is non-conical, adjust the X-axis coordinate value of the vertex coordinates according to the comparison range.

[0118] In this application, considering that the thymus shows different morphological characteristics at different ages, before measurement, it is necessary to first determine the shape of the thymus. Based on the position of the highest point of the thymus, the thymus types are divided into conical type and other types.

[0119] See Figure 7 , which is a flowchart of an index measurement method disclosed in an embodiment of this application. This application first identifies the X-axis range [x min , x max where the thymus mask exists. Among them, x min is the minimum value of the thymus region on the X-axis, and x max is the maximum value of the thymus region on the X-axis. Through [x min , x max , the position of the thymus can be determined. The width L x of the thymus is calculated as x max - x min , and the middle 70% range of this width is defined as the comparison range [x lower , x upper . Among them, x lower is the minimum value of the comparison range, and x upper is the maximum value of the comparison range. The coordinates of the vertex T of the thymus region are defined as (x top , y top ), where y top is the maximum Y value within the thymus region, and x top is the corresponding X value. If the X-axis coordinate value x top of the vertex coordinates is located within the comparison range [x lower , x upper , then the thymus is classified as conical type; otherwise, it is classified as other type, and accordingly, x top is adjusted to x lower or x upper .

[0120] IV. Determination process of the transverse diameter and anteroposterior diameter of the thymus:

[0121] Use the second segmentation result to determine the X-axis range and Y-axis range of the thymus region; determine the transverse diameter of the thymus according to the X-axis range and the X-axis pixel pitch; determine the anteroposterior diameter of the thymus according to the Y-axis range and the Y-axis pixel pitch.

[0122] See Figure 7 , in this application, the X-axis range is [x min , x max , and the Y-axis range is [y min , y max . Among them, y min is the minimum value of the thymus region on the Y-axis, and y maxis the maximum value of the thymus region on the Y-axis. In this application, the transverse diameter of the thymus is determined based on the X-axis range and the X-axis pixel pitch. The transverse diameter of the thymus represents its width in the X-axis direction, and the calculation formula is:

[0123] D transverse =(x max -x min +1)×s x

[0124] where D transverse is the transverse diameter of the thymus, and s x is the pixel pitch in the X direction.

[0125] In this application, the anteroposterior diameter of the thymus is determined based on the Y-axis range and the Y-axis pixel pitch. The anteroposterior diameter of the thymus represents the height of the thymus on the Y-axis, and the calculation formula is:

[0126] D anteroposterior =(y max -y min +1)×s y

[0127] where D anteroposterior is the anteroposterior diameter of the thymus, and s y is the pixel pitch in the Y direction.

[0128] V. Determination process of the left and right lobe lengths and the left and right lobe thicknesses:

[0129] Use the second segmentation result to determine the vertex coordinates, left boundary point coordinates, and right boundary point coordinates of the thymus region; calculate the left lobe length based on the vertex coordinates and the left boundary point coordinates, and calculate the right lobe length based on the vertex coordinates and the right boundary point coordinates;

[0130] Use the vertex coordinates to determine the base point coordinates; the X-axis coordinate value of the base point coordinates is the X-axis coordinate value of the vertex coordinates, and the Y-axis coordinate value of the base point coordinates is the minimum value of the thymus region on the Y-axis; take the distance value between the base point coordinates and the left lobe line as the left lobe thickness, and take the distance value between the base point and the right lobe line as the right lobe thickness; where the left lobe line is the line between the vertex coordinates and the left boundary point coordinates, and the right lobe line is the line between the vertex coordinates and the right boundary point coordinates.

[0131] See Figure 7 , in this application, when determining the left and right lobe lengths, it is necessary to use the vertex (x top ,y top ) as the starting point and calculate the maximum Euclidean distance from this point to the left and right boundaries of the thymus. Among them, the distance value from the vertex (x top ,y top ) to the left boundary point coordinates is defined as the left lobe length L left , and the distance value from the vertex (x top ,y topThe distance value to the right boundary point coordinate is defined as the right lobe length L right .

[0132] When determining the left and right lobe thicknesses in this application, the base point coordinates are first determined. The base point is: draw a perpendicular line from the vertex to the X-axis, and the point where it intersects the lower boundary of the thymus is the base point. The base point coordinates are (x top , y bottom ), where the X-axis coordinate value of the base point coordinates is the X-axis coordinate value x top of the vertex coordinates, and the Y-axis coordinate value y bottom of the base point coordinates is the minimum Y value of the thymus region at x = x top . Among them, the straight line between the vertex coordinates and the left boundary point coordinates is the left lobe straight line, and the straight line between the vertex coordinates and the right boundary point coordinates is the right lobe straight line. Starting from this base point coordinates, extend the straight lines in the directions of the left lobe straight line to the upper left and the right lobe straight line to the upper right respectively until they intersect with the boundary of the thymus and the background. The length of the straight line extended in the direction of the left lobe straight line represents the left lobe thickness, and the length of the straight line extended in the direction of the right lobe straight line represents the right lobe thickness. These left and right thickness values can be calculated based on the intersection coordinates of the extended straight line with the thymus boundary and the base point coordinates.

[0133] See Figure 8a , which is a schematic diagram of an artificial drawing result disclosed in an embodiment of this application. See Figure 8b , which is a schematic diagram of an automatic segmentation result disclosed in an embodiment of this application. See Figure 8c , which is a schematic diagram of an automatic measurement of various indicators disclosed in an embodiment of this application. See Figure 8d , which is a schematic diagram of an inscribed circle selection disclosed in an embodiment of this application. By comparing Figure 8a and Figure 8b , it can be seen that the artificial drawing result is extremely similar to the automatic segmentation result, Figure 8c and Figure 8d The results of the measured various indicators are also basically the same as the manual measurement results.

[0134] It can be seen that a multi-stage segmentation strategy provided by this application can achieve accurate and rapid segmentation of the thymus, and provides an automated measurement method for various indicators of the thymus (such as volume, average HU value, transverse diameter, anteroposterior diameter, length and thickness of the left and right lobes, etc.). The results measured by the automatic algorithm in this application are compared with the manual segmentation and measurement results of radiologists to evaluate the accuracy of segmentation and the consistency of various indicator measurements. Research shows that this automated method can significantly improve the efficiency of segmentation and measurement, and at the same time shows an effect equivalent to manual operation in terms of accuracy and consistency, which provides a reliable tool for the structural evaluation and immune function analysis of the thymus.

[0135] In summary, it can be seen that the technical solution described in this application has the following beneficial effects:

[0136] 1. Improve measurement accuracy and measurement consistency:

[0137] Accurate multi-index measurement: This application provides a comprehensive thymus index measurement algorithm, which can automatically measure multiple key indicators including thymus volume, HU value (density), transverse diameter, anteroposterior diameter, length and thickness of left and right lobes, etc. Compared with the traditional method that only provides volume measurement, this application realizes multi-dimensional quantification of thymus structure, greatly enhancing the accuracy of measurement.

[0138] High-resolution fine segmentation: Using the two-stage segmentation strategy of the Thy-uNET model, it effectively focuses on the thymus region, gradually improving the segmentation accuracy from coarse segmentation to fine segmentation, avoiding the interference of surrounding tissues, realizing the accurate positioning of the thymus boundary, and laying a solid foundation for subsequent index measurements. Experimental results show that the segmentation algorithm of this application reaches 0.8 in terms of Dice similarity coefficient, significantly higher than the performance of existing single-stage models.

[0139] Reduce operator errors: The automated measurement process of this application greatly reduces the dependence on manual operations, avoiding measurement errors caused by operator experience and subjective judgment. This improvement in consistency is crucial for the reliability of clinical diagnosis, ensuring stable results under different operators or different measurement environments.

[0140] Moreover, due to the high stability of the algorithm in this application, even under batch processing of image data, it can maintain consistent measurement accuracy, reducing the time cost caused by repeated measurements. For large hospitals or research centers, the automated measurement system can effectively reduce the workload of doctors and improve work efficiency.

[0141] 2. Improve operation efficiency and workflow integration

[0142] Fully automated measurement process: Traditional thymus image analysis requires radiologists to manually segment, label and measure step by step, which is time-consuming and complex. Through the automated process of this application, from the input of CT images, thymus segmentation to multi-index measurement, the whole process is automatically executed, greatly simplifying the operation process. This system can extract multiple key indicators within a few minutes, with significantly improved efficiency.

[0143] Reduce repetitive workload: Due to the high stability of the algorithm in this application, even under batch processing of image data, it can maintain consistent measurement accuracy, reducing the time cost caused by repeated measurements. For large hospitals or research centers, the automated measurement system can effectively reduce the workload of doctors and improve work efficiency.

[0144] Real-time clinical applications are possible: The automated measurement system based on CT images is fast and immediate, enabling it to be applied in real-time in a clinical environment. Doctors can obtain measurement results more quickly, which helps with immediate diagnosis and decision-making.

[0145] See Figure 9 , Figure 9 which is a schematic structural diagram of a measurement device for thymus indexes provided by an embodiment of the present application. The device specifically includes:

[0146] A first acquisition module 11 for acquiring chest imaging images;

[0147] A first segmentation module 12 for roughly segmenting the chest imaging images to obtain a first segmentation result;

[0148] A second acquisition module 13 for obtaining a region of interest containing the thymus from the first segmentation result;

[0149] A second segmentation module 14 for finely segmenting the region of interest to obtain a second segmentation result;

[0150] A measurement module 15 for automatically measuring various thymus indexes using the second segmentation result.

[0151] As an alternative embodiment, the measurement module includes:

[0152] A total voxel number determination unit for determining the total number of voxels in the thymus region using the second segmentation result;

[0153] A thymus volume calculation unit for calculating the thymus volume using the total voxel number and the volume of a single voxel;

[0154] A first average HU value calculation unit for calculating the average HU value of the thymus region according to the total voxel number and the HU value of each voxel.

[0155] As an alternative embodiment, the measurement module includes:

[0156] A first slice determination unit for determining each slice of the thymus region using the second segmentation result;

[0157] A slice voxel number determination unit for determining the number of voxels in each slice;

[0158] A second slice determination unit for taking the slice with the largest number of slice voxels as the largest thymus slice;

[0159] A largest inscribed circle determination unit for determining the largest inscribed circle from the largest thymus slice;

[0160] A second average HU value calculation unit, configured to calculate the average HU value of the inscribed circle by using the HU values of the voxels within the maximum inscribed circle.

[0161] As an optional embodiment, the measurement module includes:

[0162] A first coordinate determination unit, configured to determine the X-axis range and vertex coordinates of the thymus region by using the second segmentation result;

[0163] A comparison range determination unit, configured to determine a comparison range according to the X-axis range;

[0164] A thymus type determination unit, configured to determine the thymus type according to the X-axis coordinate value of the vertex coordinates and the comparison range;

[0165] An adjustment unit, configured to, if the thymus type is non-conical, adjust the X-axis coordinate value of the vertex coordinates according to the comparison range.

[0166] As an optional embodiment, the measurement module includes:

[0167] A second coordinate determination unit, configured to determine the X-axis range and Y-axis range of the thymus region by using the second segmentation result;

[0168] A thymus transverse diameter determination unit, configured to determine the thymus transverse diameter according to the X-axis range and the X-axis pixel pitch;

[0169] A thymus anteroposterior diameter determination unit, configured to determine the thymus anteroposterior diameter according to the Y-axis range and the Y-axis pixel pitch.

[0170] As an optional embodiment, the measurement module includes:

[0171] A third coordinate determination unit, configured to determine the vertex coordinates, left boundary point coordinates, and right boundary point coordinates of the thymus region by using the second segmentation result;

[0172] A left lobe length calculation unit, configured to calculate the left lobe length according to the vertex coordinates and the left boundary point coordinates;

[0173] A right lobe length calculation unit, configured to calculate the right lobe length according to the vertex coordinates and the right boundary point coordinates;

[0174] A fourth coordinate determination unit, configured to determine the base point coordinates by using the vertex coordinates; the X-axis coordinate value of the base point coordinates is the X-axis coordinate value of the vertex coordinates, and the Y-axis coordinate value of the base point coordinates is the minimum value of the thymus region on the Y-axis;

[0175] A left lobe thickness determination unit, configured to use the distance value between the base point coordinates and the left lobe straight line as the left lobe thickness;

[0176] A right lobe thickness determination unit for taking the distance value between the base point and the right lobe straight line as the right lobe thickness; wherein, the left lobe straight line is the straight line between the vertex coordinates and the left boundary point coordinates, and the right lobe straight line is the straight line between the vertex coordinates and the right boundary point coordinates.

[0177] As an alternative embodiment, the first segmentation module is specifically configured to: input the chest imaging image into a first medical image segmentation model, and perform rough segmentation on the chest imaging image through the first medical image segmentation model to obtain a first segmentation result;

[0178] Correspondingly, the second segmentation module is specifically configured to: input the region of interest into the second medical image segmentation model, and perform fine segmentation on the region of interest through the second medical image segmentation model to obtain a second segmentation result; wherein, both the first medical image segmentation model and the second medical image segmentation model are nnUNet models.

[0179] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated here.

[0180] See Figure 10 , Figure 10 which is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device specifically includes:

[0181] A processor 21, a memory 22, and a computer program stored on the memory 22 and executable on the processor 21. The processor 21 executes the steps of the measurement method described in any of the above method embodiments through the computer program.

[0182] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one of the following hardware forms: DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may further include an AI (Artificial Intelligence) processor, which is used to process computational operations related to machine learning.

[0183] The memory 22 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 22 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In this embodiment, the memory 22 is at least used to store the following computer program 221. After the computer program is loaded and executed by the processor 21, it can implement the relevant steps in the measurement method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 22 may further include an operating system 222 and data 223, etc., and the storage method may be transient storage or permanent storage. Among them, the operating system 222 may include Windows, Unix, Linux, etc.

[0184] In some embodiments, the electronic device may further include a display screen 23, an input / output interface 24, a communication interface 25, a sensor 26, a power supply 27, and a communication bus 28.

[0185] Of course, Figure 10 The structure of the illustrated electronic device does not constitute a limitation on the electronic device in the embodiments of the present application. In practical applications, the electronic device may include more or fewer components than Figure 10 shown, or combine certain components.

[0186] In another exemplary embodiment, a computer storage medium is also provided. When the program instructions are executed by a processor, the steps of the measurement method described in any of the above method embodiments are implemented. Among them, the storage medium may include: various media that can store program codes such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs.

[0187] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and will not be elaborated herein.

[0188] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" as used herein may also include the plural forms. The terms "comprising", "including", "containing", and "having" are inclusive and thus specify the presence of the stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not to be construed as necessarily requiring them to be executed in the particular order described or illustrated, unless the execution order is explicitly stated. It should also be understood that alternative or additional steps may be used.

[0189] The above are only the specific embodiments of the present invention, enabling those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather will be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for measuring thymus indexes, characterized in that: The measuring method comprises: Obtain chest radiographic images; Performing rough segmentation on the chest image to obtain a first segmentation result; Acquire a region of interest including the thymus from the first segmentation result; Performing fine segmentation on the region of interest to obtain a second segmentation result; The second segmentation result is used to automatically measure various thymus indexes.

2. The measuring method according to claim 1, characterized in that: The second segmentation result is used to automatically measure various thymus indicators, including: Determining the total number of voxels in the thymus region using the second segmentation result; Calculating the volume of the thymus using the total number of voxels and the volume of a single voxel; According to the total number of voxels and the HU value of each voxel, the average HU value of the thymus region is calculated.

3. The measuring method according to claim 1, characterized in that: The second segmentation result is used to automatically measure various thymus indicators, including: Determine each slice of the thymus region using the second segmentation result; Determine the number of slice voxels per slice; The slice with the largest number of slice voxels was taken as the largest thymus slice; determining a largest inscribed circle from the largest thymus slice; The average HU value of the inscribed circle is calculated using the HU value of each voxel in the maximum inscribed circle.

4. The measuring method according to claim 1, characterized in that: The second segmentation result is used to automatically measure various thymus indicators, including: Determining the X-axis range and vertex coordinates of the thymus region using the second segmentation result; Determine a comparison range according to the X-axis range; Determine the thymus type according to the X-axis coordinate value of the vertex coordinate and the comparison range; If the thymus type is non-conical, the X-axis coordinate value of the vertex coordinate is adjusted according to the comparison range.

5. The measuring method according to claim 1, characterized in that: The second segmentation result is used to automatically measure various thymus indicators, including: Determine the X-axis range and the Y-axis range of the thymus region using the second segmentation result; Determine the transverse diameter of the thymus according to the X-axis range and the X-axis pixel spacing; The anterior-posterior diameter of the thymus is determined according to the Y-axis range and the Y-axis pixel spacing.

6. The measuring method according to claim 1, characterized in that: The second segmentation result is used to automatically measure various thymus indicators, including: Determine the vertex coordinates, left boundary point coordinates and right boundary point coordinates of the thymus region using the second segmentation result; Calculate the length of the left leaf according to the vertex coordinates and the left boundary point coordinates, and calculate the length of the right leaf according to the vertex coordinates and the right boundary point coordinates; Determine the base point coordinates using the vertex coordinates; the X-axis coordinate value of the base point coordinates is the X-axis coordinate value of the vertex coordinates, and the Y-axis coordinate value of the base point coordinates is the minimum value of the thymus region on the Y-axis; The distance between the base point coordinate and the left lobe straight line is taken as the left lobe thickness, and the distance between the base point coordinate and the right lobe straight line is taken as the right lobe thickness; The left lobe straight line is a straight line between the vertex coordinates and the left boundary point coordinates, and the right lobe straight line is a straight line between the vertex coordinates and the right boundary point coordinates.

7. The measuring method according to any one of claims 1 to 6, characterized in that: Performing rough segmentation on the chest image to obtain a first segmentation result includes: Inputting the chest image into a first medical image segmentation model, and roughly segmenting the chest image using the first medical image segmentation model to obtain a first segmentation result; Accordingly, performing fine segmentation on the region of interest to obtain a second segmentation result includes: Inputting the region of interest into the second medical image segmentation model, and performing fine segmentation on the region of interest using the second medical image segmentation model to obtain a second segmentation result; Wherein, the first medical image segmentation model and the second medical image segmentation model are both nnUNet models.

8. A thymus index measuring device, characterized in that: The measuring device comprises: A first acquisition module is used to acquire a chest image; A first segmentation module, used for performing a rough segmentation on the chest image to obtain a first segmentation result; A second acquisition module, used for acquiring a region of interest including the thymus from the first segmentation result; A second segmentation module, used for performing fine segmentation on the region of interest to obtain a second segmentation result; A measuring module is used to automatically measure various thymus indexes using the second segmentation result.

9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the steps of the measurement method described in any one of claims 1 to 7 of the present application through the computer program.

10. A computer storage medium, characterized in that: The computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the steps of the measurement method described in any one of claims 1 to 7 of the present application.