Solving the classification issue found here: https://www.kaggle.com/datasets/puneet6060/intel-image-classification
This repo contains the code required to train a ResNet50 pretrained model to identify different image types based on the Kaggle dataset above. The model was trained to 92.20% accuracy. The model file I trained is also included.
The model has 6 classes:
- Buildings
- Forest
- Mountains
- Glaciers
- Sea
- Streets
I trained the model in only 3 epochs as the ResNet50 pretrained model already generalized well to the data set.
I added in a scheduler to adjust the learning rate as training progressed which helped the model generalize better. Early stopping is also in the scripts but was not needed due to the small epoch number required to reach a good end result.
I also performed some visualizations of the data to see what I was working with before training and to test my ideas for data augmentation.
Use the following:
git clone https://github.com/Aeryes/NaturalSceneClassification.git
Run pip install -r requirements.txt
Place your new images in the data/seg_pred/seg_pred folder
Run python predict.py