Thyroid crosscutting segmentation result correction method and device

By using the correction method of reference width and contour circumferential circles in thyroid ultrasound image segmentation, the problem of misidentification in thyroid ultrasound image segmentation is solved, and the accuracy and robustness of the segmentation results are significantly improved.

CN120052960AActive Publication Date: 2025-05-30武汉库柏特科技股份有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510141301.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-08
Publication Date
2025-05-30
Estimated Expiration
2045-02-08

AI Technical Summary

Technical Problem

The prior art has problems with misidentification in thyroid ultrasound image segmentation, such as mistakenly referring to the paraglial gland as a thyroid gland or misjudging blood vessels as lesions, which affects the accuracy of the segmentation results.

Method used

By acquiring the ultrasound images collected in real time during the transverse scanning process of the ultrasound robot according to the preset path, select an image with only one contour in multiple consecutive images as the reference image, and determine the width of its contour in the X-axis direction as the reference width. For each ultrasound image subsequently acquired, the point set ratio of the to-processed contour is calculated within the circumference of the contour of the previous image is corrected according to the preset threshold, and the contour is retained or deleted to ensure accuracy.

Benefits of technology

Effectively remove noise and pseudo-contours, ensure that only the true thyroid contour is retained, reduce misidentification, significantly improve the accuracy and robustness of thyroid ultrasound image segmentation results, and improve the positioning accuracy and lesion recognition capabilities of ultrasound robots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120052960A_ABST
    Figure CN120052960A_ABST
Patent Text Reader

Abstract

The invention discloses a thyroid transecting segmentation result correction method and device, and the method comprises the steps: obtaining an ultrasonic image collected by an ultrasonic robot, and determining a reference image and a reference width; for each to-be-processed contour in the subsequently acquired ultrasonic image, determining the width of the to-be-processed contour as the real-time width, and calculating to obtain the point set proportion of the to-be-processed contour in the contour circumcircle of the previous ultrasonic image; if the point set proportion is greater than a preset correct recognition threshold value, reserving the contour to be processed; if the point set proportion is smaller than a preset misrecognition threshold value, deleting the to-be-processed contour; if the point set proportion is greater than a preset misrecognition threshold value and less than a preset correct recognition threshold value, judging whether the ratio of the real-time width to the reference width is greater than a preset width threshold value or not; if yes, points, located in the contour circumcircle of the previous ultrasonic image, on the contour to be processed are reserved; if not, the to-be-processed contour is reserved. The method can effectively improve the accuracy and robustness of the thyroid ultrasound image segmentation result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method and device for correcting the transverse cutting segmentation result of the thyroid gland. Background Art

[0002] In the field of medical imaging, ultrasound imaging, as a non-invasive, real-time and cost-effective examination method, is widely used in clinical diagnosis. Especially for the detection of thyroid diseases, ultrasound imaging provides key information for evaluating the size, shape, structure and lesion location of the thyroid gland. However, due to the inherent limitations of ultrasound imaging, such as poor fitting, individual tissue differences, insufficient imaging clarity, etc., automatically segmenting the transverse section of the thyroid gland has become a challenging task.

[0003] In recent years, with the development of computer vision and deep learning technologies, it has become possible to automatically perform image segmentation by training a neural network model. These models can identify and segment the thyroid region in ultrasound images, and the generated transverse section of the thyroid gland can guide the robotic arm to plan the scanning path of the thyroid gland, judge the overall shape of the thyroid gland, identify thyroid lesions, etc. Summary of the Invention

[0004] In order to obtain a more accurate thyroid gland contour, the embodiments of the present invention provide a method and device for correcting the transverse cutting segmentation result of the thyroid gland.

[0005] In a first aspect, the embodiments of the present invention provide a method for correcting the transverse cutting segmentation result of the thyroid gland, which may include:

[0006] Obtain the ultrasound images collected in real time by the ultrasound robot during transverse cutting scanning starting from the isthmus of the thyroid gland and moving along a preset path to one side of the thyroid gland;

[0007] When there is only one contour in multiple consecutive ultrasound images, take any one of the multiple ultrasound images as a reference image, and determine the width of the contour in the reference image in the X-axis direction as the reference width;

[0008] For the ultrasound images collected after the multiple ultrasound images, perform correction through the following method:

[0009] For each contour to be processed in the ultrasound image, determine the width of the contour to be processed in the X-axis direction as the real-time width, and calculate the proportion of the point set of the contour to be processed located within the circumscribed circle of the contour in the previous ultrasound image;

[0010] If the proportion of the point set is greater than a preset correct recognition threshold, retain the contour to be processed;

[0011] If the proportion of the point set is less than a preset misrecognition threshold, delete the contour to be processed from all the contours in the ultrasound image;

[0012] If the ratio of the point set is greater than the preset misrecognition threshold and less than the preset correct recognition threshold, then determine whether the ratio of the real-time width to the reference width is greater than the preset width threshold;

[0013] If so, retain the points on the contour to be processed that are within the circumscribed circle of the contour in the previous ultrasound image, and obtain the corresponding corrected processed contour;

[0014] If not, retain the contour to be processed.

[0015] In one or some alternative embodiments of the present application, the ratio of the point set within the circumscribed circle of the contour in the previous ultrasound image of the contour to be processed is calculated by the following method, including:

[0016] Fit the minimum circumscribed circle of all contours in the previous ultrasound image to obtain the circumscribed circle of the contours in the previous ultrasound image;

[0017] Determine the center and radius of the circumscribed circle of the contours in the previous ultrasound image;

[0018] Calculate the Euclidean distance from all points within the contour to be processed to the center of the circumscribed circle of the contour in the previous ultrasound image;

