CoolFace
Apppublic

harshtd/lung-nodule-ct-detection

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes
App README

๐Ÿซ Lung Nodule CT Detection

A comprehensive medical imaging application for detecting lung nodules in CT scans using the MONAI framework and deep learning.

๐Ÿ“‹ Overview

This Hugging Face Space provides an easy-to-use interface for lung nodule detection in CT scans. The application leverages the power of MONAI (Medical Open Network for AI), a PyTorch-based framework designed specifically for healthcare imaging applications.

๐Ÿš€ Features

  • โ€”Medical Image Support: Accepts multiple medical imaging formats including NIfTI (.nii, .nii.gz) and DICOM (.dcm)
  • โ€”Deep Learning Detection: Uses the MONAI/lungnodulect_detection model for accurate nodule identification
  • โ€”Visual Results: Provides both textual summaries and visual overlays of detected nodules
  • โ€”Confidence Scoring: Each detection includes confidence scores to help assess reliability
  • โ€”User-Friendly Interface: Clean, intuitive Gradio interface designed for both medical professionals and researchers

๐Ÿ›  How to Use

  1. 1.Upload CT Scan: Click on the file upload area and select your CT scan file
  2. 2.Supported formats: .nii, .nii.gz, .dcm, .png, .jpg, .jpeg, .tiff
  3. 3.Recommended: NIfTI or DICOM formats for best results
  1. 1.Run Analysis: Click the "๐Ÿ” Analyze CT Scan" button to start the detection process
  1. 1.Review Results:
  2. 2.Detection Summary: Text-based results showing number of nodules found, confidence scores, and bounding box coordinates
  3. 3.Visualization: Visual overlay showing detected nodules highlighted with red bounding boxes

๐Ÿ“Š Model Information

  • โ€”Base Model: MONAI/lungnodulect_detection
  • โ€”Framework: MONAI (Medical Open Network for AI)
  • โ€”Task: Object detection for lung nodules in CT scans
  • โ€”Input: 3D CT volumes
  • โ€”Output: Bounding boxes with confidence scores

๐Ÿ”ง Technical Details

Dependencies

  • โ€”MONAI: Medical imaging framework with comprehensive transforms and networks
  • โ€”PyTorch: Deep learning backend
  • โ€”Gradio: Web interface framework
  • โ€”nibabel: Medical imaging file I/O
  • โ€”matplotlib: Visualization
  • โ€”PIL: Image processing

Preprocessing Pipeline

  1. 1.Loading: Medical images loaded using MONAI's LoadImage transform
  2. 2.Normalization: Intensity scaling to standardize pixel values
  3. 3.Resampling: Images resized to model input requirements (512x512x64)
  4. 4.Channel Management: Ensures proper channel dimensions for model input

Model Architecture

The underlying model uses advanced computer vision techniques optimized for medical imaging:

  • โ€”Specialized for 3D volumetric data
  • โ€”Trained on lung CT datasets
  • โ€”Optimized for nodule detection tasks

โš ๏ธ Medical Disclaimer

IMPORTANT: This application is intended for research and educational purposes only. It should NOT be used as a substitute for professional medical diagnosis or treatment. Key considerations:

  • โ€”Results should always be reviewed by qualified healthcare professionals
  • โ€”This tool is for demonstration and research purposes
  • โ€”Clinical decisions should never be based solely on automated analysis
  • โ€”Always consult with radiologists and physicians for medical diagnosis
  • โ€”The model may have limitations and false positives/negatives

๐Ÿ” Example Use Cases

  • โ€”Research: Academic studies on lung nodule detection algorithms
  • โ€”Education: Teaching medical imaging and AI applications
  • โ€”Prototyping: Developing medical imaging workflows
  • โ€”Screening: Preliminary analysis (with professional oversight)

๐Ÿ“ˆ Performance Notes

  • โ€”Processing Time: Varies based on image size and hardware availability
  • โ€”Hardware: CPU processing supported; GPU acceleration available with upgraded hardware
  • โ€”Memory: Large CT volumes may require significant memory
  • โ€”Accuracy: Results depend on image quality and nodule characteristics

๐Ÿค Contributing

This Space demonstrates the integration of MONAI models with Hugging Face Spaces. Contributions for improvements are welcome:

  • โ€”Model optimizations
  • โ€”UI/UX enhancements
  • โ€”Additional preprocessing options
  • โ€”Performance improvements

๐Ÿ“š References

๐Ÿ“„ License

This project is licensed under the Apache License 2.0. See the model repository for specific model licensing terms.


Note: Always ensure you have the necessary permissions and ethical approvals before using medical imaging data.