# [Public 272nd / Private 37th] 1 week solution

First of all, congrats to all the participants who got medals, and thanks to the host and kaggle team.
There is little difference in the scores of most participants. I'm really looking forward to the 1st place solution :)
Brief Summary
training 10 image classification models and ensembling them by 1D-CNN, 2D-CNN, and weight optimization
using merged dataset(2019 + 2020) for training but only 2020 for validation
using Cross Entropy Loss with label Smoothing (alpha=0.3)
as the result, simple averaging(I didn't select as final submission) is better than stacking 😇
stacking(Public: 0.9014, Private: 0.9008):
[https://www.kaggle.com/ttahara/infer-cassava-ens10](https://www.kaggle.com/ttahara/infer-cassava-ens10)
averaging(Public: 0.9018, Private 0.9014):
[https://www.kaggle.com/ttahara/infer-cassava-ens09](https://www.kaggle.com/ttahara/infer-cassava-ens09)
Details
Data
I used
[publicly shared merged training dataset(2019 + 2020)](https://www.kaggle.com/tahsin/cassava-leaf-disease-merged)
. Thank you
[@tahsin](https://www.kaggle.com/tahsin)
for sharing it.
Image Classification Models
I used the following 10 models provided in
[timm](https://github.com/rwightman/pytorch-image-models)
.
small models: ResNet50D, ResNeXt50_32x4d, ECA-ResNet50D, ResNeSt50_fast_1s4x24d, RegNetY032
big models: ResNet100D, ResNeXt101_32x4d, ECA-ResNet101D, ResNeSt101, RegNetY080
Training
cross validation
spliting merged training dataset by Stratified K-fold manner(K=5)
using 2019 and 2020 data for training but only 2020 for validation
data augmentation
Transpose ->  HorizontalFlip -> VerticalFlip ->
ShiftScaleRotate -> RandomResizedCrop ->
HueSaturationValue ->  RandomBrightnessContrast ->
OneOf(RandomErase, CoarseDropout, Cutout) ->
Normalize -> ToTensorV2
other settings
image size: 512x512x3
max epoch : 10
batch size: 64(small models), 32(big models)
loss: CrossEntropy with LabelSmoothing
smoothing alpha:
0.3
optimizer: AdamW
weight decay: 1.0e-02
learning rate: 5e-04(small models), 2.5e-04(big models)
scheduler: CosineAnnealingWarmRestarts
T_0: 10
T_mult: 1
Ensemble
training 1D-CNN and 2D-CNN using image classification models' outputs as inputs
for more details, see my past topic in MoA competition:
[https://www.kaggle.com/c/lish-moa/discussion/204685](https://www.kaggle.com/c/lish-moa/discussion/204685)
applying weight optimization to image classification models' outputs
finally averaging these three models' outputs
Unfortunately, however, simple averaging has better private score(0.9014) than this stacking(0.9008). I missed a gold medal 😇
That's all. Thanks you reading 😉