[0019] Based on the Euclidean distance from all points within the contour to be processed to the center of the circumscribed circle of the contour in the previous ultrasound image, and the radius of the circumscribed circle of the contour in the previous ultrasound image, calculate the ratio of the point set within the circumscribed circle of the contour in the previous ultrasound image of the contour to be processed based on the following formula:

[0020]

[0021] In the formula, Ra is the ratio of the point set, n is the total number of pixel points within the contour to be processed, dis[t] represents the Euclidean distance from the t-th pixel point within the contour to be processed to the center of the circumscribed circle of the contour in the previous ultrasound image, R i-1 represents the radius of the circumscribed circle of the contour in the previous ultrasound image, 1 ||判断式|| is an indicator function, indicating that if the judgment formula holds, the value of the indicator function is 1, and if the judgment formula does not hold, the value of the indicator function is 0.

[0022] In one or some alternative embodiments of the present application, after processing all the contours to be processed in an ultrasound image, it further includes:

[0023] Calculate the width of each contour in the processed ultrasound image in the X-axis direction;

[0024] If the width of a contour in the X-axis direction in the processed ultrasound image is greater than the reference width, then use the width of the contour in the X-axis direction as the new reference width.

[0025] In one or some optional implementation manners of the embodiments of the present application, after processing all the contours to be processed in an ultrasound image, it further includes:

[0026] Fit the minimum circumscribed circle of all the contours in the processed ultrasound image to obtain the contour circumscribed circle of the processed ultrasound image;

[0027] Determine the center and radius of the contour circumscribed circle of the processed ultrasound image;

[0028] If the ratio of the radius of the contour circumscribed circle to the radius of the contour circumscribed circle of the previous ultrasound image is less than a preset radius threshold, then use the center and radius of the contour circumscribed circle of the previous ultrasound image as the center and radius of the contour circumscribed circle of the processed ultrasound image.

[0029] In one or some optional implementation manners of the embodiments of the present application, the contours in the ultrasound image are obtained by the following method:

[0030] Perform image segmentation on the ultrasound image based on a preset image segmentation model to obtain a mask image;

[0031] Perform contour search on the mask image to obtain all the contours in the ultrasound image.

[0032] In one or some optional implementation manners of the embodiments of the present application, after obtaining all the contours in the ultrasound image, it further includes:

[0033] If there is a contour that is completely surrounded by another contour, then delete the surrounded contour;

[0034] And delete the contour composed of a single pixel point.

[0035] In a second aspect, an embodiment of the present invention provides a thyroid transverse section segmentation result correction device, which may include:

[0036] An image acquisition module, configured to acquire an ultrasound image obtained by the ultrasound robot through real-time transverse scanning along a preset path starting from the thyroid isthmus to one side of the thyroid;

[0037] A reference confirmation module, configured to use any one of the multiple ultrasound images as a reference image when there is only one contour in multiple consecutive ultrasound images, and determine the width of the contour in the X-axis direction in the reference image as the reference width;

[0038] A first calculation module, configured to correct an ultrasonic image collected after the plurality of ultrasonic images in the following manner: for each contour to be processed in the ultrasonic image, determine the width of the contour to be processed in the X-axis direction as a real-time width, and calculate the proportion of the point set where the contour to be processed is located inside the circumcircle of the contour in the previous ultrasonic image;

[0039] A first judgment module, configured to retain the contour to be processed when the proportion of the point set is greater than a preset correct recognition threshold;

[0040] A second judgment module, configured to delete the contour to be processed from all the contours of the ultrasonic image when the proportion of the point set is less than a preset misrecognition threshold;

[0041] A third judgment module, configured to, when the proportion of the point set is greater than the preset misrecognition threshold and less than the preset correct recognition threshold, judge whether the ratio of the real-time width to the reference width is greater than a preset width threshold; if so, retain the points of the contour to be processed that are located inside the circumcircle of the contour in the previous ultrasonic image to obtain a corresponding corrected processed contour; if not, retain the contour to be processed.

[0042] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program / instructions are stored, and when the computer program / instructions are executed by a processor, the thyroid cross-sectional segmentation result correction method as described above is implemented.

[0043] In a fourth aspect, an embodiment of the present invention provides a computer program product, including a computer program / instructions, and when the computer program / instructions are executed by a processor, the thyroid cross-sectional segmentation result correction method as described above is implemented.

[0044] In a fifth aspect, an embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored on the memory, and when the processor executes the computer program, the thyroid cross-sectional segmentation result correction method as described above is implemented.

[0045] The beneficial effects of the above technical solutions provided by the embodiments of the present invention at least include:

[0046] An embodiment of the present invention provides a method for correcting the transverse cutting segmentation result of the thyroid gland. This method acquires real-time ultrasound images during the transverse scanning of the ultrasound robot according to a preset path. When there is only one contour in a series of consecutive ultrasound images, one of them is selected as the reference image, and the width of its contour in the X-axis direction is determined as the reference width. For each ultrasound image acquired after the reference image, the following method is used for correction. For each contour to be processed in the ultrasound image, calculate its width in the X-axis direction, and obtain the proportion of the point set of this contour located inside the circumcircle of the contour in the previous image. If the proportion of the point set is greater than the preset correct recognition threshold, then retain this contour; if the proportion is less than the preset misrecognition threshold, then delete this contour; if the proportion is between the two, then further determine whether the ratio of the real-time width to the reference width is greater than the preset width threshold. If so, then retain the points located inside the circumcircle of the contour in the previous image; if not, then directly retain this contour. This method effectively removes noise and pseudo-contours, ensures that only the real thyroid gland contour is retained, reduces misrecognition caused by interference such as parathyroid glands and blood vessels, and significantly improves the accuracy and robustness of the thyroid ultrasound image segmentation result. Combining the fitting strategy of the minimum circumcircle and the intelligent judgment mechanism, it adapts to different scanning angles and image qualities, and ensures the stability and consistency of contour extraction. The corrected ultrasound image segmentation result improves the positioning accuracy and lesion recognition ability of the ultrasound robot, and provides more reliable support for thyroid ultrasound scanning.

[0047] Other features and advantages of the present invention will be described in the following specification, and, in part, will be obvious from the specification, or will be understood by implementing the present invention. The objectives and other advantages of the present invention can be achieved and obtained by the structures specifically pointed out in the written specification and the drawings.

[0048] The following further describes the technical solutions of the present invention in detail through the drawings and embodiments. Description of the Drawings

[0049] The drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention, and do not constitute a limitation to the present invention. In the drawings:

[0050] Figure 1 It is a schematic flow chart of the method for correcting the transverse cutting segmentation result of the thyroid gland provided by the embodiment of the present invention;

[0051] Figure 2 It is a schematic diagram of the thyroid gland structure provided by the embodiment of the present invention;

[0052] Figure 3 It is a schematic diagram of an ultrasound image with misrecognition of the parathyroid gland provided by the embodiment of the present invention;

[0053] Figure 4Schematic diagram of the mask image for misidentification of parathyroid glands provided by an embodiment of the present invention;

[0054] Figure 5 Schematic diagram of the ultrasonic image for misidentification of blood vessels provided by an embodiment of the present invention;

[0055] Figure 6 Schematic diagram of the mask image for misidentification of blood vessels provided by an embodiment of the present invention;

[0056] Figure 7 Schematic diagram of the ultrasonic image for correct identification of thyroid lesions provided by an embodiment of the present invention;

[0057] Figure 8 Schematic diagram of the mask image for correct identification of thyroid lesions provided by an embodiment of the present invention;

[0058] Figure 9 Schematic diagram of the ultrasonic image of the envelope contour provided by an embodiment of the present invention;

[0059] Figure 10 Schematic diagram of the mask image of the envelope contour provided by an embodiment of the present invention;

[0060] Figure 11 Schematic diagram of the segmentation result after removing the misidentification of parathyroid glands provided by an embodiment of the present invention;

[0061] Figure 12 Schematic diagram of the segmentation result after removing the misidentification of blood vessels provided by an embodiment of the present invention;

[0062] Figure 13 Schematic diagram of the structure of the device for correcting the transverse segmentation result of the thyroid gland provided by an embodiment of the present application. Detailed implementation manners

[0063] Hereinafter, exemplary embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.

[0064] The inventors found that in the prior art, due to the influence of similar structures such as parathyroid glands and complex factors such as blood vessels near the thyroid gland, existing image segmentation methods may have misidentification problems, such as misidentifying parathyroid glands as thyroid glands or misjudging blood vessels as lesions, which greatly affects the accuracy of the segmentation result.

[0065] Based on this, the inventors have made further research and developed the present invention to provide a method and device for correcting the transverse segmentation result of the thyroid gland.

[0066] Example 1

[0067] In Example 1 of the present invention, a method for correcting the transverse cutting result of the thyroid gland is provided. Referring to Figure 1 as shown, the method may include the following steps S101 - S108:

[0068] S101: Obtain the ultrasonic images collected in real - time by the ultrasonic robot during transverse scanning along a preset path starting from the isthmus of the thyroid gland towards one side of the thyroid gland.

[0069] S102: When there is only one contour in a continuous plurality of ultrasonic images, take any one of the plurality of ultrasonic images as a reference image, and determine the width of the contour in the reference image in the X - axis direction as the reference width.

[0070] S103: Correct the ultrasonic images collected after the plurality of ultrasonic images in the following manner: For each contour to be processed in the ultrasonic image, determine the width of the contour to be processed in the X - axis direction as the real - time width, and calculate the proportion of the point set of the contour to be processed located within the circumscribed circle of the contour in the previous ultrasonic image.

[0071] S104: If the point - set proportion is greater than a preset correct - recognition threshold, retain the contour to be processed.

[0072] S105: If the point - set proportion is less than a preset mis - recognition threshold, delete the contour to be processed from all the contours in the ultrasonic image.

[0073] S106: If the point - set proportion is greater than the preset mis - recognition threshold and less than the preset correct - recognition threshold, determine whether the ratio of the real - time width to the reference width is greater than a preset width threshold: If so, execute step S107; if not, execute step S108.

[0074] S107: Retain the points of the contour to be processed located within the circumscribed circle of the contour in the previous ultrasonic image to obtain the corresponding corrected processed contour.

[0075] S108: Retain the contour to be processed.

[0076] An embodiment of the present invention provides a method for correcting the transverse cutting result of the thyroid gland. This method obtains real-time ultrasound images during the transverse scanning of the ultrasound robot along a preset path. When there is only one contour in a continuous plurality of ultrasound images, one of them is selected as the reference image, and the width of its contour in the X-axis direction is determined as the reference width. For each ultrasound image collected after the reference image, the following method is used for correction. For each contour to be processed in the ultrasound image, calculate its width in the X-axis direction, and obtain the proportion of the point set of the contour located inside the circumcircle of the contour in the previous image. If the proportion of the point set is greater than the preset correct recognition threshold, the contour is retained; if the proportion is less than the preset misrecognition threshold, the contour is deleted; if the proportion is between the two, further determine whether the ratio of the real-time width to the reference width is greater than the preset width threshold. If so, retain the points located inside the circumcircle of the contour in the previous image; if not, directly retain the contour. This method effectively removes noise and pseudo-contours, ensures that only real thyroid contours are retained, reduces misrecognition caused by interference such as parathyroid glands and blood vessels, and significantly improves the accuracy and robustness of the thyroid ultrasound image segmentation result. Combining the fitting strategy of the minimum circumcircle and the intelligent judgment mechanism, it adapts to different scanning angles and image qualities, and ensures the stability and consistency of contour extraction. The corrected ultrasound image segmentation result improves the positioning accuracy and lesion recognition ability of the ultrasound robot, and provides more reliable support for thyroid ultrasound scanning.

[0077] In the embodiment of the present application, referring to Figure 2 the thyroid gland structure shown, when performing a transverse scan of the thyroid gland by ultrasound, the isthmus of the thyroid gland is the connecting area between the left lobe and the right lobe, and is distributed between the organ and the skin. The transverse cutting area of the thyroid gland near the isthmus is more clearly and singularly displayed in the ultrasound image, and the recognition accuracy is relatively high. The imaging becomes less clear the further up or down from the isthmus.

[0078] Based on the above thyroid ultrasound imaging characteristics, when the robotic arm performs thyroid ultrasound scanning, starting from the position of the isthmus of the thyroid gland, it moves to a position where the left lobe or the right lobe is basically flush with the isthmus, and the robotic arm scans upward. After reaching the upper endpoint of the left lobe or the right lobe of the thyroid gland, the robotic arm scans downward until it reaches the lower endpoint, and then the robotic arm returns to a position basically flush with the isthmus.

[0079] Due to the influence of similar structures such as parathyroid glands and complex factors such as blood vessels near the thyroid gland, existing image segmentation methods may have misrecognition problems. For example, misidentifying parathyroid glands as thyroid glands or misjudging blood vessels as lesions, which greatly affects the accuracy of the segmentation result.

[0080] Specifically, during the scanning process, an image segmentation model based on deep learning may misidentify parathyroid glands as thyroid glands, or misidentify blood vessels near the glands as thyroid glands, and it is necessary to distinguish them from thyroid ultrasound images with lesions.

[0081] In a specific embodiment, the ultrasound image and the mask image in which parathyroid misidentification occurs are as follows Figure 3 and Figure 4 shown. Figure 3 Inside the red curve in is the correctly identified position of the thyroid gland, and inside the blue curve is the misidentified position of the parathyroid gland. Figure 4 On the left side in is the correctly identified mask area, and on the right side is the misidentified parathyroid mask area. The ultrasound image and the mask image in which blood vessel misidentification occurs are as follows Figure 5 and Figure 6 shown. Figure 5 Inside the red curve in is the correctly identified position of the thyroid gland, and inside the purple curve is the misidentified position of the blood vessel. Figure 6 The mask area in is the connected thyroid gland and parathyroid gland. The ultrasound image and the mask image of the thyroid gland with lesions are as follows Figure 7 and Figure 8 shown. Figure 7 Inside the red curve in is the correctly identified position of the thyroid lesion. Figure 8 The mask area in is the thyroid lesion.

[0082] In the above step S101, an ultrasound image is obtained by the ultrasound robot in real-time during the transverse scanning along a preset path starting from the isthmus of the thyroid gland to one side of the thyroid gland.

[0083] Specifically, it can be that the ultrasound robot controls the robotic arm to start from the isthmus of the thyroid gland and perform transverse scanning along a preset path to one side (left or right) of the thyroid gland. During the scanning process, the robot collects ultrasound images in real-time through precise robotic arm control.

[0084] In the embodiment of the present application, after the above step S101, step S109 is further included, which preprocesses the ultrasound image collected in real-time. The preprocessing specifically includes the following steps S1091 - S1094:

[0085] S1091: Perform image segmentation on the ultrasound image based on a preset image segmentation model to obtain a mask image.

[0086] Specifically, it can be that the collected ultrasound image is segmented by a preset image segmentation model to obtain a mask image of the thyroid region, and the mask image represents the position and shape of the thyroid gland in the image. (Such as U-Net, etc.)

[0087] Those skilled in the art can select a suitable neural network for pre-training according to the detailed description of the prior art to obtain a preset image segmentation model. The training process can specifically include:

[0088] Step 1: Collect thyroid ultrasound images and separately mark the contours of the thyroid in the thyroid ultrasound images. After preprocessing, a thyroid contour dataset is obtained.

[0089] Step 2: Select a suitable neural network model as the initial image segmentation network, such as the U-Net model, SegNet model, etc.

[0090] Step 3: Divide the thyroid contour dataset into a training set and a test set.

[0091] Step 4: Define loss functions (such as cross-entropy loss function, mean squared error loss function, etc.), optimization algorithms (such as Adam, SGD, etc.), etc.

[0092] Step 5: Use the training set of the thyroid contour dataset to train the selected neural network model to obtain a trained image segmentation network.

[0093] Repeat the training process of the above image segmentation model until the preset conditions are met, stop training, and obtain a preset image segmentation model. Among them, the preset conditions can be set to reach a fixed number of iterations, the accuracy reaches a threshold, the accuracy does not change within the preset number of iterations, etc. No specific limitations are made here.

[0094] S1092: Perform contour finding on the mask image to obtain all the contours in the ultrasound image.

[0095] Specifically, it can be to use the findContours function in OpenCV (Open Source Computer Vision Library) to find contours in the mask image to obtain all the contours in the ultrasound image.

[0096] S1093: If among all the contours, there is a contour that is completely surrounded by another contour, then delete the surrounded contour.

[0097] Specifically, it can be that due to problems such as insufficient clarity and more noise in ultrasonic imaging, there will be some smaller contours within some contours in the mask image, that is, there are envelope contours. For example, as Figure 9 and Figure 10 shown, Figure 9 is the ultrasound image, Figure 10 is the corresponding mask image, Figure 9 the red curve in it is the larger outer contour, and the yellow curve is the smaller inner contour. Corresponding to Figure 10 it is the black block in the mask area.

