- data 폴더에 input 폴더(이미지포함) 저장
- conda 환경을 강요합니다.
source /opt/conda/bin/activate
conda install --file packagelist.txt
conda install -c conda-forge albumentations
conda install -c conda-forge timm
apt-get install libgl1-mesa-glx
- edit config/(gender_config, none_mask_age_config, mask_age_config, incorrect_mask_age_config, mask_config).json
- bash start.sh
-
edit config/age_ensemble_config.json
-
edit model paths in model.py
-
python train.py -c config/age_ensemble_config.json
-
edit config/total_config.json
-
edit model paths in model.py
-
python train.py -c config/total_config.json
- edit config/eval_config.json
- python eval_multi_model.py -c config/eval_config.json
or
python eval_total.py
You must edit model paths for load.
# model.py
# 73 line
def init_model(self):
gender_model_path = "/opt/ml/level1-15/pytorch-template/saved/models/multi_augmentation_gender/0830_105923/checkpoint-epoch8.pth"
age_model_path = "/opt/ml/level1-15/pytorch-template/saved/models/age_ensemble/model_best.pth"
mask_model_path = "/opt/ml/level1-15/pytorch-template/saved/models/multi_augmentation_mask/0830_121746/checkpoint-epoch11.pth"
# 139 line
def init_model(self):
none_mask_age_model_path = "/opt/ml/level1-15/pytorch-template/saved/models/none_mask_age/checkpoint-epoch36.pth"
incorrect_mask_age_model_path = "/opt/ml/level1-15/pytorch-template/saved/models/incorrect_mask_age/checkpoint-epoch33.pth"
mask_age_model_path = "/opt/ml/level1-15/pytorch-template/saved/models/mask_age/checkpoint-epoch43.pth"