项目作者: softwaremill

项目描述 :
Sentinel generative conditional adversarial network implementation
高级语言: Python
项目地址: git://github.com/softwaremill/sentinel-cgan.git
创建时间: 2019-12-15T21:24:59Z
项目社区:https://github.com/softwaremill/sentinel-cgan

开源协议:

下载


Sentinel cGAN

Epoch result

Data argumentation facility used during modifiable areal unit problem research project. Read more in our article on Medium - Generative adversarial networks in satellite image datasets augmentation.

Usage

Data

Sample data can be downloaded from our S3 bucket or by utilizing the scgan/data_download.py.

To produce you own data you can use scgan/gdal_operations.py. Please note that three files will be needed: TIFF representing land cover, TIFF with satellite image and generate grid in form of an ArcGis shape file.

Dataset has to meet following criteria in terms of the directory structure:

  1. dataset (name of the dataset)
  2. ├── train (samples used during training)
  3. ├── data_descriptor.csv (names / ids of the files)
  4. ├── LC (land cover data folder)
  5. ├── LC_10.tif
  6. ├── LC_1.tif
  7. ....................
  8. └── LC_n.tif
  9. └── S
  10. ├── S_10.tif
  11. ├── S_1.tif
  12. ....................
  13. └── S_n.tif
  14. ├── plot (samples used during intermediate result plotting after each epoch)
  15. ├── data_descriptor.csv (names / ids of the files)
  16. ├── LC (land cover data folder)
  17. ├── LC_10.tif
  18. ├── LC_1.tif
  19. ....................
  20. └── LC_n.tif
  21. └── S
  22. ├── S_10.tif
  23. ├── S_1.tif
  24. ....................
  25. └── S_n.tif
  26. └── test (samples used during predict phase)
  27. ├── data_descriptor.csv (names / ids of the files)
  28. ├── LC (land cover data folder)
  29. ├── LC_10.tif
  30. ├── LC_1.tif
  31. ....................
  32. └── LC_n.tif
  33. └── S
  34. ├── S_10.tif
  35. ....................
  36. └── S_1.tif

Train

The default training configuration can be run from scgan/train.py. Default dataset is called bdot. Please note that chosen hyperparameters were set for the training to perform best on the sample dataset related to central Poland and Sentinel-2 images.

Predict

To generate artificial satellite images from predefined mask use scgan/predict. If you did not train a model you can download one of ours from S3. Masks have to placed in relevant dataset test subdirectory.

Prediction

References

  1. Original Pix2Pix paper
  2. @utk.is.here/keep-calm-and-train-a-gan-pitfalls-and-tips-on-training-generative-adversarial-networks-edd529764aa9">Tips on training GAN
  3. Reference implementation using Keras