Rapid data labeling method for familial brain cavernous hemangioma image
By using bounding box prompts in medical image segmentation combined with the SAM model and BBTS method, fast and efficient data annotation is achieved, solving the problems of sample scarcity and difficulty in annotation, significantly reducing doctor workload and improving annotation efficiency.
Patent Information
- Application Number
- CN202410245914.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-05
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-03-05
AI Technical Summary
In medical image segmentation, existing technologies face problems such as sample scarcity, difficulty in data annotation, and unbalanced sample features. In particular, traditional manual contour annotation is time-consuming and laborious, and semi-automatic segmentation annotation methods require high computing power and lack zero-sample migration capabilities. It performs particularly poorly on medical images.
Adopt a fast data annotation method, use a simple covering target bounding box as a prompt, combine the SegmentAnything (SAM) model and the box binary threshold segmentation (BBTS) method for segmentation annotation, and optimize the segmentation network through iterative training to get more Qualified annotation data.
It significantly reduces the workload of doctors' manual contour tracking annotation, saves annotation time, improves the accuracy and efficiency of image segmentation, and alleviates the problem of insufficient sample size in the medical field.
Smart Images

Figure CN118537286A
Abstract
Description
Technical Field
[0001] The invention relates to a fast data annotation method for familial cerebral cavernous hemangioma images. Background Art
[0002] In recent years, the outstanding performance of deep learning algorithms has made it the preferred method for medical image segmentation. The continuous advancement of medical imaging technology has further enhanced the applicability of deep learning in the medical field. However, the application of deep learning in the medical field still faces many challenges, such as sample scarcity, data annotation difficulties, and sample feature imbalance. Due to the high complexity of medical images, annotated medical data is both scarce and expensive. Therefore, the application of image segmentation in medical research is limited.
[0003] Traditional manual contour annotation methods are often time-consuming and laborious. Many researchers have proposed a series of segmentation-assisted annotation strategies, including iterative training annotation of segmentation networks, binary threshold segmentation annotation, etc. For example, Deng et al. developed a new medical image annotation framework that combines active learning and U-shaped networks to obtain the most effective annotation candidates through iterative training. Racimora et al. studied a semi-automatic segmentation annotation method based on active contours and subvoxel morphology algorithms, and determined the morphological threshold for segmentation through the BridgeBurner algorithm. In recent years, the SegmentAnything (SAM) segmentation model proposed by Kirillov et al. has greatly promoted the progress in the field of image segmentation. It can achieve segmentation of target areas based on points, bounding boxes, text, and masks as prompts. It is the first large-scale basic model focused on image segmentation and exhibits excellent zero-sample migration capabilities.
[0004] The iterative training and annotation of the segmentation network requires the support of certain annotated data. If the traditional manual contour tracking annotation is used, there is still a lot of annotation work. The semi-automatic segmentation and annotation method proposed by Racimora et al. requires more computing power, and for some segmentation targets with complex surrounding pixels, threshold segmentation often cannot achieve accurate segmentation of the target. Due to the lack of medical images and corresponding label data, the zero-sample migration capability of the SAM segmentation model on medical images is poor. Summary of the invention
[0005] The purpose of the present invention is to provide a fast data annotation method for familial cerebral cavernous hemangioma (FCCM) images, using a simple bounding box covering the target as a prompt, and using SAM model segmentation and threshold segmentation for segmentation and annotation, so as to complement the defects of the two methods and obtain more qualified annotated data. We call the threshold segmentation within the bounding box box binarization threshold segmentation (BBTS), which adopts the Otsu's algorithm adaptive segmentation threshold which is simpler than the Bridge Burner algorithm. SAM model segmentation is implemented by using the box prompt segmentation contained in its model. After using the two box prompt segmentation and annotation methods to annotate part of the data, the segmentation network is iteratively trained to annotate the remaining data.
[0006] To achieve the above-mentioned purpose, the technical scheme of the present invention is: a fast data annotation method for familial cerebral cavernous hemangioma images, using a simple bounding box covering the target as a prompt, and using SAM model segmentation and box binarization threshold segmentation BBTS for segmentation annotation, followed by screening to obtain qualified masks, preliminarily training a segmentation network, and iteratively training and annotating the images corresponding to the remaining unqualified masks with the images without annotated bounding boxes; in each iteration, part of the segmentation masks are screened, and the qualified masks are merged into the training data, and then iterative training is performed to optimize the segmentation performance of the segmentation network and obtain more qualified masks; after multiple iterations, the unqualified masks are still semi-automatically annotated and corrected, including deleting the over-segmented areas and filling the under-segmented areas, and finally completing the annotation.
[0007] In one embodiment of the present invention, the SAM model segmentation is based on the hint encoder framework provided by the large model, which allows the target area to be segmented using bounding box hints; the coordinate data corresponding to the marked bounding box is obtained, and the coordinates of the upper left and lower right vertices are specified; then, the bounding box guided target segmentation method of the SAM model is used to segment the lesion area, thereby achieving fast and efficient segmentation and labeling.
[0008] In one embodiment of the present invention, box binarization threshold segmentation (BBTS) limits the binarized area within a bounding box, and automatically generates a segmentation threshold based on the pixel features within the box; uses the coordinates of the marked bounding box to extract corresponding patches from the original FCCM image of familial cavernous hemangioma; then, applies binary threshold segmentation to these patches, and superimposes the segmentation results of each patch on a background image that matches the size of the original FCCM image to complete the segmentation annotation.
[0009] In one embodiment of the present invention, the method is specifically implemented in the following steps:
[0010] S1. Input the FCCM 3D image of familial cerebral cavernous hemangioma, slice it along the z axis, obtain a total of N FCCM2D images, and construct the FCCM image set X = {x 1 ,x 2 ,...,x N};
[0011] S2. Take L images from the FCCM image set X to annotate the bounding box of the lesion. Combined with the bounding box prompt, use the SAM and BBTS segmentation methods to perform bounding box prompt segmentation and annotation on the L images. Compare the L images with the SAM and BBTS segmentation masks, and screen to obtain masks with qualified annotations by both methods, masks with qualified annotations by SAM only, masks with qualified annotations by BBTS only, and masks with unqualified annotations. The specific expressions are as follows:
[0012] m i =SAM(x i ,b i ) (1)
[0013] n i =BBTS(x i ,b i ) (2)
[0014] k i =DS(x i ,m i ,n i ) (3)
[0015] where i∈{1,2,…,L}, x i represents the FCCM 2D image with bounding box annotation, b i represents the marked rectangular box, i.e., the bounding box, k i represents the qualified mask screened out, and DS represents the doctor screening;
[0016] S3, using all qualified masks obtained in step S2 to train the segmentation network, the trained segmentation network performs segmentation prediction on the unqualified labeled pictures and the pictures without labeled bounding boxes, screens qualified masks to add to the training data to optimize the segmentation network, and then performs segmentation prediction on the remaining pictures, and repeats this cycle to perform iterative training and labeling; semi-automatically label and correct the unqualified masks after iterative training, delete the wrong labels and fill the insufficiently segmented areas, and finally complete all labeling; the specific expression is as follows:
[0017]
[0018] N seg =Train(X j ,K j ) (5)
[0019] P j =Predict(N seg ,XX j ) (6)
[0020] Q j =SS(P j ) (7)
[0021] j represents the number of iterative training, K j represents the qualified mask for each iteration, X j Indicates that K j The corresponding FCCM image, N seg represents the trained segmentation network, P j is the predicted mask of the FCCM image without obtaining a qualified mask, Q j is the qualified prediction mask selected; in the first round of iteration, K j are the M qualified masks in the initial annotation, and the qualified prediction masks in each round of screening are incorporated into the K j , the segmentation performance of the network is continuously optimized through iterative training, and segmentation prediction is continued for the remaining images that have not obtained qualified masks. Train, Predict, and SS represent the training of the segmentation network, image segmentation prediction, and prediction mask screening respectively;
[0022] Z=DC(W) (8)
[0023] Y=K+Z (9)
[0024] K and W represent the qualified mask and the unqualified mask after bounding box prompt annotation and iterative training annotation, respectively. Z represents the qualified mask obtained after semi-automatic annotation correction of W. Y is the final mask of all FCCM images, and DC represents the doctor's annotation correction.
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] (1) The method studied combines semi-automatic segmentation and annotation with iterative training annotation. Semi-automatic segmentation and annotation replaces traditional manual contour tracking and annotation to obtain the preliminary training label data set required for iterative training. The applied semi-automatic segmentation method only needs to annotate the rectangular bounding box of the lesion, and then uses the BBTS and SAM methods to achieve segmentation and annotation. This method greatly reduces the workload of doctors' manual contour tracking and annotation and saves annotation time.
[0027] (2) From Figure 2It can be seen that although both SAM and BBTS segmentation and annotation methods have inherent limitations, they each have their own more adaptable segmentation target areas. The problem of inaccurate segmentation of certain lesion areas by one method can be largely compensated by another method, which also enables doctors to obtain more qualified annotation masks when screening the annotation results of semi-automatic segmentation.
[0028] (3) We annotate most of the data through iterative training of the segmentation network, further reducing the annotation workload of doctors.
[0029] Application: This method can be used for the rapid annotation of FCCM image data. It can obtain better annotation results while saving time and workload, and alleviate the problem of insufficient sample size in the application of image segmentation in the medical field. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 The present invention is a flow chart of a rapid data annotation method for familial cerebral cavernous hemangioma images.
[0031] Figure 2 The following are examples of the present invention. DETAILED DESCRIPTION
[0032] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings.
[0033] The present invention proposes a fast and efficient data annotation method for familial cerebral cavernous hemangioma (FCCM) images. We use a simple bounding box covering the target as a hint, and use SAM model segmentation and threshold segmentation for segmentation and annotation, so as to complement the defects of the two methods and obtain more qualified annotated data. We call the threshold segmentation within the bounding box box binarization threshold segmentation (BBTS), which uses the Otsu's algorithm adaptive segmentation threshold which is simpler than the Bridge Burner algorithm. SAM model segmentation is implemented by using the box hint segmentation contained in its model. After annotating part of the data using the two box hint segmentation and annotation methods, the segmentation network is iteratively trained to annotate the remaining data.
[0034] The data annotation process is as follows Figure 1As shown in the figure. We annotated the lesions in some FCCM images with bounding boxes, and used the bounding boxes as hints to perform segmentation and annotation using the SAM model segmentation and box binarization threshold segmentation (BBTS). Doctors screened to obtain qualified annotation masks, which were used to preliminarily train a segmentation network. The images corresponding to the remaining unqualified masks were iteratively trained and annotated with the images without annotated bounding boxes. In each iteration, we screened some segmentation masks, merged qualified masks into the training data, and then iterated the training to achieve better segmentation performance of the network. The segmentation masks of a small number of difficult samples that were still unqualified after multiple iterations were semi-automatically annotated and corrected by doctors, including deleting over-segmented areas and filling under-segmented areas.
[0035] The annotation using the SAM model is based on the hint encoder framework provided by the large model, which allows the target region to be segmented using bounding box hints. We obtain the coordinate data corresponding to the annotated bounding box, specifying the coordinates of the upper left and lower right vertices. Subsequently, we use the bounding box guided target segmentation method of the SAM model to segment the lesion region, thereby achieving fast and efficient segmentation annotation.
[0036] For BBTS annotation, this method restricts the binarized area to a bounding box and automatically generates segmentation thresholds based on the pixel features within the box. We use the coordinates of the labeled bounding box to extract the corresponding patches from the original FCCM image. Subsequently, we apply binary threshold segmentation to these patches and superimpose the segmentation results of each patch on a background image that matches the size of the original FCCM image to complete the segmentation annotation.
[0037] Specific implementation examples of the method of the present invention.
[0038] (1) Using professional imaging equipment in the hospital, 101 volumes of FCCM MRI SWI sequence images were obtained.
[0039] (2) The obtained FCCM 3D images were sliced along the z-axis to obtain a total of 4089 2D images, and data annotation research was performed on these slices.
[0040] (3) Take 1579 FCCM 2D images and annotate the lesions in these 2D images with bounding boxes in preparation for segmentation and annotation based on box hints.
[0041] (4) Combined with bounding box hints, the SAM and BBTS segmentation methods are used to perform box hint segmentation and annotation on 1579 images.
[0042] (5) A total of 1579 FCCM images were compared with the BBTS and SAM segmentation masks. Doctors screened and obtained masks that were qualified by both methods, masks that were qualified by only BBTS, masks that were qualified by only SAM, and masks that were unqualified.
[0043] (6) Use all qualified annotated masks to train the segmentation network.
[0044] (7) The trained segmentation network performs segmentation prediction on images with unqualified annotations and images without labeled bounding boxes, selects qualified segmentation masks and adds them to the training data to optimize the segmentation network, and then performs segmentation prediction on the remaining images. This cycle is repeated for iterative training and annotation.
[0045] (8) Masks that are still unqualified after iterative training are semi-automatically annotated and corrected by doctors to delete incorrect labels and fill in areas with insufficient segmentation.
[0046] (9) Complete the labeling of all images.
[0047] Algorithm 1 is a pseudo code for the specific implementation of the above implementation example.
[0048]
[0049] Figure 2 The present invention is marked with an example diagram, from Figure 2 It can be seen that both the SAM and BBTS segmentation and labeling methods have inherent limitations. The present invention combines the adaptive segmentation target areas of the two methods to achieve that the problem of inaccurate segmentation of certain lesion areas by one method can be largely compensated by another method. This also enables doctors to obtain more qualified labeling masks when screening the labeling results of semi-automatic segmentation.
[0050] The above are preferred embodiments of the present invention. Any changes made according to the technical solution of the present invention, as long as the resulting functions do not exceed the scope of the technical solution of the present invention, belong to the protection scope of the present invention.
Claims
1. A fast data annotation method for familial cerebral cavernous hemangioma images, characterized in that: A simple bounding box covering the target is used as a hint, and the SAM model segmentation and box binarization threshold segmentation BBTS are used for segmentation and annotation. Then, qualified masks are screened to initially train a segmentation network. The images corresponding to the remaining unqualified masks are iteratively trained and annotated with the images without the labeled bounding box. In each iteration, some segmentation masks are screened, and qualified masks are merged into the training data. Then, the training is iterated to optimize the segmentation performance of the segmentation network and obtain more qualified masks. Masks that are still unqualified after multiple iterations are semi-automatically annotated and corrected, including deleting over-segmented areas and filling under-segmented areas, and finally completing the annotation.
2. A fast data annotation method for familial cerebral cavernous hemangioma images according to claim 1, characterized in that: The SAM model segmentation is based on the hint encoder framework provided by the large model, which allows the target area to be segmented using bounding box hints; the coordinate data corresponding to the marked bounding box is obtained, and the coordinates of the upper left and lower right vertices are specified; then, the bounding box guided target segmentation method of the SAM model is used to segment the lesion area, thereby achieving fast and efficient segmentation and annotation.
3. A fast data annotation method for familial cerebral cavernous hemangioma images according to claim 1, characterized in that: Box Binarization Threshold Segmentation (BBTS) limits the binarized area to a bounding box and automatically generates a segmentation threshold based on the pixel features within the box; the coordinates of the marked bounding box are used to extract the corresponding patch from the original FCCM image; Subsequently, binary threshold segmentation is applied to these patches, and the segmentation result of each patch is superimposed on a background image that matches the size of the original FCCM image to complete the segmentation annotation.
4. The fast data annotation method for familial cerebral cavernous hemangioma images according to claim 1, characterized in that: The specific implementation steps of this method are as follows: S1. Input FCCM 3D images of familial cerebral cavernous hemangioma, slice them along the z-axis, obtain N FCCM 2D images in total, and construct FCCM image set X = {x1, x2, ..., x N }; S2. Take L images from the FCCM image set X to annotate the bounding box of the lesion. Combined with the bounding box prompt, use the SAM and BBTS segmentation methods to perform bounding box prompt segmentation and annotation on the L images. Compare the L images with the SAM and BBTS segmentation masks, and screen to obtain masks with qualified annotations by both methods, masks with qualified annotations by SAM only, masks with qualified annotations by BBTS only, and masks with unqualified annotations. The specific expressions are as follows: m i =SAM(x i ,b i ) (1) n i =BBTS(x i ,b i ) (2) k i =DS(x i ,m i ,n i ) (3) where i∈{1,2,…,L}, x i represents the FCCM 2D image with bounding box annotation, b i represents the marked rectangular box, i.e., the bounding box, k i represents the qualified mask screened out, and DS represents the doctor screening; S3, using all qualified masks obtained in step S2 to train the segmentation network, the trained segmentation network performs segmentation prediction on the unqualified labeled pictures and the pictures without labeled bounding boxes, screens qualified masks to add to the training data to optimize the segmentation network, and then performs segmentation prediction on the remaining pictures, and repeats this cycle to perform iterative training and labeling; semi-automatically label and correct the unqualified masks after iterative training, delete the wrong labels and fill the insufficiently segmented areas, and finally complete all labeling; the specific expression is as follows: N seg =Train(X j ,K j ) (5) P j =Predict(N seg ,X-X j ) (6) Q j =SS(P j ) (7) j represents the number of iterative training, K j represents the qualified mask for each iteration, X j Indicates that K j The corresponding FCCM image, N seg represents the trained segmentation network, P j is the predicted mask of the FCCM image without obtaining a qualified mask, Q j is the qualified prediction mask selected; in the first round of iteration, K j are the M qualified masks in the initial annotation, and the qualified prediction masks in each round of screening are incorporated into the K j , the segmentation performance of the network is continuously optimized through iterative training, and segmentation prediction is continued for the remaining images that have not obtained qualified masks. Train, Predict, and SS represent the training of the segmentation network, image segmentation prediction, and prediction mask screening respectively; Z=DC(W) (8) Y=K+Z (9) K and W represent the qualified mask and the unqualified mask after bounding box prompt annotation and iterative training annotation, respectively. Z represents the qualified mask obtained after semi-automatic annotation correction of W. Y is the final mask of all FCCM images, and DC represents the doctor's annotation correction.
Citation Information
Patent Citations
A semi-supervised image instance segmentation method based on stepwise adversarial learning
CN109949317A
Unsupervised medical image segmentation method based on adversarial network
CN112734764A
Metallographic structure acquisition method and device, storage medium and chip
CN116721115A
Medical image segmentation method based on multi-level feature extraction and attention mechanism fusion
CN117456183A
Multi-task hybrid supervised medical image segmentation method and system based on federated learning
JP7386370B1
Cited By
Ultrasound image segmentation model training method, segmentation method and system
CN120747123A
