The PyTorch re-implement of a 3D CNN Tracker to extract coronary artery centerlines with state-of-the-art (SOTA) performance. (paper: 'Coronary artery centerline extraction in cardiac CT angiography using a CNN-based orientation classifier')

Overview

Coronary Artery Tracking via 3D CNN Classification Pytorch

The PyTorch re-implement of a 3D CNN Tracker to extract coronary artery centerlines with state-of-the-art (SOTA) performance. (paper: 'Coronary artery centerline extraction in cardiac CT angiography using a CNN-based orientation classifier')

Link to paper here.

Key idea

A 3D dilated CNN is trained to predict the most likely direction and radius of an artery at any given point in a CCTA image based on a local image patch. We use a 3D Fibonacci ball to model a CNN Tracker, where the radius of the ball represents the radius of the vessel at the current position, and the points on the ball represent a possible direction of movement.

Starting from a single seed point placed manually or automatically anywhere in a coronary artery, a tracker follows the vessel centerline in two directions using the predictions of the CNN.

Tracking is terminated when no direction can be identified with high certainty.

In order to create a vessel tree automatically, we need to train three neural networks.

  • Firstly, we need to train a centerline net to predict the two directions(d0, d1) of the current position that can be moved and the vessel radius.
  • Secondly, we need to train a neural network to find two entrance points of a coronary artery.
  • The third network is responsible for placing seed points in the image

Architecture of Centerline Net

Layer 1 2 3 4 5 6 7
Kernel width 3 3 3 3 3 1 1
Dilation 1 1 2 4 1 1 1
Channels 32 32 32 32 64 64 D+1
Field width 3 5 9 17 19 19 19

The number of output channels is equal to the number of potential directions in D, plus one channel for radius estimation.

The architecture of seedspint_net and ostiapoint_net are very similar to centerline_net. The only difference is in the output layer: instead of combining classification and regression, the final layer only performs regression.

Installation

To install all the required dependencies:

$ pip install -r requirement.txt

Training

1. Preparing CTA08 dataset

Tip:
CAT08 datasets need to be registered and certified in this website before it can be downloaded. It should be noted that your registration email may not be received by the server of the above website. If you have this problem, download this form, compile it and contact Dr.Theo van Walsum ([email protected]).

  1. Unzip training.tar.gz to:
    Coronary-Artery-Tracking-via-3D-CNN-Classification/
            -data_process_tools/
                -train_data/
                    -dataset00/
                    -dataset01/
                    -dataset02/
                    -dataset03/
                    -dataset04/
                    -dataset05/
                    -dataset06/
                    -dataset07/
  1. Create spacing_info.csv and nii.gz data
python3 creat_spacinginfo_data_tool.py
  1. Create centerline patch data
  • Create no offset samples
python3 centerline_patch_generater_no_offset.py
  • Create samples with offset
python3 centerline_patch_generater_offset.py
  1. Create seeds patch data
  • Create positve samples
python3 seedpoints_patch_generater_postive.py     
  • Create negative sample
python3 seedpoints_patch_generater_negative.py

those scripts will automaticlly create folders

-data_process_tools/
    -patch_data/
         -centerline_patch/
            -no_offset/
                 -point_500_gp_1/
                     -d0/
                     d0_patch_info_500.csv 
                     .
                     .
                     .
                     -d7/
                     d7_patch_info_500.csv
            -offset/
                  -point_500_gp_1/
                     -d0/
                     d0_patch_info_500.csv
                     .
                     .
                     .
                     -d7/
                     d7_patch_info_500.csv
  1. Create osita patch data
  • Create positve samples
python3 ostiapoints_patch_generater_positive.py
  • Create negative sample
python3 ostiapoints_patch_generater_negative.py

It should be noted that 8 samples corresponding to the data will be produced here, and the specific training set and test set division also need to write your own code to divide the data set and generate the train CSV file and val CSV file

2.Training Models

  1. Training centerline net
cd centerline_train_tools/
CUDA_VISIBLE_DEVICES=0 python3 centerline_train_tools.py
  1. Training seedpoints net
cd seedspoints_train_tools/
CUDA_VISIBLE_DEVICES=0 python3 seeds_train_tools.py
  1. Training ostiapoints net
cd ostiapoints_train_tools
CUDA_VISIBLE_DEVICES=0 python3 ostia_train_tools.py 

3.Create coronary artery vessels tree

cd infer_tools_tree/

First, you need to modify settingy.yaml replacing the path inside to the path of the file you saved

python3 vessels_tree_infer.py

The predicted vessel tree is shown in the figure below

The vessels from different seed points are spliced by breadth-first search, and then a complete single vessel is generated by depth-first search

Seedpoints net will generate 200 seed points as shown in the figure below. It can be seen that the seed points are distributed near several coronary arteries

References

