Skip to content

rkique/pix2pix-terraform

Repository files navigation

Installation instructions

  1. Run conda env create --file /config/environment.yml
  2. Run conda activate pix2pix-pytorch

pix2pix-terraform

Our project implements the GAN architecture described in the Pix2pix paper for the task of “greening” extraterrestrial imagery to earth-like satellite imagery, accomplishing this through the usage of elevation data as label maps.

While we initially considered doing image colorization, we found this task to fall in the sweet spot between originality and tractability. There exist large amounts of accessible elevation and satellite data, and the idea of using this data to terraform other planets is really fun and exciting!

Data and Preprocessing

Colab Earth Engine SRTM script

The elevation data comes from the Shuttle Radar Topography Mission, an international research effort which obtained digital elevation models for the entire world. It was accessed through Google Earth Engine at 200 meter per pixel scale (This is the same resolution as the MOLA data). Thus, we ended up with 256m x 256m = 51.2km squares.

Although we initially planned on using satellite imagery from Earth Engine as well, creating cloudless image mosaics for large areas was time-consuming and difficult. There was too much flexibility that we didn't need with regards to time scales, regions, and different satellite missions. We ultimately used images from the 2020 Sentinel-2 Cloudless Mosaic, licenced under CC BY-NC-SA 4.0. It has an amazing API that lets you download cloudless imagery for any geographic coordinates in a GET request, provided that they are 4096x4096 pixels or less. The scale was also set to be 200 meters per pixels and 256 x 256 outputs, which we retrieved regionally from:

  • The Bolivian Andes (Bolivia)
  • Sierras (Southern California)
  • The Mediterranean (Italy)
  • Himalayan Mountains (Nepal)
  • Cascade Mountains (Pacific Northwest)
  • Rhode Island, New York
  • Sichuan Province, China
  • [TODO] add other places and coordinates

Both data sources use EPSG:4326, which considered the standard geographic coordinate system. However, simply specifying a region of equal latitude and longitude will not result in a square, because longitudinal lines converge as the latitude increases. To ensure that the areas were truly 51.2km by 51.2km, we adjusted the longitude by the Haversine formula.

QGIS was used to uniformly colorize the elevation data from the 0 to 9000m range, and both were resized and converted to JPG format for use in the model.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •