# Introduction
This is a simple framework for training neural networks to detect nodules in CT images. Training requires a json file (e.g. [here](https://github.com/zhwhong/lidc_nodule_detection/blob/master/CNN_LSTM/hypes/lstm_rezoom_lung.json)) containing a list of CT images and the bounding boxes in each image. The model combines both CNN model and LSTM unit. The algorithm here is mainly refered to paper [***End-to-end people detection in crowded scenes***](https://arxiv.org/abs/1506.04878).
![](images/detect.png)
The deep learning framewoek is based on [TensorFlow](https://github.com/tensorflow/tensorflow)(version 1.0.0) and some coding ideas are forked from the [TensorBox](https://github.com/TensorBox/TensorBox) project. Here I show heartfelt gratefulness.
About nodule classfication method based on CNN transfer learning, you can refer to [this paper](https://arxiv.org/abs/1602.03409).
# Dicom and XML parsing
Parsing the lidc XML annotation and dicom files,see [pylung](https://github.com/zhwhong/lidc_nodule_detection/blob/master/pylung) and [this blog](http://zhwhong.cn/2017/03/27/LIDC-Dicom-data-and-XML-annotation-parse/).
```python
>>> import dicom
>>> f = dicom.read_file('000001.dcm')
>>> print f
(0008, 0005) Specific Character Set CS: 'ISO_IR 100'
(0008, 0008) Image Type CS: ['ORIGINAL', 'PRIMARY', 'AXIAL']
(0008, 0016) SOP Class UID UI: CT Image Storage
(0008, 0018) SOP Instance UID UI: 1.3.6.1.4.1.14519.5.2.1.6279.6001.143451261327128179989900675595
(0008, 0020) Study Date DA: '20000101'
(0008, 0021) Series Date DA: '20000101'
(0008, 0022) Acquisition Date DA: '20000101'
(0008, 0023) Content Date DA: '20000101'
(0008, 0024) Overlay Date DA: '20000101'
(0008, 0025) Curve Date DA: '20000101'
(0008, 002a) Acquisition DateTime DT: '20000101'
(0008, 0030) Study Time TM: ''
(0008, 0032) Acquisition Time TM: ''
(0008, 0033) Content Time TM: ''
(0008, 0050) Accession Number SH: '2819497684894126'
(0008, 0060) Modality CS: 'CT'
(0008, 0070) Manufacturer LO: 'GE MEDICAL SYSTEMS'
(0008, 0090) Referring Physician Name PN: ''
(0008, 1090) Manufacturer Model Name LO: 'LightSpeed Plus'
(0008, 1155) Referenced SOP Instance UID UI: 1.3.6.1.4.1.14519.5.2.1.6279.6001.675906998158803995297223798692
(0010, 0010) Patient Name PN: ''
(0010, 0020) Patient ID LO: 'LIDC-IDRI-0001'
(0010, 0030) Patient Birth Date DA: ''
(0010, 0040) Patient Sex CS: ''
(0010, 1010) Patient Age AS: ''
(0010, 21d0) Last Menstrual Date DA: '20000101'
(0012, 0062) Patient Identity Removed CS: 'YES'
(0012, 0063) De-identification Method LO: 'DCM:113100/113105/113107/113108/113109/113111'
(0013, 0010) Private Creator LO: 'CTP'
(0013, 1010) Private tag data LO: 'LIDC-IDRI'
(0013, 1013) Private tag data LO: '62796001'
(0018, 0010) Contrast/Bolus Agent LO: 'IV'
(0018, 0015) Body Part Examined CS: 'CHEST'
(0018, 0022) Scan Options CS: 'HELICAL MODE'
(0018, 0050) Slice Thickness DS: '2.500000'
(0018, 0060) KVP DS: '120'
(0018, 0090) Data Collection Diameter DS: '500.000000'
(0018, 1020) Software Version(s) LO: 'LightSpeedApps2.4.2_H2.4M5'
(0018, 1100) Reconstruction Diameter DS: '360.000000'
(0018, 1110) Distance Source to Detector DS: '949.075012'
(0018, 1111) Distance Source to Patient DS: '541.000000'
(0018, 1120) Gantry/Detector Tilt DS: '0.000000'
(0018, 1130) Table Height DS: '144.399994'
(0018, 1140) Rotation Direction CS: 'CW'
(0018, 1150) Exposure Time IS: '570'
(0018, 1151) X-Ray Tube Current IS: '400'
(0018, 1152) Exposure IS: '4684'
(0018, 1160) Filter Type SH: 'BODY FILTER'
(0018, 1170) Generator Power IS: '48000'
(0018, 1190) Focal Spot(s) DS: '1.200000'
(0018, 1210) Convolution Kernel SH: 'STANDARD'
(0018, 5100) Patient Position CS: 'FFS'
(0020, 000d) Study Instance UID UI: 1.3.6.1.4.1.14519.5.2.1.6279.6001.298806137288633453246975630178
(0020, 000e) Series Instance UID UI: 1.3.6.1.4.1.14519.5.2.1.6279.6001.179049373636438705059720603192
(0020, 0010) Study ID SH: ''
(0020, 0011) Series Number IS: '3000566'
(0020, 0013) Instance Number IS: '80'
(0020, 0032) Image Position (Patient) DS: ['-166.000000', '-171.699997', '-207.500000']
(0020, 0037) Image Orientation (Patient) DS: ['1.000000', '0.000000', '0.000000', '0.000000', '1.000000', '0.000000']
(0020, 0052) Frame of Reference UID UI: 1.3.6.1.4.1.14519.5.2.1.6279.6001.229925374658226729607867499499
(0020, 1040) Position Reference Indicator LO: 'SN'
(0020, 1041) Slice Location DS: '-207.500000'
(0028, 0002) Samples per Pixel US: 1
(0028, 0004) Photometric Interpretation CS: 'MONOCHROME2'
(0028, 0010) Rows US: 512
(0028, 0011) Columns US: 512
(0028, 0030) Pixel Spacing DS: ['0.703125', '0.703125']
(0028, 0100) Bits Allocated US: 16
(0028, 0101) Bits Stored US: 16
(0028, 0102) High Bit US: 15
(0028, 0103) Pixel Representation US: 1
(0028, 0120) Pixel Padding Value US: 63536
(0028, 0303) Longitudinal Temporal Information M CS: 'MODIFIED'
(0028, 1050) Window Center DS: '-600'
(0028, 1051) Window Width DS: '1600'
(0028, 1052) Rescale Intercept DS: '-1024'
(0028, 1053) Rescale Slope DS: '1'
(0038, 0020) Admitting Date DA: '20000101'
(0040, 0002) Scheduled Procedure Step Start Date DA: '20000101'
(0040, 0004) Scheduled Procedure Step End Date DA: '20000101'
(0040, 0244) Performed Procedure Step Start Date DA: '20000101'
(0040, 2016) Placer Order Number / Imaging Servi LO: ''
(0040, 2017) Filler Order Number / Imaging Servi LO: ''
(0040, a075) Verifying Observer Name PN: 'Removed by CTP'
(0040, a123) Person Name PN: 'Removed by CTP'
(0040, a124) UID UI: 1.3.6.1.4.1.14519.5.2.1.6279.6001.335419887712224178340067932923
(0070, 0084) Content Creator's Name PN: ''
(0088, 0140) Storage Media File-set UID UI: 1.3.6.1.4.1.14519.5.2.1.6279.6001.211790042620307056609660772296
(7fe0, 0010) Pixel Data OW: Array of 524288 bytes
```
![](images/parse_xml.png)
# Training
First, [install TensorFlow from source or pip](https://www.tensorflow.org/versions/r0.11/get_started/os_setup#pip-installation) (NB: source installs currently break threading on 0.11). Then run the training script `CNN_LSTM/run.sh`.Note that running on your own dataset should require modifying the `CNN_LSTM/hypes/\*.json` file.
![confidence loss](images/loss1.png)
![regression loss](images/loss2.png)
![accuracy](images/accuracy.png)
<p style="text-align:center;"><img src="images/tensorboard.png" /></p>
# Evaluation
There are two options for evaluation, an [ipython notebook](https://github.com/zhwhong/lidc_nodule_
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
基于CNN+LSTM实现的肺结节CT图检测python源码+项目说明.zip (141个子文件)
evaluate.ipynb.bak 10.45MB
evaluate.py.bak 5KB
hungarian.cc 20KB
hungarian.cpp 10KB
stitch_rects.cpp 4KB
test.csv 94KB
a.csv 19KB
inception_vgg_table.docx 22KB
README.docx 14KB
stitch_rects.hpp 2KB
hungarian.hpp 2KB
evaluate.ipynb 2.14MB
lung_train.json 1.99MB
lung_test.json 355KB
test.json 355KB
lung_val.json 247KB
lstm_resnet_rezoom_lung.json 1KB
overfeat_resnet_rezoom.json 1KB
lstm_resnet_rezoom.json 1KB
overfeat_rezoom.json 1KB
lstm_rezoom.json 1KB
lstm_rezoom_lung.json 1KB
overfeat.json 1KB
lstm.json 1KB
test_small.json 1KB
LICENSE_FOR_THIS_FOLDER 131B
nohup_resnet.log 978KB
nohup2.log 229KB
Makefile 521B
README.md 10KB
README.md 5KB
nohup.out.old 1.88MB
nohup.out 1.06MB
result_example.png 1.49MB
tensorboard.png 357KB
detect.png 286KB
nodule.png 176KB
parse_xml.png 131KB
loss2.png 117KB
lung.png 111KB
parenchyma.png 73KB
accuracy.png 69KB
loss1.png 63KB
test.png 34KB
AnnotationLib.py 41KB
train.py 25KB
doRPC.py 25KB
inception_v1.py 16KB
AnnoList_pb2.py 16KB
MatPlotter.py 16KB
main.py 15KB
test.py 14KB
resnet_v1.py 13KB
resnet_utils.py 11KB
train_utils.py 11KB
annotation2.py 8KB
annotation.py 8KB
nodule_structs.py 8KB
nodule_structs.py 8KB
3d_cnn_lung_test.py 8KB
3d_cnn_lung_detect.py 8KB
chest_detect.py 8KB
analysis_results.py 7KB
detect2.py 7KB
test_detect.py 6KB
base.py 6KB
data_utils.py 6KB
evaluate.py 5KB
PalLib.py 5KB
make_json.py 5KB
nodule2.py 4KB
plotSimple.py 3KB
vgg_classifier.py 3KB
demo.py 3KB
tmp.py 3KB
convert_txt2json.py 3KB
utils.py 3KB
predict.py 2KB
write_bin_file.py 2KB
detector.py 2KB
train.py 2KB
test17.py 2KB
te.py 2KB
libinfo.py 2KB
rect.py 2KB
view_weights.py 1KB
list2.py 1KB
parenchyma.py 1KB
googlenet_load.py 1KB
read_file.py 1KB
list.py 1KB
train.py 1KB
vgg.py 933B
filter.py 466B
__init__.py 317B
__init__.py 109B
ma_utils.py 108B
stitch_wrapper.py 98B
__init__.py 0B
__init__.py 0B
共 141 条
- 1
- 2
资源评论
生活家小毛.
- 粉丝: 6050
- 资源: 9295
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- MATLAB代码:计及电转气协同的含碳捕集与垃圾焚烧电厂优化调度 关键词:碳捕集 电厂 需求响应 优化调度 电转气协同调度 参考文档:《计及电转气协同的含碳捕集与垃圾焚烧电厂优化调度》完全复现
- 关键词:微网 优化调度 深度强化学习 A3C 需求响应 编程语言:python平台 主题:基于改进A3C算法的微网优化调度与需求响应管理 内容简介: 代码主要做的是基于深度强化学习的微网
- cruise软件模型,混动仿真模型,IMMD架构混联混动仿真模型,Cruise混动仿真模型,混联混动汽车动力性经济性仿真 关于模型 1.本模型是基于IMMD架构搭载的混联混动仿真模型,关于IMMD架
- C#上位机开发源码 上位机项目源代码 采用基于RS485通讯总线的ModbusRtu协议,支持用户权限管理、sqlite数据库、实时曲线、历史曲线、历史报表、导出Excel、主界面布局可调带记忆等功能
- 基于plc的污水处理,组态王动画仿真,带PLC源代码,组态王源代码,图纸,IO地址分配
- Rhino(犀牛)插件ladybug-tools-1-8-0
- 三相10Kw光伏并网逆变器 包含全套理图 PCB 源代码
- MATLAB代码:考虑P2G和碳捕集设备的热电联供综合能源系统优化调度模型 关键词:碳捕集 综合能源系统 电转气P2G 热电联产 低碳调度 参考文档:Modeling and Optimiza
- 永磁同步直线电机仿真实例,仿真教学 maxwell16.0版本 12槽11极 包括图中模型以及一个仿真设置要点word文档教程
- 基于mpx+vue+node.js的双端网盘系统的设计与实现源代码全套技术资料.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功