Skip to content

eericheva/lungseg

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LungSeg - Segmentation lungs (thoracic region) on CT using Unet-based CNN model

Many medical image processing tasks focus mainly on finding a pathology. For example, during CT cancer screening we mostly detect nodules on an image. But our models are not perfect (like everything in the world), and we occasionally find lung nodules in the intestine or even outside the body. For this reason, it’s significant to have a mask of the target organ explicitly to be able to subtract false detected regions outside. Today the Botkin.AI team is happy to present an open source solution for lung segmentation on CT images, which is called lungseg. It is robust to a high density tissue in lungs and to body orientation. Mostly it inherits a markup protocol from the NSCLC dataset.

This package allows generating pixel-wise segmentation to medical CT images in axial projection. Our approach based on Unet model uses volumetric information of CT scan.

Enjoy it in your research and pet projects!

Installation

Requirements (see in requirements.txt)

Installation as a pip package

pip install git+https://github.com/Botkin-AI/lungseg.git

Usage

General pipeline of usage is following:

General Pipeline

import lungseg
from lungseg.dcm_reader import SeriesLoader

dicom = SeriesLoader(folder_to_dicoms=path_dcm)
segmentor = lungseg.LungSegmentor()
lung_mask = segmentor.predict(dicom.slices, batch_size=your_batch_size)

It's also possible to make prediction on only slice, for this needs use LungSegmentor().predict_one_slice(slice). Data in this case also should be converted to HU.

More example of usage you can find in JupyterNotebook

About

Segmentation lungs on CT images

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 99.9%
  • Python 0.1%