Skip to main content

High quality model for lungs segmentation.

Project description

lungs_segmentation

Automated lung segmentation in chest-x ray

https://habrastorage.org/webt/vk/jv/8r/vkjv8rjd04f1oicbczq5hyadhv0.png

Installation

pip install lungs-segmentation

Example inference

Jupyter notebook with the example: Open In Colab

WebApp

Comming soon ...

Models weights

model best dice Mb
resnet34 0.9657 103.4
densenet121 0.9655 62.8

Usage

Code example for resnet34:

from lungs_segmentation.pre_trained_models import create_model
import lungs_segmentation.inference as inference

model = create_model("resnet34")
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
model = model.to(device)

plt.figure(figsize=(20,40))
plt.subplot(1,1,1)
image, mask = inference.inference(model,'739px-Chest_Xray_PA_3-8-2010.png', 0.2)
plt.imshow(inference.img_with_masks( image, [mask[0], mask[1]], alpha = 0.1))

Results on data from the Internet

resnet34

https://habrastorage.org/webt/e3/mb/kc/e3mbkcxsmos6q4jlw5-tybudzji.png

densenet121

https://habrastorage.org/webt/ef/01/zo/ef01zo2g2qgsux8ses4keg4g8is.png

Authors

Renat Alimbekov

Ivan Vassilenko

Abylaikhan Turlassov

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lungs_segmentation-1.1.1.tar.gz (15.1 kB view hashes)

Uploaded Source

Built Distribution

lungs_segmentation-1.1.1-py2.py3-none-any.whl (16.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page