titi
new readme version
2d39f4c

A newer version of the Gradio SDK is available: 5.39.0

Upgrade
metadata
title: Lungs Segmentation Web App
emoji: 🖥️
colorFrom: indigo
colorTo: green
sdk: gradio
sdk_version: 5.23.1
app_file: app.py
pinned: false

🖥️ Lungs segmentation web application

A web-based application for automated lung segmentation using deep learning, powered by Gradio and PyTorch. This tool allows users to upload lung images and obtain segmented outputs efficiently.


Try the app

The application is running on Hugging Face, try it using this link!

Example File

If you don't have your own .tif image, the app includes a built-in example file that can be used directly from the UI by clicking "Try an example!".

Load from URL (file_url parameter)

You can also provide a .tif file hosted online using a URL parameter.

To do so, simply append ?file_url=... to your app's URL.

Example (local):

http://localhost:7860/?file_url=https://zenodo.org/record/8099852/files/lungs_ct.tif

Example (hosted on Hugging Face):

https://huggingface.co/spaces/qchapp/3d-lungs-segmentation/?file_url=https://zenodo.org/record/8099852/files/lungs_ct.tif

The application will automatically download the file and load it into the viewer.


Installation

We recommend performing the installation in a clean Python environment.

The code requires python>=3.10, as well as pytorch>=2.0. Please install Pytorch first and separately following the instructions for your platform on pytorch.org.

After that please run the following command:

pip install -r requirements.txt

Usage

Run:

python app.py

And go to http://localhost:7860/.


About Lungs Segmentation

If you are interesten in the package used for segmentation please check the following GitHub repository!