All Projects → linhandev → medSeg

linhandev / medSeg

Licence: GPL-3.0 license
Medical Image Segmentation Toolkit based on PaddlePaddle - 基于paddle的医学影像分割框架

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to medSeg

Quicknat pytorch
PyTorch Implementation of QuickNAT and Bayesian QuickNAT, a fast brain MRI segmentation framework with segmentation Quality control using structure-wise uncertainty
Stars: ✭ 74 (-15.91%)
Mutual labels:  medical-imaging, segmentation
Kiu Net Pytorch
Official Pytorch Code of KiU-Net for Image Segmentation - MICCAI 2020 (Oral)
Stars: ✭ 134 (+52.27%)
Mutual labels:  medical-imaging, segmentation
Vnet Tensorflow
Tensorflow implementation of the V-Net architecture for medical imaging segmentation.
Stars: ✭ 84 (-4.55%)
Mutual labels:  medical-imaging, segmentation
Segment Open
Segment Source Distribution
Stars: ✭ 34 (-61.36%)
Mutual labels:  medical-imaging, segmentation
subpixel-embedding-segmentation
PyTorch Implementation of Small Lesion Segmentation in Brain MRIs with Subpixel Embedding (ORAL, MICCAIW 2021)
Stars: ✭ 22 (-75%)
Mutual labels:  medical-imaging, segmentation
Extensionsindex
Slicer extensions index
Stars: ✭ 36 (-59.09%)
Mutual labels:  medical-imaging, segmentation
Awesome Gan For Medical Imaging
Awesome GAN for Medical Imaging
Stars: ✭ 1,814 (+1961.36%)
Mutual labels:  medical-imaging, segmentation
Torchio
Medical image preprocessing and augmentation toolkit for deep learning
Stars: ✭ 708 (+704.55%)
Mutual labels:  medical-imaging, segmentation
Miscnn
A framework for Medical Image Segmentation with Convolutional Neural Networks and Deep Learning
Stars: ✭ 194 (+120.45%)
Mutual labels:  medical-imaging, segmentation
Medical Transformer
Pytorch Code for "Medical Transformer: Gated Axial-Attention for Medical Image Segmentation"
Stars: ✭ 153 (+73.86%)
Mutual labels:  medical-imaging, segmentation
Medicaldetectiontoolkit
The Medical Detection Toolkit contains 2D + 3D implementations of prevalent object detectors such as Mask R-CNN, Retina Net, Retina U-Net, as well as a training and inference framework focused on dealing with medical images.
Stars: ✭ 917 (+942.05%)
Mutual labels:  medical-imaging, segmentation
Brainy
Brainy is a virtual MRI analyzer. Just upload the MRI scan file and get 3 different classes of tumors detected and segmented. In Beta.
Stars: ✭ 29 (-67.05%)
Mutual labels:  medical-imaging, segmentation
Ganseg
Framework for medical image segmentation using deep neural networks
Stars: ✭ 18 (-79.55%)
Mutual labels:  medical-imaging, segmentation
Data Science Bowl 2018
End-to-end one-class instance segmentation based on U-Net architecture for Data Science Bowl 2018 in Kaggle
Stars: ✭ 56 (-36.36%)
Mutual labels:  medical-imaging, segmentation
Slicergitsvnarchive
Multi-platform, free open source software for visualization and image computing.
Stars: ✭ 896 (+918.18%)
Mutual labels:  medical-imaging, segmentation
Niftynet
[unmaintained] An open-source convolutional neural networks platform for research in medical image analysis and image-guided therapy
Stars: ✭ 1,276 (+1350%)
Mutual labels:  medical-imaging, segmentation
Medicalzoopytorch
A pytorch-based deep learning framework for multi-modal 2D/3D medical image segmentation
Stars: ✭ 546 (+520.45%)
Mutual labels:  medical-imaging, segmentation
All About The Gan
All About the GANs(Generative Adversarial Networks) - Summarized lists for GAN
Stars: ✭ 630 (+615.91%)
Mutual labels:  medical-imaging, segmentation
Open Solution Data Science Bowl 2018
Open solution to the Data Science Bowl 2018
Stars: ✭ 159 (+80.68%)
Mutual labels:  medical-imaging, segmentation
Skin Lesion Detection Deep Learning
Skin lesion detection from dermoscopic images using Convolutional Neural Networks
Stars: ✭ 48 (-45.45%)
Mutual labels:  medical-imaging, segmentation

