{"id":24880896,"url":"https://github.com/yc-cui/extend-gan","last_synced_at":"2025-04-13T15:34:51.744Z","repository":{"id":220639664,"uuid":"658181891","full_name":"yc-cui/Extend-GAN","owner":"yc-cui","description":"[GRSL 2024] Reconstruction of Large-Scale Missing Data in Remote Sensing Images Using Extend-GAN","archived":false,"fork":false,"pushed_at":"2024-02-03T08:56:02.000Z","size":3002,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T06:30:02.016Z","etag":null,"topics":["deep-learning","generative-adversarial-network","large-scale","pytorch","reconstruction","remote-sensing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yc-cui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-25T02:58:46.000Z","updated_at":"2025-02-22T23:05:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"4b09e549-a016-48fd-9515-b50fb5ce075a","html_url":"https://github.com/yc-cui/Extend-GAN","commit_stats":null,"previous_names":["yc-cui/extend-gan"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yc-cui%2FExtend-GAN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yc-cui%2FExtend-GAN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yc-cui%2FExtend-GAN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yc-cui%2FExtend-GAN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yc-cui","download_url":"https://codeload.github.com/yc-cui/Extend-GAN/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248736636,"owners_count":21153625,"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","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":["deep-learning","generative-adversarial-network","large-scale","pytorch","reconstruction","remote-sensing"],"created_at":"2025-02-01T11:27:45.982Z","updated_at":"2025-04-13T15:34:51.723Z","avatar_url":"https://github.com/yc-cui.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Extend-GAN\n\nThis work can be used to extend the boundaries of a high-resolution image to the extent of a given low-resolution reference image:\n\n![Extend the boundaries](./assets/demo.png)\n\n## Environment\n\nTested on Ubuntu 20.04. Python version 3.10. Pytorch version 1.13.1.\n\nCreate your environment using this command:\n\n```bash\nmamba env create -f environment_1.13.1.yaml\n```\n\nIf you use `conda`, replace `mamba` with `conda`.\n\n## Dataset\n\nPrepare your data and use `util/crop_rs.py` to crop HR and corresponding LR images.\n\nYou will get folders following this structure:\n\n```bash\ndataset\n├─train\n│  ├─source\n│  │      source1.tif\n│  │      source2.tif\n│  │      ...\n│  │\n│  ├─ref\n│  │      ref1.tif\n│  │      ref2.tif\n│  ├...\n│  \n└─test\n   ├─source\n   │      source1.tif\n   │      source2.tif\n   │      ...\n   │\n   ├─ref\n   │      ref1.tif\n   │      ref2.tif\n   └─...\n```\n\nGenerate flists in current directory.\n\n```bash\nls -R ${YOUR_ABSOLUTE_PATH} \u003e ${FLIST_NAME}\n# for example\nls -R /data/cyc/dataset/train/source/*.tif \u003e train.flist\nls -R /data/cyc/dataset/test/source/*.tif \u003e test.flist\n```\n\nThe default size is `512`, use `util/crop_256.ipynb` to randomly crop images, if necessary.\n\n## Train\n\n```bash\npython train.py --batch_size ${BATCH_SIZE} --train_dataset_name ${YOUR_TRAIN_FLIST} --n_epochs ${TOTAL_EPOCHS}\n# for example\npython train.py --batch_size 8 --train_dataset_name /data/cyc/dataset/train.flist --n_epochs 2400 \u003e log_42.txt \n```\n\n## Test\n\n```bash\npython test.py --image_path ${YOUR_TEST_FLIST} --model ${YOUR_GENERATOR_PATH}\n# for example\npython test.py --image_path /data/cyc/dataset/test.flist --model saved_models/generator_2400.pth\n```\n\n## Acknowledgments\n\nWe are benefiting a lot from the following projects:\n\n- [Image-Inpainting-Implementations](https://github.com/xyfJASON/Image-Inpainting-Implementations)\n\n- [Boundless-in-Pytorch](https://github.com/recong/Boundless-in-Pytorch)\n\n- [Palette-Image-to-Image-Diffusion-Models](https://github.com/Janspiry/Palette-Image-to-Image-Diffusion-Models)\n\nIf you find this work useful, please cite:\n```\n@ARTICLE{10413911,\n  author={Cui, Yongchuan and Liu, Peng and Song, Bingze and Zhao, Lingjun and Ma, Yan and Chen, Lajiao},\n  journal={IEEE Geoscience and Remote Sensing Letters}, \n  title={Reconstruction of Large-Scale Missing Data in Remote Sensing Images Using Extend-GAN}, \n  year={2024},\n  volume={21},\n  number={},\n  pages={1-5},\n  keywords={Training;Earth;Artificial satellites;Generative adversarial networks;Spatial resolution;Remote sensing;Image reconstruction;Generative adversarial network (GAN);image reconstruction;remote sensing images;triplet loss},\n  doi={10.1109/LGRS.2023.3317898}}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyc-cui%2Fextend-gan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyc-cui%2Fextend-gan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyc-cui%2Fextend-gan/lists"}