[0098] To simplify the algorithm complexity, traverse all the contours and determine whether there is a contour that is completely contained within another contour. If so, consider this contour as noise or an invalid contour and delete it.

[0099] S1094: Delete the contour composed of a single pixel point.

[0100] Specifically, it can be to check the total number of pixel points contained in each contour. If a contour is composed of only a single pixel point, it is considered too small or does not meet the requirements of an actual contour, and it is deleted.

[0101] In the embodiments of the present application, the above steps S101 and S109 effectively remove noise contours and tiny contours that do not conform to the actual situation by collecting and processing ultrasonic images, using a preset image segmentation model, combining contour finding and envelope contour elimination, thereby simplifying the algorithm complexity and improving the calculation efficiency. In addition, for the unclear and noise problems in ultrasonic imaging, the envelope elimination strategy is adopted to further optimize the image processing results, ensuring the accurate extraction of the thyroid region and providing a reliable basis for subsequent diagnosis and analysis.

[0102] In the above step S102, when there is only one contour in a continuous plurality of ultrasonic images, any one of the plurality of ultrasonic images is used as a reference image, and the width of the contour in the reference image in the X-axis direction is determined as the reference width.

[0103] Specifically, it can be that when there is only one contour in a continuous plurality of ultrasonic images with a preset reference threshold, these ultrasonic images are regarded as a reference set, and any one of them is taken as the reference image. Starting from this reference image, subsequent correction work for misidentification in thyroid scanning is carried out.

[0104] Calculate the maximum width value of the contour in the reference image in the X-axis direction as the reference width.

[0105] In the embodiments of the present application, the selection of the reference image is particularly important in the process of eliminating misidentification in thyroid transverse scanning. As mentioned above, the area near the thyroid isthmus is more clearly and singularly displayed in ultrasonic images, and the recognition accuracy is relatively high. Therefore, this method starts from the thyroid isthmus and determines the reference image based on a single contour, which can minimize the interference caused by image noise and unclear imaging, contribute to the contour correction in subsequent images, and ensure the consistency and accuracy of the entire thyroid scanning process.

[0106] In the above step S103, for the ultrasonic images collected after multiple ultrasonic images, the following method is used for correction: for each contour to be processed in the ultrasonic image, determine the width of the contour to be processed in the X-axis direction as the real-time width, and calculate the proportion of the point set where the contour to be processed is located inside the circumcircle of the contour in the previous ultrasonic image. Specifically, it includes the following steps S1031 - S1035:

[0107] S1031: For the ultrasonic images collected after multiple ultrasonic images, for each contour to be processed in the ultrasonic image, determine the width of the contour to be processed in the X-axis direction as the real-time width.

[0108] Specifically, it can be that, using an image processing tool, such as the cv2.boundingRect() function in OpenCV, for each contour to be processed, calculate its width in the X-axis direction as the real-time width of the contour to be processed. This real-time width refers to the span of the minimum bounding rectangle (bounding box) of the contour on the X-axis, that is, the difference between the right boundary and the left boundary of the rectangle.

[0109] S1032: Fit the minimum circumcircle of all the contours in the previous ultrasonic image to obtain the circumcircle of the contours in the previous ultrasonic image.

[0110] Specifically, it can be that, using the cv2.minEnclosingCircle() function in OpenCV to process the contours in the previous ultrasonic image, obtain the minimum circumcircle of all the contours as the circumcircle of the contours in the previous ultrasonic image.

[0111] It should be noted that in the above step S102, if multiple consecutive ultrasonic images with only one contour inside are used as the reference set, then for the first ultrasonic image collected after the reference set, the previous ultrasonic image of this ultrasonic image is the reference image, and it is not necessary to process other ultrasonic images in the reference set except the reference image.

[0112] S1033: Determine the center and radius of the circumcircle of the contours in the previous ultrasonic image.

[0113] Specifically, it can be that, based on the circumcircle of the contours in the previous ultrasonic image obtained in the above step S1032, use the center and radius of the circumcircle calculated by the cv2.minEnclosingCircle() function.

[0114] S1034: Calculate the Euclidean distance from all the points inside the contour to be processed to the center of the circumcircle of the contours in the previous ultrasonic image.

[0115] Specifically, it can be calculated that the Euclidean distance from each pixel point within the contour to be processed to the center of the circumscribed circle of the contour of the previous ultrasonic image based on the following formula 1:

[0116]

[0117] In the formula, dis[t] represents the Euclidean distance from the t-th pixel point within the contour to be processed to the center of the circumscribed circle of the contour of the previous ultrasonic image, points[t] represents the t-th pixel point within the contour to be processed, and O i-1 represents the center of the circumscribed circle of the contour of the previous ultrasonic image.

[0118] S1035: Based on the Euclidean distances from all points within the contour to be processed to the center of the circumscribed circle of the contour of the previous ultrasonic image and the radius of the circumscribed circle of the contour of the previous ultrasonic image, calculate the proportion of the point set where the contour to be processed is located within the circumscribed circle of the contour of the previous ultrasonic image based on the following formula:

[0119]

[0120] In the formula, Ra is the proportion of the point set, n is the total number of pixel points within the contour to be processed, dis[t] represents the Euclidean distance from the t-th pixel point within the contour to be processed to the center of the circumscribed circle of the contour of the previous ultrasonic image, and R i-1 represents the radius of the circumscribed circle of the contour of the previous ultrasonic image, and 1 ||判断式|| is an indicator function, indicating that if the judgment formula holds, the value of the indicator function is 1, and if the judgment formula does not hold, the value of the indicator function is 0.

