This is the model that I used in the Image Classification challenge of the course "Artificial Neural Networks and Deep Learning" course held at Politecnico di Milano in 2022.
The challenge consisted on the classification of 8 different plant species from photos with the dimensions (96, 96, 3)
. The model me and my team developed uses the transfer learning approach with ConvNeXtLarge
as the base model.
Our team arrived first in the challenge, reaching an accuracy of 95.48, you can check the results here.
For more details about the model check the Report. Briefly, we used the following techniques:
- Transfer Learning with
ConvNeXtLarge
model with the "Weight Initialization" technique: the whole model was trained, in two phases. First, only the classification head with an high learning rate and then the whole model with a low learning rate. - CutMix and MixUp data augmentation techniques: one or the other technique was applied to each input image
- Standard data augmentation (flip, rotate, zoom)
- Test-Time data augmentation (self-ensemble technique) with shifts and flips
- Class weighting to fight the imbalance of the dataset
This project uses Poetry to manage dependencies, you can see how to install Poetry here.
- Download the dataset from here and save the
zip
inside thedata
folder. - Create Poetry virtual environment
poetry install
- Activate virtual environment