Aayushktyagi / Satellite_image_classification

Image classifcation on Satellite image

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Satellite image classification

Image classification on sat4 and sat 6 dataset

Requirement

python3

tensorflow-gpu==1.13.1

numpy

Usage

Training

python3 main.py --datapath ./SAT-4_and_SAT-6_datasets/sat-4-full.mat --epochs 16 --visualize_data False --mode train --output ./weights/ --batch_size 16

--datapath : path to sat 4/sat6 dataset

--epochs : Number of epochs for training the model

--visualize_data : Option to visualize dataset

-- mode : Two modes Train or Test

-- output : path to output dir where models will be saved

-- --batch_size : batchsize for model training

Testing

python3 test.py --model_path ./weights/ --data_path ./SAT-4_and_SAT-6_datasets/sat-4-full.mat --mode predict --show_metrics True

--model_path : Path to saved model : default ./weights/

--data_path : Path to dataset : default ./SAT-4_and_SAT-6_datasets/sat-4-full.mat

--mode : Select mode between predict and evaluate using trained model

--show_metrics : To visualize confusion matrix

Dataset

Sat 4 and Sat 6 dataset contain 4 channel(r,g,b,near Infrared) Satellite images.Each image 28x28 pixels.Sat 4 and Sat 6 contain 4 and 6 label classes respectively. Dataset can be downloaded from here.

sample image

  • Sat4 dataset Class wise distribution of train(400000) and test images(100000) is as following:

Class labels :barren land , trees , grassland,none

Classwise distribution train

Classwise distribution test

  • Sat 6 dataset Class wise distribution of train(324000) and test(81000) is as following:

Class labesl : building,barren land,trees,grassland,roads,water

Classwise distribution train

Classwise distribution test

Training

Model loss

Loss

Model accuracy

Accuracy graph

Testing

  • Test image and label prediction

Test image and prediction

Evaluation

Confusion matrix on test set

Confusion Matrix

classification report on test set

Classification report

Conclusion

Hence we acheived 98% test accuracy on Sat 4 dataset using convolutional neural net after 15 epochs . Dataset contains 4 channel images standard classification architecture like ResNet50 , DenseNet121 cannot be used . For a small model performance is pretty cool!! What say??

Refrences

https://www.kaggle.com/arpandhatt/satellite-image-classification

About

Image classifcation on Satellite image


Languages

Language:Jupyter Notebook 91.5%Language:Python 8.5%