{"id":20202790,"url":"https://github.com/froukje/super-resolution","last_synced_at":"2026-05-14T21:05:30.140Z","repository":{"id":47457869,"uuid":"497921674","full_name":"froukje/super-resolution","owner":"froukje","description":"This repo contains a deployment of a super-resolution network in pytorch-lightning.","archived":false,"fork":false,"pushed_at":"2022-10-23T18:31:31.000Z","size":22470,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T12:38:11.491Z","etag":null,"topics":["deep-learning","deployment","pytorch","pytorch-lightning","super-resolution","torchserve","web-app"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/froukje.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}},"created_at":"2022-05-30T11:52:56.000Z","updated_at":"2023-03-22T06:20:40.000Z","dependencies_parsed_at":"2023-01-20T10:45:52.429Z","dependency_job_id":null,"html_url":"https://github.com/froukje/super-resolution","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/froukje/super-resolution","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/froukje%2Fsuper-resolution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/froukje%2Fsuper-resolution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/froukje%2Fsuper-resolution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/froukje%2Fsuper-resolution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/froukje","download_url":"https://codeload.github.com/froukje/super-resolution/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/froukje%2Fsuper-resolution/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33043274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"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":["deep-learning","deployment","pytorch","pytorch-lightning","super-resolution","torchserve","web-app"],"created_at":"2024-11-14T04:58:10.471Z","updated_at":"2026-05-14T21:05:30.124Z","avatar_url":"https://github.com/froukje.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Super Resolution Model and Web App\n\nThis repository contains a super resolution network upscaling images of a factor of 4 and a web app. The final web app looks like th\nis:\n\n![webapp](screenshot_webapp.jpeg)\n\n## Data\n* data from [kaggle.com](https://www.kaggle.com/datasets/akhileshdkapse/super-image-resolution)\n* raw data saved in data/HR (high resolution) and data/LR (low resolution)\n* 100 images\n* data exploration: notebooks/data-exploration.ipynb \n\n## Preprocessing\n* preprocessing.py\n    * splits the data in validation and training\n    * saves splits in h5 files to data/train.h5 and data/valid.h5\n\n## Model\n* train 2 models:\n    * SRResNet\n    * SRGAN (ToDo)\n* based on: Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network, Ledig et al. (2017), https://doi.org/10.48550/arXiv.1609.04802\n* model code based on https://github.com/sgrvinod/a-PyTorch-Tutorial-to-Super-Resolution\n* converted to pytorch lightning\n* added NNI for hyperparamtertuning\n* added mlflow\n\n## Training \n### SRResNet\n* run script with desired parameters, e.g. ```python3 srresnet.py --n-blocks 8 --batch-size 12 --n-channels 22 --gpus 1 --n-epochs 200```\n* use batch script saved in ```jobs/start_job.sh``` or ```start_job_nni.sh``` to include hyperparameter tuning using ```nni```\n* results are not reported to nni, but to mlflow\n* example files for hyperparamter tuning are in ```nni/config/config.py``` and ```nni/search_space/search_space.json```\n\n## Evaluation \n* example plots are in notebooks/plot-predictions.ipynb\n![example prediction](notebooks/example_prediction.png)\n\n## Deployment\n* model is served using torchserve\n* the handler script is based on the ```BaseHandler``` class and can be found in ```deployment/srnet_handler.py```\n* create the ```.mar``` file using the ```create-mar.sh``` script\n* run ```docker build -t srnet-mar:v1 .``` to create the docker image\n* ```docker run -p 8080:8080 -p 8081:8081 srnet-mar:v1```\n* check registeres models: ```curl http://127.0.0.1:8081/models```\n* make predictions: ```curl http://127.0.0.1:8080/predictions/srnet -T ../data/LR/0.png``` \n* The config.properties file is needed to change the maximun output size\n\n## Web App\n* simple web app is stored in folder ```app```\n* run ```docker-compose up``` to start the services\n* navigate to ```localhost:9696``` in browser\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffroukje%2Fsuper-resolution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffroukje%2Fsuper-resolution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffroukje%2Fsuper-resolution/lists"}