@article{wolterink2019coronary,
  title={Coronary artery centerline extraction in cardiac CT angiography using a CNN-based orientation classifier},
  author={Wolterink, Jelmer M and van Hamersvelt, Robbert W and Viergever, Max A and Leiner, Tim Leiner, Ivana},
  journal={Medical image analysis},
  volume={51},
  pages={46--60},
  year={2019},
  publisher={Elsevier}
}
Comments
  •  search_one_direction function

    search_one_direction function

    Hi,

    I have ran vessels_tree_infer.py and found something wrong with the search_one_direction in build_vessel_tree.py. Condition of the while loop keep unchanged so that's an infinite loop and cannot run a result. How to solve the problem? Thank you.

    image

    opened by DanniLi36 3
  • Problem about dataset format

    Problem about dataset format

    I have concat to Dr.Theo van Walsum for dataset support, but I failed. could someone tell me some CTA08 dataset info ? which can help me make my own dataset.

    what is the 'reference.txt' in each data tells about???

    Thank you very mach!

    opened by wxqTS 2
  • Fix small errors I encounter while reproducing the results

    Fix small errors I encounter while reproducing the results

    First of all, I want to say thanks to the authors for making this code available.

    In this PR, I am updating the following:

    • Add SimpleITK to requirements.txt
    • Rename training_data to train_data in readme to be consistent with code
    • Fix path to reference.txt in seedpoints..positive.py
    • Improve markdown style in readme.md
    opened by gvieralopez 1
  • train_save_d1_train.csv

    train_save_d1_train.csv

    Hi, thanks for your awesome code. When I ranCUDA_VISIBLE_DEVICES=0 python centerline_train_tools.py, I got an error File /Coronary-Artery-Tracking-via-3D-CNN-Classification/data_process_tools/patch_data/centerline_patch/train_save_d1_train.csv does not exist. I didn't find the code creating this .csv file in other .py files. Could you help me?

    opened by AManHasNoName12138 0
  • question on code

    question on code

    center_x_pixel = get_spacing_res2(center_x, spacing_x, resize_factor[1]) center_y_pixel = get_spacing_res2(center_y, spacing_y, resize_factor[2]) center_z_pixel = get_spacing_res2(center_z, spacing_z, resize_factor[0])

    May I know why for center_x_pixel, the index of resize_factor is 1? Thanks!

    opened by ziqing-wan99 0
  • How to Make a label

    How to Make a label

    Hello, I would like to ask how to make the label, is the label converted into txt? There should be several txt files, what is the content of this txt file? Looking forward to your reply

    opened by wxr521314 0
  • what is train input

    what is train input

    hi, thanks for your sharing. I would like to know, what is the input of this code and training? Is it the image with the label. Is laibel a line segment with a center point?

    opened by wxr521314 0
  • CAT08 Dataset or make own dataset?

    CAT08 Dataset or make own dataset?

    Anyone could share CAT08 Dataset for research? The website link of this dataset is invalid now. Or Who shall teach me how to make my own dataset for coronary centerline tracking? By the way, I have no idea how to get the reference radius r based on centerlines and CTA image patch. For a centain point x, is the radius r a fixed value which means coronary vessel lumen radius or just a random value?

    opened by 1hell0the1others8 3
  • Download the link of the dataset has been invalid

    Download the link of the dataset has been invalid

    Failure links are as follows: http://coronary.bigr.nl/centerlines/ http://coronary.bigr.nl/centerlines/download/dataconfidentiality.pdf

    Could you provide new links?Thank you !

    opened by xdcui2020 2
  • about MPR in the paper

    about MPR in the paper

    Hello! Can you tell me thow to multiplanar reconstruction (MPR) with input vessel volume and the centerline to straighten the vessel volume?

    Thank you in advance

    opened by vv123-star 6
  • The link to the dataset doesn't work

    The link to the dataset doesn't work

    The link with dataset dowload does't work: http://coronary.bigr.nl/centerlines/ And this link too: http://coronary.bigr.nl/centerlines/download/dataconfidentiality.pdf

    Can you give the another acces to download the dataset please?

    opened by gregpost 1
Owner
James
I am an investigator in the SenseTime. My research interests are in 3D Vision and Multiple Object Tracking.
James
Optimizing DR with hard negatives and achieving SOTA first-stage retrieval performance on TREC DL Track (SIGIR 2021 Full Paper).

Optimizing Dense Retrieval Model Training with Hard Negatives Jingtao Zhan, Jiaxin Mao, Yiqun Liu, Jiafeng Guo, Min Zhang, Shaoping Ma This repo provi

Jingtao Zhan 99 Dec 27, 2022
AI-Fitness-Tracker - AI Fitness Tracker With Python

AI-Fitness-Tracker We have build a AI based Fitness Tracker using OpenCV and Pyt

Sharvari Mangale 5 Feb 9, 2022
Propose a principled and practically effective framework for unsupervised accuracy estimation and error detection tasks with theoretical analysis and state-of-the-art performance.

