Skip to content

adjkamel/data_aug

Repository files navigation

Data Augmentation for Land Cover Classification Using Generative Adversarial Networks

This repository contains code for the paper: Data Augmentation for Land Cover Classification Using Generative Adversarial Networks

Requirement

  • Python 3.7
  • Tensorflow 2.0
  • CUDA Version: 11.1

Run

  • Input images and labeled images must be resized to 256x256 using RESIZEto256.py
  • Run GAN.py to train the model to generate a new images based on a dataset of images (SPARCS) stored in ./images folder. pretrained models will be stored in models_GAN. The images will be stored in generated_images. During the training process you can pick the generated images of the last epochs to augment the dataset.
  • RUN CGAN.py to train the CGAN network to generate labels for the original dataset from ./images_CGAN/train/a. The resulting labels generated during training will be stored in ./predict_CGAN. The pretrained models of CGAN will be stored in the root directory ./
  • After augmenting the dataset with the new generated images, add them to ./images_CGAN/train/a and Run CGAN.py to generate labeled images. The resulting labels generated during training will be stored in ./predict_CGAN as well.
  • To generate labels for the testing set of 8 images in ./images_CGAN/test/a, run CGAN with the pretrained models in ./ root directory before and after augemntation. Use load model in CGAN.py file instead of training from scratch (check the las lines of the code.)
  • Link of the dataset: SPARCS dataset

Results

  • A screen shot of all 200 generated images. Some of them are in ./gnenerated_images generated

  • To evaluate the models before and after the daa augmentation, put the prediction labeled images generated using the pretrained model of the CGAN before augemntation in the folder ./Pred_before_augmentation, and put the prediction labeled images generated using the pretrained model of the CGAN sfter augemntation in the folder ./Pred_after_augmentation. After that, Run EVAL.py to generate the IOU and the eucledian distance before and after augmentation.

  • Comparison results between the classification accuracy before and after data augmentation: image image

  • Some of the basic model structure of the GAN design goes to manicman1999/GAN256

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages