{"id":20768184,"url":"https://github.com/softwaremill/sentinel-cgan","last_synced_at":"2025-10-26T01:06:51.493Z","repository":{"id":137884880,"uuid":"228254980","full_name":"softwaremill/sentinel-cgan","owner":"softwaremill","description":"Sentinel generative conditional adversarial network implementation","archived":false,"fork":false,"pushed_at":"2022-12-21T04:47:14.000Z","size":19697,"stargazers_count":5,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-30T22:23:48.365Z","etag":null,"topics":["gan","gis","machine-learning","satellite-imagery"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softwaremill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-12-15T21:24:59.000Z","updated_at":"2023-09-25T13:37:16.000Z","dependencies_parsed_at":"2023-09-22T07:24:58.297Z","dependency_job_id":null,"html_url":"https://github.com/softwaremill/sentinel-cgan","commit_stats":{"total_commits":23,"total_committers":3,"mean_commits":7.666666666666667,"dds":"0.34782608695652173","last_synced_commit":"8c3105f68e2d76f56993a5344ddd22432e391068"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/softwaremill/sentinel-cgan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softwaremill%2Fsentinel-cgan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softwaremill%2Fsentinel-cgan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softwaremill%2Fsentinel-cgan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softwaremill%2Fsentinel-cgan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softwaremill","download_url":"https://codeload.github.com/softwaremill/sentinel-cgan/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softwaremill%2Fsentinel-cgan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281044069,"owners_count":26434561,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gan","gis","machine-learning","satellite-imagery"],"created_at":"2024-11-17T11:36:18.399Z","updated_at":"2025-10-26T01:06:51.470Z","avatar_url":"https://github.com/softwaremill.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sentinel cGAN\n\n![Epoch result](docs/header.png)\n\nData argumentation facility used during [modifiable areal](https://en.wikipedia.org/wiki/Modifiable_areal_unit_problem) unit problem research project. Read more in our article on Medium - [Generative adversarial networks in satellite image datasets augmentation.](https://blog.softwaremill.com/generative-adversarial-networks-in-satellite-image-datasets-augmentation-b7045d2f51ab)\n\n## Usage\n\n### Data\nSample data can be downloaded from our [S3](https://sml-ml-data-sets.s3.eu-central-1.amazonaws.com/sentinel-cgan/bdot.tar.gz) bucket or by utilizing the `scgan/data_download.py`. \n\nTo 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.\n\nDataset has to meet following criteria in terms of the directory structure:\n\n```\ndataset (name of the dataset)\n├── train (samples used during training)\n│   ├── data_descriptor.csv (names / ids of the files)\n│   ├── LC (land cover data folder)\n│   │   ├── LC_10.tif\n│   │   ├── LC_1.tif\n....................\n│   │   └── LC_n.tif\n│   └── S\n│       ├── S_10.tif\n│       ├── S_1.tif\n....................\n│       └── S_n.tif\n├── plot (samples used during intermediate result plotting after each epoch)\n│   ├── data_descriptor.csv (names / ids of the files)\n│   ├── LC (land cover data folder)\n│   │   ├── LC_10.tif\n│   │   ├── LC_1.tif\n....................\n│   │   └── LC_n.tif\n│   └── S\n│       ├── S_10.tif\n│       ├── S_1.tif\n....................\n│       └── S_n.tif\n└── test (samples used during predict phase)\n    ├── data_descriptor.csv (names / ids of the files)\n    ├── LC (land cover data folder)\n    │   ├── LC_10.tif\n    │   ├── LC_1.tif\n....................\n    │   └── LC_n.tif\n    └── S\n        ├── S_10.tif\n....................\n        └── S_1.tif\n```\n\n### Train\n\nThe 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.\n\n### Predict\n\nTo 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](https://sml-ml-data-sets.s3.eu-central-1.amazonaws.com/sentinel-cgan/generator.h5). Masks have to placed in relevant dataset `test` subdirectory.\n\n![Prediction](docs/prediction_result.png)\n\n# References\n1. [Original Pix2Pix paper](https://arxiv.org/abs/1611.07004)\n1. [Tips on training GAN](https://medium.com/@utk.is.here/keep-calm-and-train-a-gan-pitfalls-and-tips-on-training-generative-adversarial-networks-edd529764aa9)\n1. [Reference implementation using Keras](https://machinelearningmastery.com/how-to-develop-a-pix2pix-gan-for-image-to-image-translation/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftwaremill%2Fsentinel-cgan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftwaremill%2Fsentinel-cgan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftwaremill%2Fsentinel-cgan/lists"}