image-classification-level1-19 created by GitHub Classroom
P-Stage level-1 image classification competition. (shape of wearing mask, gender, age for a person)
19조 (BCAA) Solution
input/
├── data/
│ ├── eval
│ └── train
code/
├── train.py
├── inference.py
├── dataset.py
├── evaluation.py
├── loss.py
├── model.py
└── model
└── exp1/
input/data/eval
: evaluation datasetinput/data/train
: train datasetcode/train.py
: main script to start trainingcode/inference.py
: evaluation of trained modelcode/dataset.py
: custom data loader for datasetcode/evaluation.py
: function to score, matriccode/loss.py
: contains loss functionscode/model.py
: contains custom or pre-trained modelmodel/
: trained models are saved here like(exp1, exp2,...)
- Linux version 4.4.0-59-generic
- Python >= 3.8.5
- PyTorch >= 1.7.1
- conda >= 4.9.2
- tensorboard >= 2.4.1
pip install -r requirements.txt
: install the necessary packages.
- CPU: Intel(R) Xeon(R) Gold 5220 CPU @ 2.20GHz
- GPU: Tesla V100-SXM2-32GB
- general training with default args
python train.py
- K-Fold training with default args
python train.py --k_fold
- singel model training
python train.py --single
- multiple model training
python train.py --single --k_fold
python inference.py --model_dir {'MODEL_PATH'}
ex.
python inference.py --model_dir "./models/exp1"