{"id":18279003,"url":"https://github.com/sczhou/ignn","last_synced_at":"2025-04-09T21:17:54.649Z","repository":{"id":108417965,"uuid":"275876067","full_name":"sczhou/IGNN","owner":"sczhou","description":"[NeurIPS 2020] Cross-Scale Internal Graph Neural Network for Image Super-Resolution","archived":false,"fork":false,"pushed_at":"2021-02-23T12:58:33.000Z","size":149,"stargazers_count":313,"open_issues_count":11,"forks_count":40,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-09T21:17:48.790Z","etag":null,"topics":["deep-learning","image-preprocessing","image-restoration","super-resolution"],"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/sczhou.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-29T16:57:33.000Z","updated_at":"2025-02-11T13:55:30.000Z","dependencies_parsed_at":"2023-05-31T04:45:31.808Z","dependency_job_id":null,"html_url":"https://github.com/sczhou/IGNN","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sczhou%2FIGNN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sczhou%2FIGNN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sczhou%2FIGNN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sczhou%2FIGNN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sczhou","download_url":"https://codeload.github.com/sczhou/IGNN/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248111973,"owners_count":21049578,"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","image-preprocessing","image-restoration","super-resolution"],"created_at":"2024-11-05T12:27:00.700Z","updated_at":"2025-04-09T21:17:54.627Z","avatar_url":"https://github.com/sczhou.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IGNN\n\nCode repo for \"Cross-Scale Internal Graph Neural Network for Image Super-Resolution\" \u0026nbsp; [[paper]](https://proceedings.neurips.cc/paper/2020/file/23ad3e314e2a2b43b4c720507cec0723-Paper.pdf) [[supp]](https://proceedings.neurips.cc/paper/2020/file/23ad3e314e2a2b43b4c720507cec0723-Supplemental.pdf)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=95% src=\"https://user-images.githubusercontent.com/14334509/86379250-34450200-bcbd-11ea-9a85-aab4bc73cd2d.png\"\u003e\n\u003c/p\u003e\n\n## Prepare datasets\n1 Download training dataset and test datasets from [here](https://drive.google.com/file/d/1fFBCXkUIgHkjqWiCeW7w-1TYHE0A2ZZF/view?usp=sharing).\n\n\n2 Crop training dataset DIV2K to sub-images.\n```\npython ./datasets/prepare_DIV2K_subimages.py\n```\nRemember to modify the 'input_folder' and 'save_folder' in the above script.\n\n## Dependencies and Installation\nThe denoising code is tested with Python 3.7, PyTorch 1.1.0 and Cuda 9.0 but is likely to run with newer versions of PyTorch and Cuda.\n\n1 Create conda environment.\n```\nconda create --name ignn\nconda activate ignn\nconda install pytorch=1.1.0 torchvision=0.3.0 cudatoolkit=9.0 -c pytorch\n```\n2 Install PyInn.\n```\npip install git+https://github.com/szagoruyko/pyinn.git@master\n```\n3 Install matmul_cuda.\n```\nbash install.sh\n```\n4 Install other dependencies.\n```\npip install -r requirements.txt\n```\n\n## Pretrained Models\nDownloading the pretrained models from this [link](https://drive.google.com/drive/folders/1xS0jATn0MddZkLl2Rx9VPLh-U_rUxjt1?usp=sharing) and put them into ./ckpt\n\n## Training\nUse the following command to train the network:\n\n```\npython runner.py\n        --gpu [gpu_id]\\\n        --phase 'train'\\\n        --scale [2/3/4]\\\n        --dataroot [dataset root]\\\n        --out [output path]\n```\nUse the following command to resume training the network:\n\n```\npython runner.py \n        --gpu [gpu_id]\\\n        --phase 'resume'\\\n        --weights './ckpt/IGNN_x[2/3/4].pth'\\\n        --scale [2/3/4]\\\n        --dataroot [dataset root]\\\n        --out [output path]\n```\nYou can also use the following simple command with different settings in config.py:\n\n```\npython runner.py\n```\n\n## Testing\nUse the following command to test the network on benchmark datasets (w/ GT):\n```\npython runner.py \\\n        --gpu [gpu_id]\\\n        --phase 'test'\\\n        --weights './ckpt/IGNN_x[2/3/4].pth'\\\n        --scale [2/3/4]\\\n        --dataroot [dataset root]\\\n        --testname [Set5, Set14, BSD100, Urban100, Manga109]\\\n        --out [output path]\n```\n\nUse the following command to test the network on your demo images (w/o GT):\n```\npython runner.py \\\n        --gpu [gpu_id]\\\n        --phase 'test'\\\n        --weights './ckpt/IGNN_x[2/3/4].pth'\\\n        --scale [2/3/4]\\\n        --demopath [test folder path]\\\n        --testname 'Demo'\\\n        --out [output path]\n```\n\nYou can also use the following simple command with different settings in config.py:\n\n```\npython runner.py\n```\n\n## Visual Results (x4)\nFor visual comparison on the 5 benchmarks, you can download our IGNN results from [here](https://drive.google.com/file/d/15x81tYQVpml4OvFqbA05mQQSRKL8phxz/view?usp=sharing).\n\n### Some examples\n\n![image](https://user-images.githubusercontent.com/14334509/86381317-c817cd80-bcbf-11ea-9b29-1f60ebfaa2e5.png)\n\n![image](https://user-images.githubusercontent.com/14334509/86384957-129a4980-bcc2-11ea-9405-c81c3af6d01f.png)\n\n## Citation\n\nIf you find our work useful for your research, please consider citing the following papers :)\n\n```\n@inproceedings{zhou2020cross,\ntitle={Cross-scale internal graph neural network for image super-resolution},\nauthor={Zhou, Shangchen and Zhang, Jiawei and Zuo, Wangmeng and Loy, Chen Change},\nbooktitle={Advances in Neural Information Processing Systems},\nyear={2020}\n}\n```\n## Contact\n\nWe are glad to hear from you. If you have any questions, please feel free to contact shangchenzhou@gmail.com.\n\n## License\n\nThis project is open sourced under MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsczhou%2Fignn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsczhou%2Fignn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsczhou%2Fignn/lists"}