medSeg

中文 | English

仿照百度PaddleSeg结构实现的一个医学影像方向分割任务开发套件。主要目标是实现多种2D和3D网络(3D网络还在开发中),多种loss和数据增强策略。目前项目还在开发中,但是已经能在肝脏分割场景下做到 .94 的IOU。2.5D P-Unet项目基于这个套件实现。开发计划见Project

项目结构

medseg 项目主体

  • prep_3d.py prep_2d.py 对3D扫描或2D切片进行推理
  • loss.py 定义loss
  • models 定义模型
  • aug.py 定义数据增强方法
  • train.py 训练网络
  • infer.py 用训练完的模型进行推理
  • vis.py 对数据进行可视化
  • eval.py 对分割结果进行评估,支持基本所有医学影像常用2d/3d metric

tool 工具脚本

tool中提供了一些实用的工具脚本,train目录下主要用于训练前的预处理,infer目录下的主要用于推理和后处理。

  • train
    • mhd2nii.py : 将mhd格式文件转成nii
    • resize.py : 将nii格式的扫描或标签转成512大小
    • dataset_scan.py : 生成数据集总览,包括强度分布和归一化需要的平均中位数
    • to_slice.py : 将3D扫描和标签转成2D的切片,实测多线程提速1倍左右
    • vis.py : 随机抽取切片结果或3D序列中的片进行可视化
    • gen_list.py : 生成数据文件列表,按照比例划分训练/验证/测试集
    • folder_split.py : 将整个数据集随机划分成训练,验证和测试集
  • infer
    • 2d_diameter.py : 在切片内测量分割标签中的血管直径
  • zip_dataset.py : 将一个路径下的文件打包,每个压缩包不超过指定大小。和分包zip不同的是每个压缩包都是单独的包,都可以解压实例测
  • flood_fill.py : 对分割标签进行漫水填充
  • to_pinyin.py : 将中文文件名转拼音

config 配置文件

所有配置参考config.py

使用方法

配置环境

安装环境依赖:

pip install -r requirements.txt

paddle框架的安装参考paddle官网 如果进行训练需要有数据,目前项目主要面向lits调试,在aistudio上可以找到。训练集 测试集

数据集下载,解压之后将所有的训练集volume放到一个文件夹,所有的训练集label放到一个文件夹,测试集volume放到一个文件夹。修改 lits.yaml 中对应的路径。

预处理

配置完毕需要首先进行数据预处理,这里主要是将数据统一成npz格式,方便后续训练。也可以在这一步结合一些预处理步骤对3D CT数据可以做窗口化,3D旋转。

python medseg/prep_3d.py -c config/lits.yaml

训练

网络用预处理后的数据进行训练,训练提供一些参数,-h 可以显示。如果用的是cpu版本的paddle,不要添加 --use_gpu 参数。

python medseg/train.py -c config/lits.yaml --use_gpu --do_eval

预测

最后一步是用训练好的网络进行预测,要配置好模型权重的路径,按照上一步实际输出的路径进行修改。代码会读取inference路径下所有的nii逐个进行预测。目前支持的数据格式有 .nii, .nii.gz。

python infer.py -c config/lits.yaml --use_gpu

这个项目在aistudio中有完整的环境,fork项目可以直接运行,项目地址中运行

更新日志

  • 2020.6.21 v0.2.0

  • 项目整体修改为使用配置文件,丰富功能,增加可视化

  • 2020.5.1 v0.1.0

  • 在lits数据集上跑通预处理,训练,预测脚本

如项目使用中有任何问题,欢迎加入 Aistudio医学兴趣组,在群中提问,也可以和更多大佬一起学习和进步。

2132453929.jpg
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].