The training data can be downloaded from here: https://www.kaggle.com/c/kuzushiji-recognition/data
or using the Kaggle API:
kaggle competitions download -c kuzushiji-recognition
pip install --upgrade tqdm opencv-python==220.127.116.11 timm --user pip install --upgrade git+https://github.com/albu/albumentations --user
apex for your system setup as explained here: https://github.com/NVIDIA/apex
This is optional if you just want to run inference.
$ ls | grep images >>> test_images >>> train_images
$ python train.py
This will produce the weights
Logdir_038_f00/f00-ep-0125-val_hm_acc-0.9944-val_classes_acc-0.4986.pth. Training takes ~8 hours on a single V100 GPU with mixed precision training. Alternatively, the weights can be downloaded from here. Just put them into
$ python submit.py
This will produce the submission file
You can visualize the predictions via:
python vis_submission.py --fn ../Kuzushiji/Logdir_038_f00/f00-TTA-V7-PREDS-p0.40-.csv.