Detecting Errors and Estimating Accuracy on Unlabeled Data with Self-training Ensembles This project is for the paper: Detecting Errors and Estimating

Jiefeng Chen 13 Nov 21, 2022
A toolkit for document-level event extraction, containing some SOTA model implementations

❤️ A Toolkit for Document-level Event Extraction with & without Triggers Hi, there ?? . Thanks for your stay in this repo. This project aims at buildi

Tong Zhu(朱桐) 159 Dec 22, 2022
SEOVER: Sentence-level Emotion Orientation Vector based Conversation Emotion Recognition Model

SEOVER-Master This code is the implementation of paper: SEOVER: Sentence-level Emotion Orientation Vector based Conversation Emotion Recognition Model

null 4 Feb 24, 2022
[BMVC 2021] Official PyTorch Implementation of Self-supervised learning of Image Scale and Orientation Estimation

Self-Supervised Learning of Image Scale and Orientation Estimation (BMVC 2021) This is the official implementation of the paper "Self-Supervised Learn

Jongmin Lee 17 Nov 10, 2022
It's a implement of this paper:Relation extraction via Multi-Level attention CNNs

Relation Classification via Multi-Level Attention CNNs It's a implement of this paper:Relation Classification via Multi-Level Attention CNNs. Training

Aybss 2 Nov 4, 2022
LaneDet is an open source lane detection toolbox based on PyTorch that aims to pull together a wide variety of state-of-the-art lane detection models

LaneDet is an open source lane detection toolbox based on PyTorch that aims to pull together a wide variety of state-of-the-art lane detection models. Developers can reproduce these SOTA methods and build their own methods.

TuZheng 405 Jan 4, 2023
《Where am I looking at? Joint Location and Orientation Estimation by Cross-View Matching》(CVPR 2020)

This contains the codes for cross-view geo-localization method described in: Where am I looking at? Joint Location and Orientation Estimation by Cross-View Matching, CVPR2020.

null 41 Oct 27, 2022
OrienMask: Real-time Instance Segmentation with Discriminative Orientation Maps

OrienMask This repository implements the framework OrienMask for real-time instance segmentation. It achieves 34.8 mask AP on COCO test-dev at the spe

null 45 Dec 13, 2022
deep-table implements various state-of-the-art deep learning and self-supervised learning algorithms for tabular data using PyTorch.

deep-table implements various state-of-the-art deep learning and self-supervised learning algorithms for tabular data using PyTorch.

null 63 Oct 17, 2022
Code for paper "A Critical Assessment of State-of-the-Art in Entity Alignment" (https://arxiv.org/abs/2010.16314)

A Critical Assessment of State-of-the-Art in Entity Alignment This repository contains the source code for the paper A Critical Assessment of State-of

Max Berrendorf 16 Oct 14, 2022
[ICCV 2021] Official Pytorch implementation for Discriminative Region-based Multi-Label Zero-Shot Learning SOTA results on NUS-WIDE and OpenImages

Discriminative Region-based Multi-Label Zero-Shot Learning (ICCV 2021) [arXiv][Project page >> coming soon] Sanath Narayan*, Akshita Gupta*, Salman Kh

Akshita Gupta 54 Nov 21, 2022
[ICCV 2021] Official Pytorch implementation for Discriminative Region-based Multi-Label Zero-Shot Learning SOTA results on NUS-WIDE and OpenImages

Discriminative Region-based Multi-Label Zero-Shot Learning (ICCV 2021) [arXiv][Project page >> coming soon] Sanath Narayan*, Akshita Gupta*, Salman Kh

Akshita Gupta 54 Nov 21, 2022
Pretrained SOTA Deep Learning models, callbacks and more for research and production with PyTorch Lightning and PyTorch

Pretrained SOTA Deep Learning models, callbacks and more for research and production with PyTorch Lightning and PyTorch

Pytorch Lightning 1.4k Jan 1, 2023
Deep Text Search is an AI-powered multilingual text search and recommendation engine with state-of-the-art transformer-based multilingual text embedding (50+ languages).

Deep Text Search - AI Based Text Search & Recommendation System Deep Text Search is an AI-powered multilingual text search and recommendation engine w

null 19 Sep 29, 2022
tsai is an open-source deep learning package built on top of Pytorch & fastai focused on state-of-the-art techniques for time series classification, regression and forecasting.

Time series Timeseries Deep Learning Pytorch fastai - State-of-the-art Deep Learning with Time Series and Sequences in Pytorch / fastai

timeseriesAI 2.8k Jan 8, 2023
State-of-the-art data augmentation search algorithms in PyTorch

MuarAugment Description MuarAugment is a package providing the easiest way to a state-of-the-art data augmentation pipeline. How to use You can instal

null 43 Dec 12, 2022