This project is the Naver Boost Camp CV11 team's submission code for the mask wearing status classification competition. When a picture of a person wearing a mask is given, it is a matter of classifying the person's age, sex, and whether he or she is wearing a mask.
- OS : Linux Ubuntu 18.04.5
- GPU : Tesla V100 (32GB)
git clone https://github.com/boostcampaitech5/level1_imageclassification-cv-11.git
pip install -r requirements.txt
To solve this problem, we conducted 18 classifications including gender, age, and whether to wear a mask, experimented with multi-output-classicaiton by setting each as a separate output, and conducted many experiments in the training process, such as removing the background of a given image through segmentation or adding regression loss for age. The method of execution for this experiment is as follows.
python train.py
python train_multi.py
--save_dir
: save path--data_dir
: input path--use_age
: weight of mseloss(age)--seg
: enable segmentation--model
: model type (default: EfficientNet B0)--batch_size
: batch size for training--criterion
: criterion type--epoch
: number of epochs to train
python inference.py
--data_dir
: input path--model_dir
: model weight path--output_dir
: output path--is_multi
: enable multi output classification--model
: model type (default: EfficientNet B0)--batch_size
: input batch size for validing
Metric : f1 score
Model | f1 score |
---|---|
EfficientNet B0 | 0.93093 |
ResNet 18 | 0.88177 |
ResNet 34 | 0.93165 |
EfficientNet B1 | 0.94594 |
EfficientNet B2 | 0.95842 |
ViT Tiny (Patch 16, 384) | 0.76766 |
ViT Small (Patch 16, 384) | 0.77515 |
Best model : Efficientnet B2