73th solution for kaggle Human Protein Atlas Image Classification by pytorch 1.0
requirements:
- pytorch 1.0
- yacs
- python-opencv
- imgaug 0.2.7
- pretrainedmodels
unzip data.zip under tools/kaggle
, download and put train/test pictures in tools/kaggle/train
and tools/kaggle/test
See tools/preprocessing.py
.
combine_dataset
for combining train with external datatrain_test_split
to split train and valid dataset while keeping class distribution using Multilabel Stratificationcreate_class_weight
to assign weights for each class for weighted BCE losscreate_sample_weight
to assign each sample to balancing occurences of each class (linearly)calc_statistics
: calculate std and mean for datasets
using config-based system. to train model
python3 train_net.py --config-file config/res18_cv0.yaml
model will be dumped into dump/res18_cv0
folder
python3 test_net.py --config-file config/res18_cv0.yaml
python3 evaluation.py --config-file config/res18_cv0.yaml
- TTA: edit
build_tta_transforms
to insert wanted tta and setTTA
to 'on' - macro f1 loss