{"id":22180264,"url":"https://github.com/cmancio00/super-resolution","last_synced_at":"2025-07-26T17:32:03.700Z","repository":{"id":249641027,"uuid":"832047693","full_name":"cMancio00/Super-Resolution","owner":"cMancio00","description":"Final project for the Computational Learning class of Univesity of Florence","archived":false,"fork":false,"pushed_at":"2024-09-14T13:01:45.000Z","size":50617,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-15T02:52:37.235Z","etag":null,"topics":["cnn","python","pythorch","super-resolution"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cMancio00.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":"2024-07-22T08:48:59.000Z","updated_at":"2024-09-14T12:56:24.000Z","dependencies_parsed_at":"2024-07-22T12:36:36.005Z","dependency_job_id":"d70fa616-1880-411a-b78d-953bcc37fb98","html_url":"https://github.com/cMancio00/Super-Resolution","commit_stats":null,"previous_names":["cmancio00/super-resolution"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cMancio00%2FSuper-Resolution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cMancio00%2FSuper-Resolution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cMancio00%2FSuper-Resolution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cMancio00%2FSuper-Resolution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cMancio00","download_url":"https://codeload.github.com/cMancio00/Super-Resolution/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227700416,"owners_count":17806365,"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":["cnn","python","pythorch","super-resolution"],"created_at":"2024-12-02T09:17:46.635Z","updated_at":"2024-12-02T09:17:47.287Z","avatar_url":"https://github.com/cMancio00.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Super-Resolution\n\nThe goal of this project is to reconstruct a high-resolution image from a single low-resolution image.\n\nWe will utilize the architecture presented in the paper:\n[Enhanced Deep Residual Networks for Single Image Super-Resolution](https://arxiv.org/pdf/1707.02921) (Lim et al. 2017).\n\n# Project structure\n\n- [checkpoint](/checkpoint/) Here you will find the state of the model.\n\u003e [!NOTE]\n\u003e `SR_c64_rb8_e50_202408051714.pth` indicates that the SuperResolution model has 64 channels, 8 Residual Blocks, \n\u003e and has been trained for 50 epochs. This represents the state of the best model during the model selection phase.\n\u003e The other numbers are simply the timestamp of when the model was saved.\n- **data** This folder will be automatically created when you start the project. The dataset will be downloaded here.\n- [dataset](/dataset/) This package contains the module [data_preparation](/dataset/data_preparation.py) for downloading and splitting the dataset,\nas well as the module [super_resolution_dataset](/dataset/super_resolution_dataset.py), which contains the extended **Dataset** class used for the model.\n- [SRM](/SRM/) This package contains the module [modules](/SRM/modules.py), which includes the building block layers\n(**ResidualBlocks** and **Upsample**) for the module [network](/SRM/network.py), where the SuperResolutionNetwork is defined.\n- [utils](/utils/) This package contains some useful methods for training and the [model_selection](/utils/training_utilitis.py#L129) method.\n- **output** This folder contains the output images obtained during validation and testing.\n- [training_logs](/training_logs/) contains the CSV files of loss and PSNR for the training, both before and after validation of the best model.\n- [notebook](/notebook.ipynb) This notebook displays the main results of the model.\n- [main](/main.py) This is what needs to be run to perform all the tasks, from downloading the dataset to testing the model. A seed has been set, i.e., `777`, to ensure consistent results.\n\n# Run the code\nOnce the steps described in [Installation of Requirements and Kernel](#installation-of-requirements-and-kernel)\nis completed, you can run the code with the following command\n\n```bash\npython3 main.py\n```\n\u003e [!WARNING]\n\u003e If you have an Nvidia card on Xorg and you have suspended the pc it is\n\u003e common that the GPU will not turn on again properly and will appear busy, \n\u003e so unusable for computation.\n\n# Export the notebook as pdf\n\n```bash\njupyter nbconvert --to pdf notebook.ipynb --output \"ModelDemonstration\" --LatexPreprocessor.title \"Super Resolution Demonstration\" --LatexPreprocessor.date \"September, 2024\" --LatexPreprocessor.author_names \"Christian Mancini\"\n```\n\n# Installation of Requirements and Kernel\n\nIn the project directory, execute the following commands:\n\n```bash\npython3 -m venv .venv\n```\n\u003e [!NOTE]\n\u003e The name of the virtual environment will match the name of the hidden folder, \n\u003e in this case, `.venv`.\n\nTo activate the virtual environment, run:\n\n```bash\nsource .venv/bin/activate\n```\nNext, install the required packages with:\n\n```bash\npip install --upgrade pip \u0026 pip install -r requirements.txt\n```\n\nNow, we need to set up the virtual environment as a Jupyter kernel:\n\n```bash\npython -Xfrozen_modules=off -m ipykernel install --user --name=super-resolution\n```\nYou can now select `super-resolution` as your kernel.\n\nTo view the installed kernels, use:\n\n```bash\njupyter kernelspec list\n```\nThe output should resemble the following:\n\n```\nAvailable kernels:\n  python3      /home/mancio/PycharmProjects/super-resolution/.venv/share/jupyter/kernels/python3\n  super-resolution    /home/mancio/.local/share/jupyter/kernels/super-resolution\n```\n\u003e [!TIP]  \n\u003e To remove a kernel, you can use the following command:\n\n```bash\njupyter kernelspec uninstall super-resolution -y\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmancio00%2Fsuper-resolution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmancio00%2Fsuper-resolution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmancio00%2Fsuper-resolution/lists"}