MultiHem is a multitask learning framework for simultaneous segmentation and classification of intracranial hemorrhage using CT scans. This project implements state-of-the-art deep learning techniques to improve diagnostic accuracy for various types of brain hemorrhages.
Warning
This code is proprietary and should not be used for other projects without explicit permission from the authors.
git clone https://github.com/mikami520/MultiHem.git
cd MultiHem
# Create and activate conda environment
conda create -n hem python=3.10
conda activate hem
# Install with all dependencies
pip install -e '.[all]'
Core Dependencies (installed via pip install -e .
)
- torch
- omegaconf
- tqdm
- scipy
- monai
- tensorboard
- matplotlib
Full Dependency List (installed via pip install -e '.[all]'
)
- nibabel
- skimage
- pillow
- itk
- cucim
- openslide
- tifffile
- imagecodecs
- pydicom
- pynrrd
- torchvision
- torchaudio
- transformers
- huggingface_hub
- onnx
- onnxruntime
- tensorboard
- tensorboardX
- mlflow
- clearml
- pandas
- h5py
- zarr
- lmdb
- einops
- psutil
- pynvml
- fire
- jsonschema
- ninja
- pyyaml
- ignite
- nni
- optuna
- lpips
Development Dependencies (installed via pip install -e '.[dev]'
)
- pytest
- black
- flake8
- isort
- mypy
Preprocessing and data augmentation pipelines are implemented through the monai.transform
module. Detailed transformation configurations can be found in trainer.py
.
Configure your experiment by modifying config.yml
to specify:
- Dataset paths
- Network architecture
- Hyperparameters
- Training settings
python main.py --cfg config.yml --device cuda
Training artifacts (loss plots, saved models, checkpoints, log files) are saved in the exp
folder.
To run inference on test data:
python main.py --cfg config.yml --device cuda --test
All prediction results are saved in the prediction
folder.
Developed by Chris Xiao | University of Toronto
© 2025 All Rights Reserved