A magnetic resonance pancreaticobiliary duct imaging data labeling method, a training model and an intelligent navigation system
By using the LabelMe tool and deep processing technology, combined with superpixel segmentation algorithms, fast and accurate magnetic resonance cholangiopancreatography (MRCP) data annotation was achieved, solving the problem of low data annotation efficiency in existing technologies and improving the quality of MRCP images and the accuracy of intelligent navigation systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- THE FIRST AFFILIATED HOSPITAL OF GUANGZHOU MEDICAL UNIV (GUANGZHOU RESPIRATORY CENT)
- Filing Date
- 2025-09-30
- Publication Date
- 2026-07-24
AI Technical Summary
Existing technologies lack fast and accurate methods for annotating magnetic resonance pancreaticobiliary imaging data, making it impossible to construct bile duct annotation datasets with clear structures, accurate boundaries, and well-defined pathological features. This results in the inability to effectively support subsequent AI-based automatic segmentation, bile duct structure modeling, and disease-aided diagnosis.
Two-dimensional image annotation was performed using the LabelMe tool, combined with depth processing and superpixel segmentation algorithms. High-resolution images of bile duct structures were generated through a one-click fast annotation method, and multi-level quality control was implemented to ensure the consistency and accuracy of the annotations.
It enables the rapid and accurate construction of bile duct annotation datasets with clear structure, accurate boundaries, and well-defined pathological features, significantly improving MRCP image quality and semantic segmentation accuracy, and supporting subsequent intelligent navigation systems and disease diagnosis.
Smart Images