[0121] To facilitate those skilled in the art to understand this solution, the following further clearly and completely describes the specific implementation process of step S103 provided in the embodiments of the present application in combination with data expressions: For all contours to be processed P i in the i-th ultrasonic image P i Contours 1 、P i Contours 2 、…、P i Contours j (j>0), process all contours to be processed in sequence. First, calculate the Euclidean distance from each pixel point points[t] within the contour to be processed P i Contours j to the center O i-1 of the circumscribed circle of the contour of the previous ultrasonic image based on the above formula 1, and then calculate the proportion Ra of the point set where the contour to be processed is located within the circumscribed circle of the contour of the previous ultrasonic image based on the above formula 2.

[0122] In the embodiments of the present application, the above step S103 can effectively compare the contour changes between consecutive ultrasonic images, automatically evaluate whether the contour meets the expectations or requires further processing, providing an efficient and accurate way to analyze the contour changes in ultrasonic images and optimize the image analysis process.

[0123] In the above step S104, if the point set ratio is greater than the preset correct recognition threshold, the contour to be processed is retained.

[0124] Specifically, it can be that if the point set ratio is greater than the preset correct recognition threshold, it is considered that most of the pixel points of the contour to be processed are located within the circumcircle of the contour of the previous ultrasonic image, and the contour to be processed is the correctly identified thyroid contour, including the contour to be processed. Among them, the preset correct recognition threshold can be exemplarily set to 0.7.

[0125] In the above step S105, if the point set ratio is less than the preset misrecognition threshold, the contour to be processed is deleted from all the contours of the ultrasonic image.

[0126] Specifically, it can be that if the point set ratio is less than the preset misrecognition threshold, it is considered that the contour to be processed is located outside the circumcircle of the contour of the previous ultrasonic image and is a misrecognized parathyroid gland or blood vessel, and the contour to be processed is deleted. Among them, the preset misrecognition threshold can be exemplarily set to 0.2.

[0127] In the above step S106, if the point set ratio is greater than the preset misrecognition threshold and less than the preset correct recognition threshold, it is judged whether the ratio of the real-time width to the reference width is greater than the preset width threshold: if so, step S107 is executed; if not, step S108 is executed to retain the contour to be processed.

[0128] Specifically, it can be that if the point set ratio is greater than the preset misrecognition threshold and less than the preset correct recognition threshold, it is necessary to further judge the ratio of the real-time width to the reference width.

[0129] If the ratio of the real-time width to the reference width is greater than the preset width threshold, that is, L j >αL base , it is considered that part of the contour to be processed is an effective contour, meeting the expected thyroid region characteristics, and the subsequent thyroid cross-section segmentation result correction process can continue.

[0130] If the ratio of the real-time width to the reference width is less than the preset width threshold, that is, L j <αL base , it is considered that the contour to be processed is an effective contour and is retained as a correct discrimination.

[0131] Among them, L j represents the real-time width, and L baseLet \(w_0\) denote the reference width, and \(\alpha\) denote the preset width threshold, which can be exemplarily set to 1.2.

[0132] In the above step S107, the points on the contour to be processed that are located within the circumcircle of the contour of the previous ultrasound image are retained to obtain the corresponding corrected contour for further processing.

[0133] Specifically, it can be that all the pixel points on the contour to be processed that are located within the circumcircle of the contour of the previous ultrasound image are retained, and all the pixel points on the contour to be processed that are located outside the circumcircle of the contour of the previous ultrasound image are deleted, forming a new contour to cover the original contour to be processed.

[0134] In the embodiments of the present application, in the above steps S103 - S108, by judging the validity of the contour to be processed based on the point set ratio, the possibilities of misidentification and missed identification are reduced. At the same time, by judging through the ratio of the real - time width to the reference width, the recognition accuracy is further improved, ensuring that the contour of the thyroid region is accurately extracted. It provides an efficient and automated solution for ultrasound image analysis, improves the accuracy and reliability of image processing, and reduces manual intervention.

[0135] In the embodiments of the present application, after processing all the contours to be processed in an ultrasound image through the above steps S103 - S108, it is also necessary to execute step S110 to update the reference width, and step S111 to update the circumcircle, center, and radius of the contour of the previous ultrasound image.

[0136] Step S110 specifically includes the following steps S1101 - S1102:

[0137] S1101: Calculate the width of each contour in the X - axis direction in the processed ultrasound image.

[0138] Specifically, it can be that using an image - processing tool, such as the cv2.boundingRect() function in OpenCV, for each contour in the processed ultrasound image, calculate its width in the X - axis direction. This width refers to the span of the minimum bounding rectangle of the contour on the X - axis, that is, the difference between the right boundary and the left boundary of the rectangle.

[0139] S1102: If there is a contour in the processed ultrasound image whose width in the X - axis direction is greater than the reference width, then use the width of the contour in the X - axis direction as the new reference width.

[0140] Specifically, it can be that if the X - axis width of a certain contour is greater than the reference width, then use the width of this contour as the new reference width to complete the update of the reference width. This can ensure that the reference width always reflects the maximum thyroid contour width in consecutive ultrasound images, ensuring the accuracy in subsequent contour comparison.

[0141] Step S111 specifically includes the following steps S1111 - S1113:

[0142] S1111: Fit the minimum enclosing circle of all the contours in the processed ultrasonic image to obtain the contour enclosing circle of the ultrasonic image.

[0143] Specifically, it can be to use the cv2.minEnclosingCircle() function in OpenCV to process all the contours in the processed ultrasonic image, fit the minimum enclosing circle containing all the contours, and obtain the contour enclosing circle of the processed ultrasonic image.

[0144] S1112: Determine the center and radius of the contour enclosing circle of the processed ultrasonic image.

