Human Protein Atlas - Single Cell Classification
This code is my part of the solution of my team for HPA - Single Cell Classification.
Data Preparation
Download competitiona data, external data (thanks to Alexander Riedel) and cell masks for the train data (thanks to Takuya Ito).
To create cell tiles and corresponding csv files run the following command.
$ bash preprocessing.sh <arg1> <arg2> <arg3> <arg4> <arg5> <arg6>
Arguments
arg1
: directory where cell-tiles will be savedarg2
: competition data csv filearg3
: external data csv filearg4
: competition data imagesarg5
: external data imagesarg6
: path to dir. with hpa masks
Train
To train models run the following command:
$ bash train.sh <directory where cells were saved>
Metrics Visualization
Metrics are logged to wandb.ai.
Weights preparation
To convert weight files from PyTorch Lightning to vanilla Pytorch run the following command.
$ python convert2pytorch.py
Inference
You must upload the checkpoints of trained models to the kaggle dataset and create a submission notebook. An example is here.