harshtd/lung-nodule-ct-detection
๐ซ 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
- Upload CT Scan: Click on the file upload area and select your CT scan file
- Supported formats: .nii, .nii.gz, .dcm, .png, .jpg, .jpeg, .tiff
- Recommended: NIfTI or DICOM formats for best results
- Run Analysis: Click the "๐ Analyze CT Scan" button to start the detection process
- Review Results:
- Detection Summary: Text-based results showing number of nodules found, confidence scores, and bounding box coordinates
- 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
- Loading: Medical images loaded using MONAI's LoadImage transform
- Normalization: Intensity scaling to standardize pixel values
- Resampling: Images resized to model input requirements (512x512x64)
- 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.
