ResNet50 In Image Classification - Yicong-Huang/Wildfires GitHub Wiki

ResNet50 (50 Layer Residual neural network)

Summary

One of the implementation of image classification is using ResNet50 to produce a binary classification. Here is a nice visualization of Resnet50. We follow the basic structure and the final result gives a percentage of two classes, representing "positive wildfire" or "negative wildfire".

Data Preparation

Use the previous labeled binary data(700 images per class) to train the model.
Pre-processing steps include normalization, random rotation and random crops.

Training Setup

Loss function: Cross Entropy Loss function
Optimizer: RMSprop
number of epochs: 1 (default: 5)

Testing and Result

Training Process

# train model, parameters are path of training dataset and validation dataset

# Instructions on making image dataset:
#   To create training dataset and validation dataset for tweet images, first make a directory named image_dataset
#   in ROOTDIR/data/ ,within ROOTDIR/data/image_dataset, make 2 directories named train and val, then in both train
#   and val, make 2 directories called "wildfire" and "not-wildfire", put images into them respectively.
# Example(numbers below are for example, the more images the better):
#   put 400 wildfire images into ROOTDIR/data/image_dataset/train/wildfire
#   put 400 not wildfire images into ROOTDIR/data/image_dataset/train/not-wildfire
#   put another 100 wildfire images into ROOTDIR/data/image_dataset/val/wildfire
#   put another 100 not wildfire images into ROOTDIR/data/image_dataset/val/not-wildfire
⚠️ **GitHub.com Fallback** ⚠️