# Self-supervised body part regressor (SSBR)
Developed by Ke Yan (ke.yan@nih.gov, [yanke23.com]()), Imaging Biomarkers and Computer-Aided Diagnosis Laboratory,
National Institutes of Health Clinical Center
If you use this code, please read and cite the following works:
* Ke Yan, Le Lu, Ronald Summers, "Unsupervised Body Part Regression via Spatially Self-ordering Convolutional Neural Networks", IEEE ISBI, 2018, https://arxiv.org/abs/1707.03891
* Ke Yan, Xiaosong Wang, Le Lu, Ling Zhang, Adam Harrison, Mohammadhad Bagheri, Ronald M. Summers, "Deep Lesion Graphs in the Wild: Relationship Learning and Organization of Significant Radiology Image Findings in a Diverse Large-scale Lesion Database", IEEE CVPR, 2018, https://arxiv.org/abs/1711.10535
## Function
Predict a **continuous score** for an axial slice in a CT volume which indicates its relative position in the body, e.g. the figure below. The actual correspondence between values and positions needs to be observed when using. See the paper.
Samples of unsupervisedly learned body-part scores:
![sample body-part scores](sample_results.png)
## Requirements
1. Caffe - use "conda install caffe-gpu" for GPU caffe or "conda install caffe" for CPU
2. easydict - install with "pip install easydict"
3. nibabel (for NIFTI inference)
4. scikit-learn
5. (for training only) VGG-16 pretrained caffemodel (optional, because the
algorithm works well even if trained from scratch given enough data).
6. (for training only) Unlabeled training volumes, each volume stored in a folder
of 2D slices named by <slice_index>.png. List the names of volume folders in a
list file and put the list file's name in TRAIN_IMDB of train.sh. Specify the name
of the folder containing all volumes in DATA_DIR of config.yml. If you want to use
different data format, change data_layer.py.
## Inference with .nii.gz
Run `python nifti_inference.py filename.nii.gz`
Results will be written to "slice_scores*.txt". There are two columns - first is raw scores, 2nd is the linear regression fit.
If you need to add the -1024 HU offset, set the OFFSET variable in line 99 of nifti_inference.py to -1024 before running.
## Inference with .png
To do inference with .png put images in bodypartregressor/test_data/, then run `python bodypartregressor/deploy.py`.
## Installation
Minimal packaging of this repository was performed to allow for installation of nifti_inference.
To install in your system, run `python setup.py install` from this directory. Alternatively, run `pip install .`
Then you can use the NiFTI inference capability of the package as follows:
```python
from bodypartregressor.nifti_inference import nifti_inference
ctnib = nib.load(file) #read CT using Nibabel
ct = ctnib.get_data().astype(np.float32) #get CT as numpy array
slice_scores = nifti_inference(ct) #get a list of scores
```
## Output
The slice_scores.txt file obtained using nifti_inference.py now has two columns - the raw score and the linear regressed score.
To see a graph showing the linear regression line, uncomment lines 121-125 in nifti_inference.py.
## Changelog
Update 7/2020 by Daniel C. Elton:
* Converted from Python 2 to Python 3
* added nifti_inference.py, to allow for runs on NiFTI images.
* added setup.py to make installable.
Update 7/2021 by Daniel C. Elton:
* perform linear regression on the output so score vs slice # is a straight line. This smooths out irregularities. Both the raw score and score on the regressed line are outputted.
## Notes
* The trained model is in snapshots folder.
* When training, see the requirements below and run train.sh.
* The provided trained model was trained on 4400 unlabeled CT volumes with various reconstruction filters,
scan ranges, and pathological conditions. Random 2D patch cropping was used when training.
It is expected to be more accurate in shoulder, chest, abdomen, and pelvis because of the
training data.
* Input soft tissue window (-175~275 HU) 8-bit images with size 128x128. If your data
are different in windowing, image size, scan range etc., it is
easy to retrain the algorithm to get a better model for your application. It is also possible to extend
the algorithm to sagittal/coronal planes, MR volumes, etc.
* The output of SSBR can be used to roughly locate slices of certain body-parts, input to other CAD
algorithms as features, detect abnormal volumes, and so on. See paper.
## License
MIT License (see LICENCE.md file)
We utilize open source code from [py-faster-rcnn](https://github.com/rbgirshick/py-faster-rcnn).
没有合适的资源?快使用搜索试试~ 我知道了~
基于CT切片的自监督算法识别身体部位 (SSBR).zip
共249个文件
png:221个
py:13个
txt:3个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 57 浏览量
2024-03-09
12:21:50
上传
评论
收藏 68.76MB ZIP 举报
温馨提示
自监督身体部位回归器 (SSBR) 对 CT 切片进行身体部位自动识别可使各种医学图像应用受益匪浅。最近的深度学习方法表现出良好的性能,但需要大量标记图像进行训练。CT 卷中的内在结构或上下切片排序信息并未得到充分利用。本文提出了一种基于卷积神经网络(CNN)的无监督体部回归(UBR)算法来解决这一问题。本文提出了一种新颖的无监督学习方法和两个样本间卷积神经网络损失函数。与之前的研究不同,UBR 建立了一个人体坐标系,并为每个轴切片输出一个连续分数,代表身体部位在切片中的归一化位置。UBR 的训练过程类似于自组织过程:切片分数是从切片间关系中学习的。训练样本是大量未标注的 CT 片,因此不需要额外的标注工作。UBR 简单、快速、准确。定量和定性实验验证了其有效性。此外,我们还展示了 UBR 在网络初始化和异常检测中的两种应用。
资源推荐
资源详情
资源评论
收起资源包目录
基于CT切片的自监督算法识别身体部位 (SSBR).zip (249个子文件)
_iter_10000.caffemodel 57.14MB
MANIFEST.in 133B
README.md 4KB
readme.md 4KB
001292_03_4_190.png 147KB
041_score_-2.59062_001292_03_4_190.png 147KB
002466_02_3_56.png 128KB
052_score_-0.51687_002466_02_3_56.png 128KB
000689_03_4_630.png 119KB
098_score_9.86000_000689_03_4_630.png 119KB
004202_02_12_294.png 116KB
050_score_-0.64973_004202_02_12_294.png 116KB
002290_01_6_440.png 109KB
074_score_4.27940_002290_01_6_440.png 109KB
003612_02_4_67.png 108KB
013_score_-8.47502_003612_02_4_67.png 108KB
002321_01_4_548.png 107KB
087_score_7.14541_002321_01_4_548.png 107KB
002454_02_4_15.png 105KB
002_score_-11.67524_002454_02_4_15.png 105KB
000529_05_4_11.png 105KB
001_score_-12.14557_000529_05_4_11.png 105KB
001111_03_4_417.png 97KB
065_score_2.43750_001111_03_4_417.png 97KB
000343_02_4_236.png 97KB
046_score_-1.60352_000343_02_4_236.png 97KB
003260_02_4_95.png 92KB
024_score_-6.90453_003260_02_4_95.png 92KB
002711_01_5_94.png 90KB
096_score_9.36184_002711_01_5_94.png 90KB
002965_01_7_90.png 87KB
019_score_-7.26356_002965_01_7_90.png 87KB
002540_01_2_96.png 86KB
082_score_5.78239_002540_01_2_96.png 86KB
002755_01_6_63.png 85KB
009_score_-8.69313_002755_01_6_63.png 85KB
001751_06_4_184.png 85KB
030_score_-5.00089_001751_06_4_184.png 85KB
002488_04_3_512.png 84KB
088_score_7.38152_002488_04_3_512.png 84KB
000228_03_8_54.png 84KB
007_score_-8.98059_000228_03_8_54.png 84KB
000873_03_2_54.png 84KB
047_score_-1.54216_000873_03_2_54.png 84KB
004132_04_5_222.png 83KB
040_score_-3.13555_004132_04_5_222.png 83KB
002935_02_5_112.png 82KB
016_score_-7.77462_002935_02_5_112.png 82KB
003459_01_5_46.png 81KB
005_score_-10.09081_003459_01_5_46.png 81KB
001195_04_2_66.png 80KB
056_score_0.56135_001195_04_2_66.png 80KB
000435_03_2_56.png 80KB
054_score_-0.38903_000435_03_2_56.png 80KB
000091_03_7_108.png 79KB
067_score_2.78262_000091_03_7_108.png 79KB
000500_03_2_61.png 79KB
057_score_0.62692_000500_03_2_61.png 79KB
000360_07_4_215.png 78KB
039_score_-3.28758_000360_07_4_215.png 78KB
001365_02_2_89.png 78KB
066_score_2.68788_001365_02_2_89.png 78KB
002177_07_4_53.png 77KB
011_score_-8.64124_002177_07_4_53.png 77KB
002432_02_4_573.png 77KB
085_score_6.43333_002432_02_4_573.png 77KB
001502_01_4_504.png 77KB
083_score_6.17726_001502_01_4_504.png 77KB
003684_01_6_93.png 77KB
076_score_4.44120_003684_01_6_93.png 77KB
003148_03_3_443.png 77KB
078_score_4.87794_003148_03_3_443.png 77KB
000663_04_2_50.png 76KB
053_score_-0.41465_000663_04_2_50.png 76KB
000642_02_8_201.png 75KB
035_score_-3.85340_000642_02_8_201.png 75KB
000900_04_4_100.png 75KB
021_score_-7.09072_000900_04_4_100.png 75KB
001717_01_2_128.png 75KB
099_score_10.20957_001717_01_2_128.png 75KB
000461_04_6_66.png 74KB
051_score_-0.59622_000461_04_6_66.png 74KB
000306_01_2_125.png 74KB
097_score_9.47220_000306_01_2_125.png 74KB
11.png 74KB
003428_03_3_385.png 73KB
062_score_1.78314_003428_03_3_385.png 73KB
10.png 73KB
9.png 73KB
8.png 73KB
000461_04_6_60.png 73KB
048_score_-1.43166_000461_04_6_60.png 73KB
7.png 72KB
6.png 72KB
5.png 71KB
003375_03_5_7.png 71KB
003_score_-11.06087_003375_03_5_7.png 71KB
001279_02_3_41.png 71KB
032_score_-4.32949_001279_02_3_41.png 71KB
002088_03_3_262.png 71KB
共 249 条
- 1
- 2
- 3
资源评论
小黑码蚁
- 粉丝: 2414
- 资源: 2045
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功