sangmandu / 2022-DCC

0 stars 1 forks source link

Cutmix #10

Open soyeoncho00 opened 2 years ago

soyeoncho00 commented 2 years ago

이미지 분류시에 Cutmix를 적용합니다. 후반 Epoch에는 Cutmix를 적용하지 않는 것이 좋다는 실험적 공유가 있으므로, [미적용, 완전 적용, 부분 적용] 으로 실험해보는 것이 좋아보입니다.

참고 블로그

sangmandu commented 2 years ago

성능 향상을 위한 방법으로 추후에 Todo에 있는 White box Crop(Object box로 이미지를 자르는 방법)을 해보시는 것도 추천드립니다.

sangmandu commented 2 years ago

Cutmix 실험결과 {'outdir': 'output', 'datadir': '../data', 'model_name': 'BaseModel', 'resize': 64, 'batch_size': 256, 'epochs': 15, 'fold': False, 'lr': 0.01, 'optimizer': 'Adam', 'scheduler': 'CyclicLR', 'criterion': 'cross_entropy', 'val_ratio': 0.15, 'test_ratio': 0.15, 'checkpoint': '', 'aug': False, 'dup_sim': 1.0, 'sampling': '', 'save_name': 'experiment', 'save_limit': 2, 'seed': 0}

cutmix 0.0 [Train] f1 : 0.44967, best f1 : 0.44967 || acc : 44.96716%, best acc: 44.96716% || loss : 2.0719, best loss: 2.0347 || [Valid] f1 : 0.51166, best f1 : 0.51166 || acc : 49.80469%, best acc: 49.80469% || loss : 1.6311, best loss: 1.6311 ||

cutmix 0.3 [Train] f1 : 0.44967, best f1 : 0.44967 || acc : 44.96716%, best acc: 44.96716% || loss : 2.0719, best loss: 2.0347 || [Valid] f1 : 0.51166, best f1 : 0.51166 || acc : 49.80469%, best acc: 49.80469% || loss : 1.6311, best loss: 1.6311 ||

cutmix 0.5 [Train] f1 : 0.40897, best f1 : 0.40897 || acc : 40.89674%, best acc: 40.89674% || loss : 2.1874, best loss: 2.1859 || [Valid] f1 : 0.4383, best f1 : 0.47299 || acc : 42.75841%, best acc: 46.09375% || loss : 1.8542, best loss: 1.8542 ||

cutmix 0.8 [Train] f1 : 0.36883, best f1 : 0.37421 || acc : 36.88293%, best acc: 37.42074% || loss : 2.2987, best loss: 2.2987 || [Valid] f1 : 0.44625, best f1 : 0.44625 || acc : 43.50962%, best acc: 43.50962% || loss : 1.9975, best loss: 1.9975 ||

sangmandu commented 2 years ago

Cutmix 실험결과 - EfficientNet {'outdir': 'output', 'datadir': '../data', 'model_name': 'EfficientNet', 'use_wandb': True, 'resize': 64, 'batch_size': 512, 'epochs': 25, 'fold': False, 'lr': 0.01, 'optimizer': 'Adam', 'scheduler': 'CyclicLR', 'criterion': 'cross_entropy', 'val_ratio': 0.2, 'test_ratio': 0.0, 'checkpoint': '', 'aug': False, 'dup_sim': 1.0, 'sampling': '', 'check_stat': False, 'save_name': 'experiment', 'save_limit': 2, 'seed': 0}

cutmix 0.0 [Train] f1 : 0.86123, best f1 : 0.86123 || acc : 86.12280%, best acc: 86.12280% || loss : 0.40471, best loss: 0.40471 || [Valid] f1 : 0.68967, best f1 : 0.78183 || acc : 68.71094%, best acc: 77.89062% || loss : 7.8387, best loss: 0.90558 ||

cutmix 0.3 [Train] f1 : 0.69316, best f1 : 0.74369 || acc : 69.31591%, best acc: 74.36899% || loss : 1.6082, best loss: 1.2514 || [Valid] f1 : 0.57716, best f1 : 0.77973 || acc : 57.50000%, best acc: 77.67578% || loss : 1.4924, best loss: 0.8115 ||

cutmix 0.5 [Train] f1 : 0.71239, best f1 : 0.71239 || acc : 71.23898%, best acc: 71.23898% || loss : 1.5314, best loss: 1.4906 || [Valid] f1 : 0.65326, best f1 : 0.69574 || acc : 65.07812%, best acc: 69.31641% || loss : 1.6281, best loss: 1.1544 ||

cutmix 0.8 [Train] f1 : 0.55674, best f1 : 0.55674 || acc : 55.67408%, best acc: 55.67408% || loss : 2.067, best loss: 1.9241 || [Valid] f1 : 0.35269, best f1 : 0.57352 || acc : 35.13672%, best acc: 57.12891% || loss : 10.483, best loss: 1.6046 ||