# 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](https://www.sciencedirect.com/science/article/abs/pii/S1361841518308491).
# 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.
![](./example_images/boll.jpg)
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.
![](./example_images/cnn_tracker.png)
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:
```bash
$ pip install -r requirement.txt
```
# Training
## 1. Preparing CTA08 dataset
> **⚠ Tip:**
> CAT08 datasets need to be registered and certified in [this website](http://coronary.bigr.nl/centerlines/) 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](http://coronary.bigr.nl/centerlines/download/dataconfidentiality.pdf), compile it and contact Dr.Theo van Walsum (t.vanwalsum@erasmusmc.nl).
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/
```
2. Create *spacing_info.csv* and *nii.gz* data
```
python3 creat_spacinginfo_data_tool.py
```
3. 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
```
4. 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
```
5. 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
```bash
cd centerline_train_tools/
CUDA_VISIBLE_DEVICES=0 python3 centerline_train_tools.py
```
2. Training seedpoints net
```bash
cd seedspoints_train_tools/
CUDA_VISIBLE_DEVICES=0 python3 seeds_train_tools.py
```
3. Training ostiapoints net
```bash
cd ostiapoints_train_tools
CUDA_VISIBLE_DEVICES=0 python3 ostia_train_tools.py
```
## 3.Create coronary artery vessels tree
```bash
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
![](./example_images/vessels_tree.png)
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.
![](./example_images/seeds_points.jpg)
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}
}
```
没有合适的资源?快使用搜索试试~ 我知道了~
Coronary-Artery-Tracking-via-3D-CNN-Classification:3D CNN跟踪器的PyT...
共50个文件
py:32个
txt:10个
png:2个
需积分: 50 5 下载量 106 浏览量
2021-05-15
12:58:01
上传
评论 2
收藏 1.34MB ZIP 举报
温馨提示
通过3D CNN分类点火器跟踪冠状动脉 3D CNN跟踪器的PyTorch重新实现,可提取具有最先进(SOTA)性能的冠状动脉中心线。 (论文:“使用基于CNN的方位分类器在心脏CT血管造影中提取冠状动脉中心线”) 链接到纸张。 关键思想 对3D扩张的CNN进行训练,以基于局部图像补丁预测CCTA图像中任何给定点的最可能的动脉方向和半径。 我们使用3D斐波那契球来模拟CNN跟踪器,其中球的半径代表当前位置的船只半径,球上的点代表可能的运动方向。 跟踪器从人工或自动放置在冠状动脉中任意位置的单个种子点开始,使用CNN的预测沿两个方向跟踪血管中心线。 当无法高度确定地确定方向时,跟踪将终止。 为了自动创建血管树,我们需要训练三个神经网络。 首先,我们需要训练一个中心线网,以预测当前可以移动的位置和血管半径的两个方向(d0,d1)。 其次,我们需要训练神经网络以找到冠状动脉的两个入口
资源详情
资源评论
资源推荐
收起资源包目录
Coronary-Artery-Tracking-via-3D-CNN-Classification-master.zip (50个子文件)
Coronary-Artery-Tracking-via-3D-CNN-Classification-master
centerline_train_tools
logs
test.txt 0B
centerline_trainner.py 11KB
data_provider_argu.py 4KB
__init__.py 125B
centerline_train_tools.py 2KB
models
__init__.py 125B
seedspoints_net.py 1KB
ostiapoints_net.py 1KB
centerline_net.py 2KB
seedspoints_train_tools
logs
training_log_2020_8_6_12_29_21.txt 53B
seeds_trainner.py 7KB
seeds_train_tools.py 2KB
seeds_net_data_provider_aug.py 3KB
requirement.txt 880B
example_images
seeds_points.jpg 286KB
boll.jpg 394KB
vessels_tree.png 310KB
cnn_tracker.png 82KB
LICENSE 1KB
data_process_tools
centerline_patch_generater_no_offset.py 7KB
centerline_patch_generater_offset.py 11KB
seedpoints_patch_generater_negative.py 4KB
creat_spacinginfo_data_tool.py 1KB
ostiapoints_patch_generater_positive.py 8KB
utils.py 12KB
ostiapoints_patch_generater_negative.py 5KB
seedpoints_patch_generater_postive.py 7KB
ostiapoints_train_tools
ostia_train_tools.py 2KB
ostia_net_data_provider_aug.py 7KB
ostia_trainner.py 7KB
infer_tools_tree
settingy.yaml 680B
utils.py 5KB
vessels_tree_infer.py 5KB
__init__.py 125B
tree.py 363B
generate_seeds_ositas.py 4KB
setting.py 3KB
build_vessel_tree.py 12KB
metric
reference.txt 296KB
save_info.txt 223B
dijstra.py 4KB
observerscores.txt 812B
__init__.py 120B
infer.txt 569KB
metirc.py 8KB
.gitignore 154B
readme.md 6KB
checkpoint
ostia_checkpoints
your_ostiapoints_net_model.txt 69B
classification_checkpoints
your_centerline_net_model.txt 69B
seeds_checkpoints
your_seedspoints_net_model.txt 69B
共 50 条
- 1
愍蟊朙
- 粉丝: 21
- 资源: 4709
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0