[0145] Specifically, it can be to extract the center and radius of the contour enclosing circle based on the result returned by cv2.minEnclosingCircle() in step S1111.

[0146] S1113: If the ratio of the radius of the contour enclosing circle to the radius of the contour enclosing circle of the previous ultrasonic image is less than the preset radius threshold, then use the center and radius of the contour enclosing circle of the previous ultrasonic image as the center and radius of the contour enclosing circle of the processed ultrasonic image.

[0147] Specifically, it can be to calculate the ratio of the radius of the contour enclosing circle of the currently processed ultrasonic image to the radius of the contour enclosing circle of the previous ultrasonic image. If this ratio is less than the preset radius threshold (such as 0.6), it is considered that the contour enclosing circle in the processed ultrasonic image is too small, and there may be a situation where the gland is not recognized. Then retain the center and radius of the contour enclosing circle of the previous ultrasonic image as the center and radius of the contour enclosing circle of the processed ultrasonic image. The mathematical expression is shown in formula 3 below:

[0148]

[0149] In the formula, O i is the center of the contour enclosing circle in the processed ultrasonic image, O i-1 is the center of the contour enclosing circle in the previous ultrasonic image, R i is the radius of the contour enclosing circle in the processed ultrasonic image, and R i-1 is the radius of the contour enclosing circle in the previous ultrasonic image.

[0150] This step helps to maintain the consistency of the contours in consecutive images and avoid introducing errors due to unnecessary changes.

[0151] In the embodiments of the present application, the above post - processing step S110 avoids the influence of width fluctuations between different ultrasonic images by ensuring that the reference width always reflects the largest thyroid contour, thereby maintaining the accuracy of contour comparison. Step S111 ensures the consistency of contours in consecutive images by dynamically adjusting the center and radius of the circumscribed circle of the contour. When the circumscribed circle of the contour in the ultrasonic image is too small or inaccurate, the information of the circumscribed circle of the contour in the previous ultrasonic image is automatically retained, thereby reducing the risk of mis - identification or omission. These post - processing steps jointly optimize the automatic analysis process of ultrasonic images and improve the stability and reliability of image processing.

[0152] In the embodiments of the present application, the ultrasonic images corrected by this method can effectively eliminate mis - identification. Based on Figure 4 the masked image of mis - identification of the parathyroid gland shown, the masked image after removing the parathyroid gland by this method is as Figure 11 shown, and the parathyroid gland contour on the right side is correctly removed. Based on Figure 6 the masked image of mis - identification of the blood vessel shown, the masked image after removing the blood vessel by this method is as Figure 12 shown, truncating the connected blood vessel area on the left side and retaining the correct transverse thyroid segmentation result.

[0153] Embodiment 2

[0154] Based on the same inventive concept, the embodiments of the present invention further provide a device for correcting the transverse thyroid segmentation result. Referring to Figure 13 shown, the device includes:

[0155] An image acquisition module 101, configured to acquire ultrasonic images obtained by the ultrasonic robot during real - time transverse scanning starting from the thyroid isthmus along a preset path to one side of the thyroid;

[0156] A reference confirmation module 102, configured to, when there is only one contour in multiple consecutive ultrasonic images, use any one of the multiple ultrasonic images as a reference image and determine the width of the contour in the reference image in the X - axis direction as the reference width;

[0157] A first calculation module 103, configured to correct the ultrasonic images acquired after the multiple ultrasonic images in the following manner: for each contour to be processed in the ultrasonic image, determine the width of the contour to be processed in the X - axis direction as the real - time width, and calculate the proportion of the point set of the contour to be processed located within the circumscribed circle of the contour in the previous ultrasonic image;

[0158] A first judgment module 104, configured to retain the contour to be processed when the proportion of the point set is greater than a preset correct identification threshold;

[0159] The second judgment module 105 is configured to delete the contour to be processed from all the contours of the ultrasonic image when the point set ratio is less than a preset misrecognition threshold value.

[0160] The third judgment module 106 is configured to judge whether the ratio of the real-time width to the reference width is greater than a preset width threshold value when the point set ratio is greater than the preset misrecognition threshold value and less than the preset correct recognition threshold value; if so, retain the points on the contour to be processed that are within the circumcircle of the contour in the previous ultrasonic image to obtain a corresponding corrected processed contour; if not, retain the contour to be processed.

[0161] Embodiment III

[0162] Based on the same inventive concept, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program / instructions are stored, and when the computer program / instructions are executed by a processor, the thyroid transverse cutting segmentation result correction method described in Embodiment I above is implemented.

[0163] Embodiment IV

[0164] Based on the same inventive concept, an embodiment of the present invention further provides a computer program product, including a computer program / instructions, and when the computer program / instructions are executed by a processor, the thyroid transverse cutting segmentation result correction method described in Embodiment I above is implemented.

[0165] Embodiment V

[0166] Based on the same inventive concept, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory, and when the processor executes the computer program, the thyroid transverse cutting segmentation result correction method described in Embodiment I above is implemented.

[0167] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories and optical memories, etc.) containing computer-usable program codes.

[0168] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices to produce a machine, such that the instructions executed by the processors of the computer or other programmable data processing devices produce means for implementing the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0169] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including instruction means that implement the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0170] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 one or more blocks.

[0171] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these changes and modifications.

Claims

