The topic was from huawei cloud garbage classification competition. To learn how to use pytorch and test the effect of the backbone(Resnet, ResNext, Se_ResNext, etc).
The project is only for learning, and i'm have not paticipate in that competition.
In order to better experience the learning process, I also extended the dataset by downloading pictures of corresponding categories at Google and Baidu.
I used some models to overfit the original training data, and then used those models to distinguish the new additions. and the first version of mydataset And then there are a lot of problems with the data set that haven't been solved very well, so I'll offer both the original data set and my data set.
- raw_dataset(garbage_classify_v2.zip) in official website
- mydataset_v1 in BaiduYun
The model was finally used Se_ResNext101_64x4d pretrained in imagenet.
For better performance, i alos use CBAM and FocalLoss Module to help training.
- feature extractor
- organize the code
- test model
- pytorch 1.3.1 or above
- numpy
- PIL
- pretrainedmodels
Since the equipment I can use is limited, the test data I conducted are for reference only!
Model | Train Acc | Val Acc | Test Acc |
---|---|---|---|
se_resnext101_32x4d + ce | 0.9825 | 0.9005 | |
se_resnext101_32x4d + fc | 0.9920 | 0.8986 | |
se_resnext101_32x4d + cbam + fc | 0.9993 | 0.9032 | 0.9005 |