Abstract: In the task of 3D reconstruction of X-ray coronary artery, matching vessel branches in different viewpoints is a challenging task. In this study, this task is transformed into the process of vessel branches instance segmentation and then matching branches of the same color, and an instance segmentation network (YOLO-CAVBIS) is proposed specifically for deformed and dynamic vessels. Firstly, since the left and right coronary artery branches are not easy to distinguish, a coronary artery classification dataset is produced and the left and right coronary artery arteries are classified using the YOLOv8-cls classification model, and then the classified images are fed into two parallel YOLO-CAVBIS networks for coronary artery branches instance segmentation. Finally, the branches with the same color of branches in different viewpoints are matched. The experimental results show that the accuracy of the coronary artery classification model can reach 100%, and the mAP50 of the proposed left coronary branches instance segmentation model reaches 98.4%, and the mAP50 of the proposed right coronary branches instance segmentation model reaches 99.4%. In terms of extracting features of deformed and dynamic blood vessels, the YOLO-CAVBIS network proposed in this study is more applicable and advantageous than other types of instance segmentation networks, and can be used as a baseline model for the task of coronary artery branches instance segmentation. Code repository: \url{https://gitee.com/zaleman/ca_instance_segmentation}
All pretrain model in Baidu Cloud Disk: pretrain_model.zip
Link: https://pan.baidu.com/s/1tGarwELlwmNvNszx2ezVcA?pwd=3f7j Extraction code: 3f7j
Please download the pre-trained model and unzip it into the pretrain_model folder in the project directory.
+---example # example pictures
+---pics # Experimental pictures
+---pretrain_model # onnx pretrain model
\----RCA_onnx.onnx # The right coronary artery branches Instance segmentation onnx
\----LCA_onnx.onnx # The left coronary artery branches Instance segmentation onnx
\----tube_onnx.onnx # Root node identification onnx
\----Yolov8-cls.onnx #Categorical onnx
+---runs # Store the results saved after execution
+---script # Necessary code folder
mian.py # Main file for executionHere a set of left coronary artery and a set of right coronary artery data is prepared, running the main.py file will load the pre-trained model and output the 3D vessels. It contains the implementation of methods such as root node identification, big bar branch extraction, left and right branch matching, 3D coordinate calculation, and 3D rendering.
(1) The Coronary Branch Instance Segmentation algorithm is implemented using the ultralytics package, which contains the implementation of the YOLO-CAVISD algorithm, with its model configuration file in ./ultralytics/ultralytics/cfg/models/myseg. And its model deformable convolution mold is in ./ultralytics/ultralytics/nn/modules/block.py. How to train prepare the data and train the model please refer to the YOLOv8 official instructions of ultralytics(https://github.com/ultralytics/ultralytics). We need to train to get onnx model for mian.py file call.
A small portion of the data for each of the four datasets is available in the dataset folder of ultralytics for informational purposes only.
+ultralytics
| +---datasets
| | +---CAC8_yolo # Categorical data sets
| | | +---train
| | | | +---L_LAO_CAU #angle 1
| | | | \---R_RAO_CRA #angle 2
| | | \---val
| | | +---L_LAO_CAU
| | | \---R_RAO_CRA
| | +---tube_yolo #Root node identification dataset
| | | +---train
| | | | +---images
| | | | +---json
| | | | \---labels
| | | \---val
| | | +---images
| | | +---json
| | | \---labels
| | +---vessel_left #The left coronary artery branches Instance segmentation dataset
| | | +---train
| | | | +---images
| | | | +---json
| | | | \---labels
| | | \---val
| | | +---images
| | | +---json
| | | \---labels
| | \---vessel_right #The right coronary artery branches instance segmentation dataset
| | +---train
| | | +---images
| | | +---json
| | | \---labels
| | \---val
| | +---images
| | +---json
| | \---labels(2) The left and right coronary artery classification ref: ./script/CAC.py
(3) The left and right coronary artery branches segmentation ref: ./script/CAS.py
(4) Root node identification requires loading the root node identification model ./pretrain_model/tube.onnx.
(5) The left and right coronary artery branches matched in ./script/match.py with internal singled out vessel branch extraction in ./script/vessel_group.py.
(6) Calculate the 3D point method in ./script/compute_3d.py.
(7) The 3D rendering is in ./script/creat3D_tube.py.