1. A method for correcting thyroid cross-section segmentation results, characterized in that: include: The ultrasound robot takes the isthmus of the thyroid gland as the starting point and scans the thyroid gland in a transverse manner along a preset path in real time to acquire ultrasound images; When there is only one contour in a plurality of consecutive ultrasound images, any one of the plurality of ultrasound images is used as a reference image, and a width of the contour in the reference image in the X-axis direction is determined as a reference width; The ultrasound images acquired after the plurality of ultrasound images are corrected in the following manner: For each contour to be processed in the ultrasound image, determine the width of the contour to be processed in the X-axis direction as the real-time width, and calculate the proportion of the point set of the contour to be processed that is located within the contour circumscribed circle of the previous ultrasound image; If the point set ratio is greater than a preset correct recognition threshold, retaining the contour to be processed; If the point set ratio is less than a preset false recognition threshold, deleting the contour to be processed from all contours of the ultrasound image; If the point set ratio is greater than the preset false recognition threshold and less than the preset correct recognition threshold, determining whether the ratio of the real-time width to the reference width is greater than a preset width threshold; If yes, retain the points on the contour to be processed that are within the circumscribed circle of the contour of the previous ultrasound image to obtain the corresponding corrected processed contour; If not, the contour to be processed is retained.

2. The method according to claim 1, characterized in that The proportion of the point set of the contour to be processed that is within the circumscribed circle of the contour of the previous ultrasound image is calculated by the following method, including: Fitting the minimum circumscribed circle of all contours in the previous ultrasound image to obtain the contour circumscribed circle of the previous ultrasound image; Determine the center and radius of the circumscribed circle of the contour of the previous ultrasound image; Calculate the Euclidean distances from all points in the contour to be processed to the center of the circumscribed circle of the contour of the previous ultrasound image; According to the Euclidean distances from all points in the contour to be processed to the center of the circumscribed circle of the contour of the previous ultrasound image, and the radius of the circumscribed circle of the contour of the previous ultrasound image, the proportion of the point set of the contour to be processed that is located in the circumscribed circle of the contour of the previous ultrasound image is calculated based on the following formula: Where Ra is the point set ratio, n is the total number of pixels in the contour to be processed, dis[t] represents the Euclidean distance from the t-th pixel in the contour to be processed to the center of the circumscribed circle of the contour of the previous ultrasound image, and R i-1 represents the radius of the circumscribed circle of the previous ultrasound image, 1 ||判断式|| is an indicator function, which means that if the judgment expression is true, the value of the indicator function is 1, and if the judgment expression is not true, the value of the indicator function is 0.

3. The method according to claim 1, characterized in that After processing all the contours to be processed in an ultrasound image, it also includes: Calculate the width of each contour in the processed ultrasound image in the X-axis direction; If there is a contour in the processed ultrasound image whose width in the X-axis direction is greater than the reference width, the width of the contour in the X-axis direction is used as a new reference width.

4. The method according to claim 1, characterized in that: After processing all the contours to be processed in an ultrasound image, it also includes: Fitting the minimum circumscribed circle of all contours in the processed ultrasonic image to obtain the circumscribed circle of the contour of the processed ultrasonic image; Determining the center and radius of a circumscribed circle of the contour of the processed ultrasound image; If the ratio of the radius of the contour circumscribed circle to the radius of the contour circumscribed circle of the previous ultrasound image is less than a preset radius threshold, the center point and radius of the contour circumscribed circle of the previous ultrasound image are used as the center point and radius of the contour circumscribed circle of the processed ultrasound image.

5. The method according to claim 1, characterized in that The contours in the ultrasound image are obtained in the following way: Performing image segmentation on the ultrasound image based on a preset image segmentation model to obtain a mask image; Contour search is performed on the mask image to obtain all contours in the ultrasound image.

6. The method according to claim 5, characterized in that After all the contours in the ultrasound image are obtained, the method further includes: If there is a contour that is completely surrounded by another contour, delete the surrounded contour; Also, remove contours consisting of a single pixel.

7. A thyroid transverse section segmentation result correction device, characterized in that: include: An image acquisition module is used to obtain an ultrasound image acquired in real time by the ultrasound robot taking the isthmus of the thyroid gland as the starting point and scanning transversely along a preset path toward one side of the thyroid gland; A reference confirmation module, for, when there is only one contour in a plurality of consecutive ultrasound images, taking any one of the plurality of ultrasound images as a reference image, and determining a width of the contour in the reference image in the X-axis direction as a reference width; A first calculation module is used to correct the ultrasonic image acquired after the plurality of ultrasonic images in the following manner: for each contour to be processed in the ultrasonic image, determine the width of the contour to be processed in the X-axis direction as the real-time width, and calculate the proportion of the point set of the contour to be processed that is located within the contour circumscribed circle of the previous ultrasonic image; A first judgment module, configured to retain the contour to be processed when the point set ratio is greater than a preset correct recognition threshold; A second judgment module is used to delete the contour to be processed from all contours of the ultrasound image when the point set ratio is less than a preset false recognition threshold; The third judgment module is used to judge whether the ratio of the real-time width to the reference width is greater than the preset width threshold when the point set ratio is greater than the preset false recognition threshold and less than the preset correct recognition threshold; if so, retain the points on the contour to be processed that are within the circumscribed circle of the contour of the previous ultrasound image to obtain the corresponding corrected processed contour; if not, retain the contour to be processed.

8. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the method for correcting thyroid transverse section segmentation results according to any one of claims 1 to 6 is implemented.

9. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the method for correcting thyroid transverse section segmentation results according to any one of claims 1 to 6 is implemented.

10. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the method for correcting thyroid transverse section segmentation results according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Malignant nodule edge detection image processing method based on benign thyroid template

    CN112215842A

  • Ultrasonic imaging system and ultrasonic image display method

    CN118557219A

  • Thyroid region segmentation method and system based on CT image

    CN118864504A

  • Imaging evaluation device and imaging evaluation method for acoustic wave image

    JP2016022038A

  • Artificial intelligence ultrasound-medical-diagnosis apparatus using semantic segmentation and remote medical-diagnosis method using the same

    US20210224991A1