This is a refactored repository from 2 notebooks:
To run this repository with ease, please refer to this Kaggle notebook
If you want to run locally, there are certain steps you need to make:
-
Install dependencies via
pip install - r requirements.txt
-
Download processed train dataset from here. This is a cleaned PNG public dataset of the competition, we use this dataset in the training phase
-
Download the competition dataset, mostly for the use of inferencing test set
-
Download pretrained EfficientNet-B0 weights here.
-
Change/create a setting json file that has the following keys:
- DATA_PATH: Path to the competition dataset in step 3
- TRAIN_DATA_PATH: Path to the train folder of the step 2 cleaned dataset
- TEST_DATA_PATH: Path to the test folder of the step 3 competition dataset
- MODEL_CHECKPOINT_DIR: Directory where all models are saved
- PRETRAINED_CHECKPOINT_PATH: Location of the pretrained EfficientNet model
- SUBMISSION_DIR: Where the submission.csv is written
File SETTINGS_kaggle.json is an example to construct your custom SETTINGS file
-
Run training script
python ./src/train.py --setting-path {PATH-TO-YOUR-SETTINGS.JSON}
-
Run prediction script
python ./src/predict.py --setting-path {PATH-TO-YOUR-SETTINGS.JSON}
-
You can download the trained checkpoints here
If you have any questions, feel free to contact me at nminh238@gmail.com