Figure CN121393777B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical technology, specifically to a magnetic resonance pancreaticobiliary imaging data annotation method, training model, and intelligent navigation system. Background Technology
[0002] Magnetic resonance cholangiopancreatography (MRCP) is a non-invasive imaging technique that clearly displays the biliary system and pancreatic duct structures. Compared to CT or ERCP, MRCP offers advantages such as no radiation exposure, high soft tissue resolution, and superior contrast. Therefore, it is widely used in clinical practice for the diagnosis and follow-up of biliary and pancreatic diseases, such as bile duct stones, bile duct strictures, bile duct dilatations, and biliary tumors.
[0003] High-quality annotation of MRCP data is a crucial step in combining medical imaging with artificial intelligence. A well-structured bile duct annotation dataset with clearly defined pathological features not only provides foundational data for the development and visualization of intelligent bile duct navigation systems and AI model development, but also promotes the intelligent application of MRCP in the diagnosis of biliary tract diseases. However, a search revealed that there are no publicly available methods specifically for annotating MRCP data in the current technology. This makes it impossible to quickly and accurately construct a bile duct annotation dataset with a clear structure, accurate boundaries, and well-defined pathological features, thus failing to provide solid data support for subsequent AI-based automatic segmentation, bile duct structure modeling, and disease-assisted diagnosis. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention proposes a magnetic resonance pancreatobiliary imaging data annotation method that can quickly and accurately construct a bile duct annotation dataset with clear structure, accurate boundaries, and well-defined pathological features, providing solid data support for subsequent AI-based automatic segmentation, bile duct structure modeling, and disease-aided diagnosis.
[0005] To achieve the above technical solution, the present invention provides a method for annotating magnetic resonance pancreaticobiliary imaging data, specifically including the following steps:
[0006] S1. Extract eligible MRCP images from the clinical case database, ensuring that all data has been stripped of patient personal identification information and in accordance with medical ethics and privacy protection requirements;
[0007] S2. Convert the original DICOM format image into PNG or JPEG two-dimensional image format, and perform depth processing on the two-dimensional image to highlight the bile duct structure while ensuring that the image resolution is not lower than the original acquisition accuracy.
[0008] S3. Use LabelMe as the annotation tool to delineate regions in the 2D image and generate annotation files in JSON format;
[0009] S4. After completing the initial drawing, the annotation personnel should check the annotation boundaries frame by frame to avoid omissions and errors in annotation.
[0010] S5. The annotation results shall be independently reviewed by two or more experienced radiologists or gastroenterologists. If there is any disagreement, a third expert shall make the decision.
[0011] S6. Calculate the consistency index among annotators and conduct key reviews and corrections for areas with low consistency.
[0012] S7. Store the approved annotation files and corresponding original images, and establish a unified naming and hierarchical system to form a standardized dataset.
[0013] Preferably, in step S2, the specific process of performing depth processing on the two-dimensional image is as follows:
[0014] S21. Given a low-resolution input image, extract the shallow features FS of the bile duct structure through a convolutional layer;
[0015] S22. Extract deep features (FD) of bile duct structure using a six-layer RHAG and an SFB module;
[0016] S23. Use global residual connections to fuse shallow features (FS) and deep features (FD) of the bile duct structure.
[0017] S24. Upsampling is performed using two 3×3 convolutional layers and pixel shuffling to reconstruct a high-resolution image that highlights the bile duct structure from the fused shallow features FS and deep features FD.
[0018] S25. Use a loss function to optimize the network parameters so that the difference between the reconstructed high-resolution image and the real high-resolution image is minimized.
[0019] Preferably, in step S2, if the image resolution is lower than the original acquisition accuracy, the image quality is improved by denoising and histogram equalization.
[0020] Preferably, in step S3, the specific process of using LabelMe as a labeling tool to delineate regions in the two-dimensional image is as follows:
[0021] S31. Import the MRCP image to be labeled into LabelMe;
[0022] S32. Based on the anatomical location, select the outline area of the bile duct in sequence, use the polygon tool, and use the one-click quick annotation method to obtain a complete depiction of the bile duct structure;
[0023] S33. After completing the drawing, name the area;
[0024] S34. Repeat the above operation for all slices until the entire bile duct system is labeled.
[0025] S35. Save the annotation results and generate the corresponding label PNG and JSON files.
[0026] Preferably, the specific process of the one-click rapid annotation method used in step S32 is as follows:
[0027] S321. Calculate the texture complexity of the image by calculating the gray-level co-occurrence matrix;
[0028] S322. Introduce the concept of image texture complexity into the superpixel segmentation algorithm, perform adaptive calculation and selection, and generate the most suitable superpixel segmentation result for each image.
[0029] S323. After generating the superpixel segmentation result, the result is combined with the original image. The operator clicks to select the candidate area, and the superpixel area where the mouse clicked pixel is located is filled by the seed fill algorithm to realize the mouse click annotation function.
[0030] S324. After the region selection is completed, the superpixel is filled using a filling algorithm. Cracks generated by the superpixel generation algorithm cannot be colored simultaneously. The generated filling region is a fragmented region with gaps between each superpixel. A closing operation is performed on the image with cracks to remove the cracks and generate the required complete bile duct structure depiction.
[0031] Preferably, in step S3, LabelMe is used as an annotation tool to annotate the anatomical structures of intrahepatic bile ducts, extrahepatic bile ducts, common bile ducts, and pancreatic ducts in MRCP images. If pathological features are present, additional markings are made according to research needs.
[0032] Preferably, in step S3, each two-dimensional MRCP image is independently labeled to ensure the continuity of anatomical structures on different slices.
[0033] Preferably, in step S3, different bile duct branches are marked according to anatomical classification and distinguished using different colors or label names, and the same anatomical structure is named consistently in different slices.
[0034] The present invention also provides a magnetic resonance cholangiopancreatography (MRCP) data training model, which uses the above-mentioned annotation method to obtain an MRCP bile duct annotation dataset, and performs deep learning training using the obtained MRCP bile duct annotation dataset.
[0035] The present invention also provides a magnetic resonance pancreatobiliary intelligent navigation system, which uses the above-mentioned annotation method to obtain an MRCP bile duct annotation dataset, and uses the obtained MRCP bile duct annotation dataset to reconstruct the bile duct structure, guiding the cholangioscope to explore and remove stones in the intrahepatic bile duct.
[0036] The beneficial effects of the magnetic resonance pancreatobiliary imaging data annotation method, training model, and intelligent navigation system provided by this invention are as follows:
[0037] 1) The magnetic resonance pancreatobiliary imaging data annotation method provided by this invention uses the LabelMe tool on two-dimensional MRCP slices, strictly follows the annotation range and naming specifications, and is supplemented by strict quality control, which can quickly and accurately construct a bile duct annotation dataset with clear structure, accurate boundaries and clear pathological features.
[0038] 2) The magnetic resonance cholangiopancreatography (MRCP) data annotation method provided by this invention can effectively improve the quality of MRCP images and significantly improve the accuracy of semantic segmentation by performing depth processing on two-dimensional images and super-resolution reconstruction on low-resolution images. It can obtain high-resolution images that highlight bile duct structures, providing a good image foundation for subsequent data annotation of the anatomical structures of intrahepatic bile ducts, extrahepatic bile ducts, common bile ducts, and pancreatic ducts in MRCP images.
[0039] 3) The magnetic resonance cholangiopancreatography (MRCP) data annotation method provided by this invention innovatively adopts a one-click fast annotation method to depict regions of two-dimensional images, which can effectively solve the problem of time-consuming and labor-intensive operation using traditional manual data annotation tools. This invention innovatively introduces superpixel segmentation algorithm into image annotation tasks. At the same time, it proposes to use the gray-level co-occurrence matrix to determine the complexity of the image in the dimension of texture features, which can achieve one-click fast annotation with high annotation accuracy, greatly improving the efficiency and accuracy of bile duct structure depiction in MRCP images.
[0040] 4) The present invention provides a magnetic resonance cholangiopancreatography (MRCP) data training model. The MRCP bile duct annotation dataset is obtained using the MRCP bile duct annotation method provided by the present invention, and deep learning training is performed using the obtained MRCP bile duct annotation dataset, which can significantly improve the segmentation accuracy and robustness of the training model.
[0041] 5) The present invention also provides a magnetic resonance pancreatobiliary intelligent navigation system, which uses the magnetic resonance pancreatobiliary imaging data annotation method provided by the present invention to obtain an MRCP bile duct annotation dataset, and uses the obtained MRCP bile duct annotation dataset to reconstruct the bile duct structure, guiding the cholangioscope to explore and remove stones in the intrahepatic bile duct, thus solving the problem of difficulty in cholangioscope positioning and inability to accurately locate the bile duct where the stones are located. Attached Figure Description
[0042] Figure 1 The flowchart shows the overall steps of the magnetic resonance pancreaticobiliary imaging data annotation method provided by the present invention.
[0043] Figure 2 This is a flowchart of the MRCP image labeling process using the LabelMe tool in this invention. Detailed Implementation
[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.
[0045] Example 1: A method for annotating data in magnetic resonance pancreaticobiliary imaging.
[0046] Reference Figure 1 and Figure 2 As shown, a magnetic resonance cholangiopancreatography (MRI) data annotation method mainly includes three steps: data preparation, annotation process, and quality control.
[0047] (I) Data Preparation Stage
[0048] (1) Data collection: Extract eligible MRCP images from the clinical case database, ensuring that all data have been stripped of patient personal identification information and comply with medical ethics and privacy protection requirements.
[0049] (2) Data preprocessing: Convert the original DICOM format image into a common two-dimensional image format (such as PNG or JPEG), and adjust the window width and window level appropriately. Then perform depth processing on the two-dimensional image to highlight the bile duct structure while ensuring that the image resolution is not lower than the original acquisition accuracy.
[0050] The specific process of depth processing for two-dimensional images is as follows:
[0051] S21. Given a low-resolution input image, extract shallow features FS of the bile duct structure through a convolutional layer; this step involves utilizing low-level image features, such as edge and texture information.
[0052] S22. Extract deep features (FD) of bile duct structure through a six-layer RHAG and an SFB module. The RHAG contains Hybrid Attention Blocks (HAB), Overlapping Cross-Attention Blocks (OCAB), and the SFB module. These modules work together to extract and fuse multi-scale features and global information.
[0053] S23. Use global residual connections to fuse shallow features (FS) and deep features (FD) of the bile duct structure; this operation helps to utilize information from all levels during reconstruction, thereby improving image quality.
[0054] S24. Two 3×3 convolutional layers and a pixel shuffle method are used for upsampling to reconstruct a high-resolution image that highlights the bile duct structure from the fused shallow features (FS) and deep features (FD). This step can highlight the bile duct structure while obtaining a high-resolution image.
[0055] S25. Use a loss function to optimize network parameters to minimize the difference between the reconstructed high-resolution image and the real high-resolution image, avoid image distortion, and thus improve the accuracy of subsequent bile duct structure annotation.
[0056] If the resolution of the image after deep processing is lower than the original acquisition accuracy, or if there are sequences with low signal-to-noise ratio, then the image quality needs to be improved through methods such as denoising and histogram equalization to facilitate subsequent manual annotation.
[0057] By performing depth processing on two-dimensional images in the above manner and performing super-resolution reconstruction on low-resolution images, the quality of MRCP images can be effectively improved, and the accuracy of semantic segmentation can be significantly improved. High-resolution images that highlight bile duct structures can be obtained, providing a good image foundation for subsequent data annotation of the anatomical structures of intrahepatic bile ducts, extrahepatic bile ducts, common bile ducts, and pancreatic ducts in MRCP images.
[0058] (3) Labeling tool selection: LabelMe was used as the labeling tool. This tool supports various labeling methods such as polygons, rectangles, and polylines, and can intuitively depict regions of two-dimensional images and automatically generate JSON format label files, which is convenient for subsequent data processing and model reading.
[0059] (II) Annotation Process Stage
[0060] Annotation targets: Primarily annotating anatomical structures such as intrahepatic bile ducts, extrahepatic bile ducts, common bile duct, and pancreatic duct in MRCP images. If pathological features are present (such as stones or strictures), additional annotations can be added as needed for the research.
[0061] Labeling principles:
[0062] (1) Layer-by-layer annotation: Each two-dimensional MRCP image is independently annotated to ensure the continuity of anatomical structures on different slices.
[0063] (2) Detailed drawing: Use the polygon tool to draw along the edge of the bile duct point by point to ensure that the envelope area matches the boundary of the anatomical structure, and avoid oversimplification or omission of small branches.
[0064] (3) Grading and labeling: Different bile duct branches are marked according to anatomical classification, such as left hepatic duct, right hepatic duct, common hepatic duct, etc., and different colors or labels are used to distinguish them.
[0065] (4) Consistency maintenance: The same anatomical structure is named consistently in different slices so that subsequent three-dimensional reconstruction or cross-slice data fusion can be carried out.
[0066] Annotation operation process:
[0067] (1) Import the MRCP image to be labeled into LabelMe.
[0068] (2) Based on the anatomical location, select the outline area of the bile duct in sequence, use the polygon tool, and use the one-click quick annotation method to obtain a complete depiction of the bile duct structure.
[0069] In order to effectively solve the problem of time-consuming and labor-intensive operation using traditional manual data annotation tools, this invention innovatively adopts a one-click rapid annotation method, the specific process of which is as follows:
[0070] First, the texture complexity of the image is calculated by using its statistical properties after calculating the gray-level co-occurrence matrix.
[0071] Secondly, the concept of image texture complexity is introduced into the superpixel segmentation algorithm for adaptive calculation and selection, generating the most suitable superpixel segmentation result for each image;
[0072] Next, after generating the superpixel segmentation result, the result is combined with the original image. The operator clicks to select the candidate area, and the superpixel area where the mouse clicked pixel is located is filled by the seed fill algorithm to realize the mouse click annotation function.
[0073] Finally, after the region selection is completed, the superpixel interior is filled using a filling algorithm. Cracks generated by the superpixel generation algorithm cannot be colored simultaneously. The generated filling region is a fragmented region with gaps between each superpixel. A closing operation is performed on the image with cracks to remove the cracks and generate the required complete bile duct structure depiction.
[0074] (3) After completing the drawing, name the area, such as “common_bile_duct”, “left_hepatic_duct”, etc.
[0075] Repeat the above steps for all slices until the entire bile duct system is labeled.
[0076] (4) Save the annotation results and generate the corresponding label PNG and JSON files.
[0077] This invention innovatively employs a one-click rapid annotation method for region depiction in 2D images, effectively solving the problem of time-consuming and labor-intensive operations using traditional manual data annotation tools. This invention innovatively introduces a superpixel segmentation algorithm into image annotation tasks and proposes using the gray-level co-occurrence matrix to determine the complexity of the image in the texture feature dimension. This enables one-click rapid annotation with high accuracy, significantly improving the efficiency and precision of depicting bile duct structures in MRCP images.
[0078] (III) Quality Control Stage
[0079] To ensure the accuracy and reliability of the annotation results, multi-level quality audits are required:
[0080] (1) Self-check: After completing the initial drawing, the annotator will check the annotation boundaries frame by frame to avoid omissions and errors in annotation.
[0081] (2) Expert review: The labeling results shall be independently reviewed by two or more radiologists or gastroenterologists with extensive experience. If there is any disagreement, a third expert shall make the decision.
[0082] (3) Consistency assessment: Calculate consistency indicators (such as Dice coefficient, IoU) among annotators, and conduct key reviews and corrections for areas with low consistency.
[0083] (4) Data processing: Store the approved annotation files and the original images, and establish a unified naming and hierarchical system to form a standardized dataset.
[0084] The magnetic resonance cholangiopancreatography (MRCP) data annotation method provided by this invention, using the LabelMe tool on two-dimensional MRCP slices, strictly adheres to annotation range and naming conventions, and is supplemented by rigorous quality control. This enables the rapid and accurate construction of a bile duct annotation dataset with clear structure, accurate boundaries, and well-defined pathological features. This dataset not only provides foundational data for subsequent development and visualization research of intelligent bile duct navigation systems and AI model development, but will also promote the intelligent application of MRCP in the diagnosis of biliary tract diseases. Specifically, it is demonstrated as follows:
[0085] (1) Construct a high-quality dataset: Through fine annotation, a MRCP bile duct dataset with clear structure and accurate boundaries is formed, providing a reliable training and verification foundation for subsequent algorithm research.
[0086] (2) Facilitating Model Training: Deep learning segmentation models (such as UNet, DeepLab, etc.) require a large amount of accurate labeled data as supervision signals. This labeled dataset can significantly improve the segmentation accuracy and robustness of the model.
[0087] (3) Development and visualization research of intelligent navigation system for bile duct: The complete labeled data can not only be used to train the model, but also for visualization research, structural analysis and quantitative research on bile duct related diseases, providing data support for subsequent scientific research papers and clinical research.
[0088] Example 2: A magnetic resonance pancreatobiliary imaging data training model.
[0089] The present invention also provides a magnetic resonance cholangiopancreatography (MRCP) data training model, which uses the MRCP data annotation method described in Example 1 to obtain an MRCP bile duct annotation dataset, and performs deep learning training on the obtained MRCP bile duct annotation dataset, which can significantly improve the segmentation accuracy and robustness of the training model.
[0090] Example 3: A magnetic resonance intelligent navigation system for the pancreatic and biliary ducts.
[0091] This invention also provides a magnetic resonance pancreatobiliary intelligent navigation system. It uses the magnetic resonance pancreatobiliary imaging data annotation method provided in Example 1 to obtain an MRCP bile duct annotation dataset, and uses the obtained MRCP bile duct annotation dataset to reconstruct the bile duct structure, guiding the cholangioscopy to explore and remove stones in the intrahepatic bile duct. This solves the problem of difficulty in cholangioscopy positioning and inability to accurately locate the bile duct where the stones are located.
[0092] The above description is only a preferred embodiment of the present invention, but the present invention should not be limited to the content disclosed in the embodiments and drawings. Therefore, any equivalent or modified embodiments made without departing from the spirit of the present invention shall fall within the protection scope of the present invention.
Claims
1. A method for annotating magnetic resonance pancreaticobiliary imaging data, characterized in that... Specifically, the steps include the following: S1. Extract eligible MRCP images from the clinical case database, ensuring that all data has been stripped of patient personal identification information and in accordance with medical ethics and privacy protection requirements; S2. Convert the original DICOM format image into PNG or JPEG two-dimensional image format, and perform depth processing on the two-dimensional image to highlight the bile duct structure while ensuring that the image resolution is not lower than the original acquisition accuracy. S3. Using LabelMe as the annotation tool, regions are depicted on the 2D image, and a JSON-formatted annotation file is generated; the specific process is as follows: S31. Import the MRCP image to be labeled into LabelMe; S32. Based on the anatomical location, select the outline area of the bile duct in sequence, and use the polygon tool to obtain a complete depiction of the bile duct structure using the one-click quick annotation method; the specific process of the one-click quick annotation method is as follows: S321. Calculate the texture complexity of the image by calculating the gray-level co-occurrence matrix; S322. Introduce the concept of image texture complexity into the superpixel segmentation algorithm, perform adaptive calculation and selection, and generate the most suitable superpixel segmentation result for each image. S323. After generating the superpixel segmentation result, the result is combined with the original image. The operator clicks to select the candidate area, and the superpixel area where the mouse clicked pixel is located is filled by the seed fill algorithm to realize the mouse click annotation function. S324. After the region selection is completed, the superpixel is filled by the filling algorithm. The cracks generated by the superpixel generation algorithm cannot be colored at the same time. The generated filling area is a fragmented area with gaps between each superpixel. A closing operation is performed on the image with cracks to remove the cracks and generate the required complete bile duct structure depiction. S33. After completing the drawing, name the area; S34. Repeat the above operation for all slices until the entire bile duct system is labeled. S35. Save the annotation results and generate the corresponding label PNG and JSON files; S4. After completing the initial drawing, the annotation personnel should check the annotation boundaries frame by frame to avoid omissions and errors in annotation. S5. The annotation results shall be independently reviewed by two or more experienced radiologists or gastroenterologists. If there is any disagreement, a third expert shall make the decision. S6. Calculate the consistency index among annotators and conduct key reviews and corrections for areas with low consistency. S7. Store the approved annotation files and corresponding original images, and establish a unified naming and hierarchical system to form a standardized dataset.
2. The magnetic resonance pancreatobiliary imaging data annotation method as described in claim 1, characterized in that, In step S2, the specific process of performing depth processing on the two-dimensional image is as follows: S21. Given a low-resolution input image, extract the shallow features FS of the bile duct structure through a convolutional layer; S22. Extract deep features (FD) of bile duct structure using a six-layer RHAG and an SFB module; S23. Use global residual connections to fuse shallow features (FS) and deep features (FD) of the bile duct structure. S24. Upsampling is performed using two 3×3 convolutional layers and pixel shuffling to reconstruct a high-resolution image that highlights the bile duct structure from the fused shallow features FS and deep features FD. S25. Use a loss function to optimize the network parameters so that the difference between the reconstructed high-resolution image and the real high-resolution image is minimized.
3. The magnetic resonance pancreatobiliary imaging data annotation method as described in claim 1, characterized in that, In step S2, if the image resolution is lower than the original acquisition accuracy, the image quality is improved by denoising and histogram equalization.
4. The magnetic resonance pancreatobiliary imaging data annotation method as described in claim 1, characterized in that, In step S3, LabelMe is used as an annotation tool to annotate the anatomical structures of intrahepatic bile ducts, extrahepatic bile ducts, common bile ducts, and pancreatic ducts in MRCP images. If pathological features are present, additional markings are made according to research needs.
5. The magnetic resonance pancreatobiliary imaging data annotation method as described in claim 1, characterized in that, In step S3, each two-dimensional MRCP image is independently labeled to ensure the continuity of anatomical structures on different slices.
6. The magnetic resonance pancreatobiliary imaging data annotation method as described in claim 1, characterized in that, In step S3, different bile duct branches are marked according to anatomical classification and distinguished by different colors or label names, and the same anatomical structure is named consistently in different slices.
7. A magnetic resonance pancreatobiliary imaging data training model, characterized in that: An MRCP bile duct annotation dataset is obtained using the annotation method described in any one of claims 1-6, and deep learning training is performed using the obtained MRCP bile duct annotation dataset.
8. A magnetic resonance intelligent navigation system for the pancreatic and biliary ducts, characterized in that: An MRCP bile duct annotation dataset is obtained using the annotation method described in any one of claims 1-6, and bile duct structure is reconstructed using the obtained MRCP bile duct annotation dataset to guide cholangioscopy for intrahepatic bile duct exploration and stone removal.
Citation Information
Patent Citations
Two-dimensional ultrasonic medical image restoration method based on mask guidance
CN115147303A
Face super-resolution graph reconstruction method and system based on deep learning
CN117011139A
Image focus recognition system for assisting digestive system department doctor in sampling inspection
CN119850632A