资源简介
基于LIDC数据集的肺结节识别完整项目包,采用了CNN算法(python3),需要自取。
代码片段和文件信息
import cPickle
import logging
import os
import xml.etree.ElementTree as etree
import numpy as np
from nodule_structs import RadAnnotation SmallNodule NormalNodule \
NoduleRoi NonNodule AnnotationHeader
NS = {‘nih‘: ‘http://www.nih.gov‘}
def find_all_files(root suffix=None):
res = []
for root _ files in os.walk(root):
for f in files:
if suffix is not None and not f.endswith(suffix):
continue
res.append(os.path.join(root f))
return res
def parse_dir(dirname outdir flatten=True pickle=True):
assert os.path.isdir(dirname)
if not flatten:
return parse_original_xmls(dirname outdir pickle)
pickle_file = os.path.join(outdir ‘annotation_flatten.pkl‘)
if os.path.isfile(pickle_file):
logging.info(“Loading annotations from file %s“ % pickle_file)
with open(pickle_file ‘r‘) as f:
annotations = cPickle.load(f)
logging.info(“Load annotations complete“)
return annotations
annotations = parse_original_xmls(dirname outdir pickle)
annotations = flatten_annotation(annotations)
if pickle:
logging.info(“Saving annotations to file %s“ % pickle_file)
with open(pickle_file ‘w‘) as f:
cPickle.dump(annotations f)
return annotations
def parse_original_xmls(dirname outdir pickle=True):
pickle_file = pickle and os.path.join(outdir ‘annotation.pkl‘) or None
if pickle and os.path.isfile(pickle_file):
logging.info(“Loading annotations from file %s“ % pickle_file)
with open(pickle_file ‘r‘) as f:
annotations = cPickle.load(f)
logging.info(“Load annotations complete“)
else:
logging.info(“Reading annotations“)
annotations = []
xml_files = find_all_files(dirname ‘.xml‘)
for f in xml_files:
annotations.append(parse(f))
if pickle and not os.path.isfile(pickle_file):
logging.info(“Saving annotations to file %s“ % pickle_file)
with open(pickle_file ‘w‘) as f:
cPickle.dump(annotations f)
return annotations
def parse(xml_filename):
logging.info(“Parsing %s“ % xml_filename)
annotations = []
# ET is the library we use to parse xml data
tree = etree.parse(xml_filename)
root = tree.getroot()
# header = parse_header(root)
# readingSession-> holds radiologist‘s annotation info
for read_session in root.findall(‘nih:readingSession‘ NS):
# to hold each radiologists annotation
# i.e. readingSession in xml file
rad_annotation = RadAnnotation()
rad_annotation.version = \
read_session.find(‘nih:annotationVersion‘ NS).text
rad_annotation.id = \
read_session.find(‘nih:servicingRadiologistID‘ NS).text
# nodules
nodule_nodes = read_session.findall(‘nih:unblindedReadNodule‘ NS)
for node in nodule_nodes:
nodule = parse_nodule(node)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-02-18 06:57 lidc_nodule_detection-master\
目录 0 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\
文件 5476 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\README.md
文件 7300 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\analysis_results.py
文件 2634 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\convert_txt2json.py
目录 0 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\data\
目录 0 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\data\lung_data\
目录 0 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\data\lung_data\lung_data\
文件 83 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\data\lung_data\lung_data\说明.txt
文件 363612 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\data\lung_data\lung_test.json
文件 2087919 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\data\lung_data\lung_train.json
文件 253428 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\data\lung_data\lung_val.json
文件 363612 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\data\lung_data\test.json
文件 1089 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\data\lung_data\test_small.json
文件 837 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\download_data.sh
文件 255393 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\dump.txt
文件 2244434 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\evaluate.ipynb
文件 10961947 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\evaluate.ipynb.bak
文件 5414 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\evaluate.py
文件 4840 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\evaluate.py.bak
目录 0 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\hypes\
文件 1200 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\hypes\lstm.json
文件 1301 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\hypes\lstm_resnet_rezoom.json
文件 1397 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\hypes\lstm_resnet_rezoom_lung.json
文件 1274 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\hypes\lstm_rezoom.json
文件 1261 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\hypes\lstm_rezoom_lung.json
文件 1201 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\hypes\overfeat.json
文件 1302 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\hypes\overfeat_resnet_rezoom.json
文件 1275 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\hypes\overfeat_rezoom.json
文件 1111673 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\lung_test.txt
文件 7519454 2019-02-18 06:57 lidc_nodule_detection-master\CNN_LSTM\lung_train.txt
............此处省略127个文件信息
相关资源
- RNN python
- 车牌识别Tensorflow_CNN_python_opencv.zip
- cifar-10 90%+代码
- 深度学习testCNN的python实现
- labelme标注数据集到COCO格式数据集转化
- 指静脉识别,keras,CNN
- python3使用tensorflow构建CNN卷积神经网络
- CNN卷积神经网络python代码
- Attention-CNN(Jianlong-Fu 大神制作)
- 基于卷积神经网络的手写数字识别
- Tensorflow之CNN实现CIFAR-10图像的分类p
- cython_bbox.so
- 适合的新手-CNN代码
- CNN网络识别Mnist的源码,有详细注释,
- CNN_源代码
- faster rcnn end-to-end loss曲线的绘制
- 卷积神经网络回归模型
- Python+Tensorflow+CNN实现车牌识别的
- 利用keras实现的cnn卷积神经网络对手写
- AI智能五子棋Python代码
- CNN卷积神经网络TensorFlow代码
- DeepLab-ResNet-101
- 卷积神经网络(CNN)源码
- Practical Computer Vision Applications Using D
- minist+CNN+交叉验证
- faster Rcnn(python)demo
- keras+tensorflow CNN
- 基于MTCNN实现制作脸部VOC格式数据集
- mnist_CNN 深度学习小
- 深度学习之一:卷积神经网络(CNN)
评论
共有 条评论