Skip to content

burnmyletters/blood-vessel-segmentation-public

Repository files navigation

SenNet + HOA - Hacking the Human Vasculature in 3D solution

https://www.kaggle.com/competitions/blood-vessel-segmentation/overview

PyTorch Lightning Config: Hydra Template

Description

Codebase for SenNet + HOA - Hacking the Human Vasculature in 3D competition (4th Place Solution).

The detailed description is here: https://www.kaggle.com/competitions/blood-vessel-segmentation/discussion/475052

Download data

kaggle competitions download -c blood-vessel-segmentation

Download additional data from the

http://human-organ-atlas.esrf.eu

If you want to skip the initial training without pseudo, you can download the images with pseudo-labels from Kaggle.

kaggle datasets download -d igorkrashenyi/50um-ladaf-2020-31-kidney-pag-0-01-0-02-jp2

Setting up the environment

# clone project
git clone https://github.com/burnmyletters/blood-vessel-segmentation-public
cd blood-vessel-segmentation-public

# [OPTIONAL] create conda environment
conda create -n bvs python=3.10.9
conda activate bvs

# install requirements
pip install -r requirements.txt

How to run

Train model with default configuration

Note: don't forget to modify data_path in bash sripts and in generate_mutliview and generate_mutliview_pseudo files.

# generate multiview
cd scripts
python generate_mutliview.py

# train on base model
sh ./train.sh

# generate pseudos
cd src/utils
python generate_pseudo.py

# train on 3d model with pseudo
sh ./train_pseudo_3d.sh

# train on 2d model with pseudo
sh ./train_pseudo_v2.sh

# Note: if you want to train the best setup which was not submitted to the cometition run 
sh ./train_pseudo.sh