{"id":18322512,"url":"https://github.com/tencentarc/mm-realsr","last_synced_at":"2025-04-05T23:31:05.997Z","repository":{"id":54355271,"uuid":"490119356","full_name":"TencentARC/MM-RealSR","owner":"TencentARC","description":"Codes for \"Metric Learning based Interactive Modulation for Real-World Super-Resolution\"","archived":false,"fork":false,"pushed_at":"2024-01-16T09:03:37.000Z","size":34446,"stargazers_count":160,"open_issues_count":11,"forks_count":12,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-21T13:23:20.193Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TencentARC.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","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":"2022-05-09T03:15:53.000Z","updated_at":"2025-03-19T09:30:15.000Z","dependencies_parsed_at":"2024-11-05T18:44:39.762Z","dependency_job_id":null,"html_url":"https://github.com/TencentARC/MM-RealSR","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentARC%2FMM-RealSR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentARC%2FMM-RealSR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentARC%2FMM-RealSR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TencentARC%2FMM-RealSR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TencentARC","download_url":"https://codeload.github.com/TencentARC/MM-RealSR/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415783,"owners_count":20935383,"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":[],"created_at":"2024-11-05T18:24:58.024Z","updated_at":"2025-04-05T23:31:00.989Z","avatar_url":"https://github.com/TencentARC.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### 📖 MM-RealSR: Metric Learning based Interactive Modulation for Real-World Super-Resolution\n\n\u003e[![arXiv](https://img.shields.io/badge/arXiv-Paper-\u003cCOLOR\u003e.svg)](https://arxiv.org/abs/2205.05065)\u003cbr\u003e\n\u003e[Chong Mou](https://scholar.google.com.hk/citations?user=SYQoDk0AAAAJ\u0026hl=en), Yanze Wu, [Xintao Wang](https://xinntao.github.io/), [Chao Dong](https://scholar.google.com.hk/citations?user=OSDCB0UAAAAJ), [Jian Zhang](https://jianzhang.tech/), [Ying Shan](https://scholar.google.com/citations?user=4oXBp9UAAAAJ\u0026hl=en) \u003cbr\u003e\n\u003e [Tencent ARC Lab](https://arc.tencent.com/en/ai-demos/imgRestore); Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences\n\nIf you want to use the paper model, please go to this [Colab Demo](https://colab.research.google.com/drive/1pIpHK4g2uKdbYXIuskusL9WdwQVZAz1q?usp=sharing) for MM-RealSR \u003ca href=\"https://colab.research.google.com/drive/1pIpHK4g2uKdbYXIuskusL9WdwQVZAz1q?usp=sharing\"\u003e\u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"google colab logo\"\u003e\u003c/a\u003e.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"figs/im_c_real.PNG\" width=\"50%\"\u003e\u003cimg src=\"figs/im_c_sy.PNG\" width=\"50%\"\u003e\n\u003c/p\u003e\n\n---\n\n## 🔧 Dependencies and Installation\n\n- Python \u003e= 3.7 (Recommend to use [Anaconda](https://www.anaconda.com/download/#linux) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html))\n- [PyTorch \u003e= 1.7](https://pytorch.org/)\n\n### Installation\n\n1. Clone repo\n\n    ```bash\n    git clone https://github.com/TencentARC/MM-RealSR.git\n    cd MM-RealSR\n    ```\n\n2. Install dependent packages\n\n    ```bash\n    # Install basicsr - https://github.com/xinntao/BasicSR\n    # We use BasicSR for both training and inference\n    pip install basicsr\n    # facexlib and gfpgan are for face enhancement\n    pip install facexlib\n    pip install gfpgan\n    pip install -r requirements.txt\n    python setup.py develop\n    ```\n\n---\n\n## Training (4 V100 GPUs)\n\n```bash\npython -m torch.distributed.launch --nproc_per_node=4 --master_port=4321 mmrealsr/train.py -opt options/MMRealSRNet_x4.yml --launcher pytorch --auto_resume\n\npython -m torch.distributed.launch --nproc_per_node=4 --master_port=4321 mmrealsr/train.py -opt options/MMRealSRGAN_x4.yml --launcher pytorch --auto_resume\n```\n\n## :european_castle: Model Zoo\n\nPlease download checkpoints from [Google Drive](https://drive.google.com/file/d/10EyZR0SBEXkZIag9rcSgYBupBGllcwdA/view?usp=sharing) or [Github Release](https://github.com/TencentARC/MM-RealSR/releases).\n\n\n## Testing\n\n```bash\npython inference_mmrealsr.py -opt (path to .yml file) --im_path (path to LR images) --model_path (path to checkpoint) --res_path (path to save SR images)\n\npython Metric/LPIPS.py --folder_gt (path to HR images) --folder_restored (path to SR images)\n\npython Metric/NIQE.py --folder_restored (path to SR images)\n\npython Metric/DISTS.py --folder_gt (path to HR images) --folder_restored (path to SR images)\n```\n\nResults are in the `results` folder\n\n## Video Demo\nQuick start can be found in [Colab Demo](https://colab.research.google.com/drive/1pIpHK4g2uKdbYXIuskusL9WdwQVZAz1q?usp=sharing) for MM-RealSR \u003ca href=\"https://colab.research.google.com/drive/1pIpHK4g2uKdbYXIuskusL9WdwQVZAz1q?usp=sharing\"\u003e\u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"google colab logo\"\u003e\u003c/a\u003e.\n\n```bash\npython inference_mmrealsr_demo.py -opt (path to .yml file) --model_path (path to checkpoint) --im_path (path to LR image)\n```\nThe visual results of noise and blur modulation:\n\n\u003cimg src=\"https://github.com/TencentARC/MM-RealSR/blob/main/imgs/blur.gif\" width=\"50%\"\u003e\u003cimg src=\"https://github.com/TencentARC/MM-RealSR/blob/main/imgs/noise.gif\" width=\"50%\"\u003e\n\n## BibTeX\n\n    @InProceedings{mou2022mmrealsr,\n        author    = {Chong Mou and Yanze Wu and Xintao Wang and Chao Dong and Jian Zhang and Ying Shan},\n        title     = { Metric Learning based Interactive Modulation for Real-World Super-Resolution},\n        booktitle = {European Conference on Computer Vision (ECCV)},\n        date      = {2022}\n    }\n\n## 📧 Contact\n\nIf you have any question, please email `eechongm@gmail.com`.\n\n## 🤗 Acknowledgement\n\nThanks to the following open-source projects:\n\n- [Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN).\n- [CResMD](https://github.com/hejingwenhejingwen/CResMD).\n- [CUGAN](https://github.com/HaomingCai/CUGAN).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftencentarc%2Fmm-realsr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftencentarc%2Fmm-realsr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftencentarc%2Fmm-realsr/lists"}