burnmyletters / blood-vessel-segmentation-public

4th Place solution for SenNet + HOA - Hacking the Human Vasculature in 3D competition

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

4th Place solution for SenNet + HOA - Hacking the Human Vasculature in 3D competition

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

License:MIT License


Languages

Language:Python 99.5%Language:Shell 0.5%