Needle Segmentation For Real-time Guidance of Minimally Invasive Procedures Using Handheld 2D Ultrasound Systems 🩺💉
A machine learning system for real-time guidance of minimally invasive procedures.
git clone https://github.com/ColinCoderUmich/needle_segmentation.git
cd needle_segmentation
# Create virtual environment
python -m venv nseg
nseg\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Obtain data and copy to folders
python src/obtain_image_data.py --data_path {path-to-imgs-and-csv-files}python src/train_pytorch.py --arch "UNet" -sd '/content/needle_segmentation/saved_models' --batch_size 8 --ep 5 -sz 256 --name 'UNet_orig'.
├── data/ # Data storage
│ ├── raw/ # Original CSVs and images
│ ├── processed/masks # Processed data including generated masks
│ ├── interim/
│ └── external/
│
├── results/ # CSV Results (performances)
│ └── segmentation/ # Performance of segmentation models
│
├── notebooks/ # Research notebooks
│ └── needle_segmentation.ipynb # Final modular notebook analysis
│
├── src/ # Core code
│ ├── models_definitions/ # Model architecture definitions
│ ├── detect.py # Data ingestion
│ ├── general_utils.py # Feature pipeline
│ ├── obtain_model.py # Model classes
│ ├── train_pytorch.py # Training script
│ ├── train_arch.py # Testing model definitions
│ └── test_model.py # Inference script
│
├── saved_models/ # Saved model/weights are saved here
├── requirements.txt # Dependencies
└── README.md # This file
Source: Local and from Rutgers University
Format: Images and csv files detailing needle delineation
The notebooks/ directory contains the notebooks:
notebooks/
└── needle_segmentation.ipynb # training and testingMIT License - See LICENSE for details
- Makerere Research and Innovations Fund for funding
- Rutgers University for data access
