Codes for Kaggle competition: HuBMAP - Hacking the Kidney
All codes are based on pytorch
and pytorch-lightning
, and other common deep learning, image processing packages. Most of imported packages can be easily installed by conda or pip.
Training data abd public test data are from Kaggle competition data source, and external data is downloaded from official HuBMAP dataset port.
-
Visual.ipynb
is for visualization of images and corresponding mask, which is not neccessary. -
Slicer.ipynb
is for slicing WSI into smaller patches. This should be executed before training.
This code version only contains EfficinetNet-b3-U-Net training. For other backbones, please refer to timm
packages and segmentation_models_pytorch
for available U-Net backbones.
-
Solver.py
is training code of training phase without pseudo-labeling. -
Simply run
python Solver.py
. -
Trianing config should be set inside
Solver.py
, including learning rate, batch size, number of epochs, backbone and so on. Most of configs are shown in first several lines ofSolver.py
-
SolverPseudo.py
is training code of training phase with pseudo-labeling.
Run Predictor.py
or NewPredictor.py
to inference on datasets.