CoolFace
Apppublic

hacsmith/lung-nodule-seg

sourceHugging Facemitupdated 6mo agoView on Hugging Face
0likes
App README

Lung Nodule Segmentation with Attention UNet

This space segments lung nodules from CT scan slices using an Attention UNet model.

Features

  • โ€”๐Ÿ–ผ๏ธ Multiple format support: PNG, JPG, JPEG, BMP, TIFF
  • โ€”๐Ÿ“Š MHD medical format: Directly process .mhd files
  • โ€”๐ŸŽฏ Automatic slice selection: For 3D volumes
  • โ€”๐Ÿฅ CT windowing: Optimized lung window settings
  • โ€”๐Ÿ“ˆ Interactive visualization: Overlay and metrics

Usage

  1. 1.Wait for the model to load (first time may take a moment)
  2. 2.Upload a CT image or MHD file
  3. 3.Adjust the threshold if needed
  4. 4.Click "Segment Nodules"
  5. 5.View results in the tabs

Model Architecture

  • โ€”Type: Attention U-Net
  • โ€”Input: 1-channel grayscale (512ร—512)
  • โ€”Output: Binary segmentation mask
  • โ€”Parameters: ~8 million
  • โ€”Training: LUNA16 dataset

Technical Details

  • โ€”MHD files are processed with SimpleITK
  • โ€”CT windowing: Center=40, Width=400 (lung window)
  • โ€”Default slice: Middle slice of 3D volume
  • โ€”Image resizing: 512ร—512 pixels

File Structure

======= title: Lung Nodule Seg emoji: ๐Ÿ“š colorFrom: gray colorTo: indigo sdk: gradio sdkversion: 6.6.0 appfile: app.py pinned: false ---

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

>>>>>> d68378300ed3f09e7be710b83044cb68ac902683