Dataset are divided into training dataset (2,819 images) and testing dataset (1,040 images). In the training dataset, there are 13 classes. Those are bedroom (136 images), coast (280 images), forest (248 images), highway (180 images), insidecity (228 images), kitchen (130 images), livingroom (209 images), mountain (294 images), office (135 images), opencountry (330 images), street (212 images), suburb (161 images), and tallbuilding (276 images).
Steps:
- Set image width and height to 224x224
- Set batch size = 32
- Data augmentation (rescaling (normalization), flipping, rotating, zooming) and split the dataset into validation dataset (20%) and training dataset (80%)
- Set the class mode into categorical because we have 13 classes
- Use transfer learning (InceptionV3 GoogleNet)
- Use and set the L2 regularizers to 0.005
- Use softmax as classifier for 13 classes
- Set model check point to save the best weights during the training process by monitoring the loss function
- Use ReduceLrOnPlateau to reduce the learning rate value with the minimum learning rate value of 0.001 by the factor of 0.2 if the loss function isn’t improved after 5-epochs
- Use Stochastic Gradient Descent (SGD)
- Set steps_per epoch to 70 → Training dataset / batch size
- Set validation set to 14 → Validation dataset / batch size
- Set the epoch to 70
- Train time
- Plot the accuracy and loss
- Get the weight and choose the best one
- Predict Testing dataset