{"id":20744897,"url":"https://github.com/calebzulawski/image-super-resolution","last_synced_at":"2026-02-22T09:11:03.220Z","repository":{"id":85656569,"uuid":"83910985","full_name":"calebzulawski/image-super-resolution","owner":"calebzulawski","description":null,"archived":false,"fork":false,"pushed_at":"2017-03-12T18:28:22.000Z","size":1077,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-24T05:47:56.388Z","etag":null,"topics":["convolutional-neural-networks","image-processing","super-resolution"],"latest_commit_sha":null,"homepage":null,"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/calebzulawski.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":"2017-03-04T17:20:26.000Z","updated_at":"2021-05-31T21:34:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"84531a3f-58e1-463c-afce-65b735dc0a8d","html_url":"https://github.com/calebzulawski/image-super-resolution","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/calebzulawski%2Fimage-super-resolution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calebzulawski%2Fimage-super-resolution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calebzulawski%2Fimage-super-resolution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calebzulawski%2Fimage-super-resolution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/calebzulawski","download_url":"https://codeload.github.com/calebzulawski/image-super-resolution/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250573344,"owners_count":21452345,"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":["convolutional-neural-networks","image-processing","super-resolution"],"created_at":"2024-11-17T07:17:37.425Z","updated_at":"2026-02-22T09:10:58.197Z","avatar_url":"https://github.com/calebzulawski.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Image super-resolution with convolutional neural networks\n\nWritten by Caleb Zulawski and Kelvin Lin for ECE411 *Computational Graphs for Machine Learning* at The Cooper Union.\nThe implementation is based on [*Image Super-Resolution Using Deep\nConvolutional Networks*](https://arxiv.org/pdf/1501.00092v3.pdf).\n\n---\n\n## Dataset\nImages are downloaded from ImageNet from a variety of categories.  Subimages (33x33) are randomly cropped from each image and used to train the network.\n\n## Our convolutional neural network\nThe network is designed to improve the perceived quality of an image upscaled with bicubic interpolation.  The network is made up of 3 convolutional layers (9x9, 64 features; 1x1, 32 features; 5x5, 3 channels).  Padding is not used, so the output image is 12 pixels smaller in each dimension.\n#### Training\nTo train the network, a Gaussian blur is applied to each subimage (3x3 kernel, σ=0.2), before downsampling by 3 and interpolating by 3 using bicubic interpolation.  This interpolated subimage is the input to the network, and the output is compared with the original full-resolution image.  The results are validated by calculating the peak signal-to-noise ratio (PSNR) gain from the bicubic interpolation to the output of the CNN.  When we stopped our training, the PSNR gain was approximately 1.2 dB. \n#### Generation\nWhen generating new images at a higher resolution, the image is scaled by 3 using bicubic interpolation and input to the network.\n\n## Downloading ImageNet\nTo download ImageNet, you'll need an account and access to the original ImageNet data, which is freely available for educational and non-commercial use.  This will provide you with an API access key, which is needed to download the data.\n\nOnce you have an access key, create a file named `imagenet_credentials.sh` which contains your credentials in the following format:\n\n```bash\nusername=yourusername\naccesskey=youraccesskey\n```\n\nThen you can run `./get_data.sh` which will download and prepare the images from the ImageNet synsets specified in `wnids.txt`.\n\n## Running this project\n#### Training\nThis assumes the training data has already been downloaded with the `get_data.sh` script.  First, create a directory for saving the model (`saved_model` for the default location).  To train the model, run `./run.py train`.  This will continue training indefinitely–the program will only exit with a keyboard interrupt (control-c), so wait until validation results are satisfactory.\n#### Generating high resolution images\nOnce the model is trained, run `./run.py generate --input your_input_image.jpg`.  The bicubic interpolation is written to `outputs/bicubic.jpg`, and the improved interpolation is written to `outputs/output.jpg`.\n\n## Example images\n\n[01-input]: img/01-input.jpg\n[01-bicubic]: img/01-bicubic.jpg\n[01-output]: img/01-output.jpg\n[02-input]: img/02-input.jpg\n[02-bicubic]: img/02-bicubic.jpg\n[02-output]: img/02-output.jpg\n[03-input]: img/03-input.jpg\n[03-bicubic]: img/03-bicubic.jpg\n[03-output]: img/03-output.jpg\n\n\n| Original    | Bicubic       | Network      |\n| ----------- | ------------- | ------------ |\n| ![01-input] | ![01-bicubic] | ![01-output] |\n| ![02-input] | ![02-bicubic] | ![02-output] |\n| ![03-input] | ![03-bicubic] | ![03-output] |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalebzulawski%2Fimage-super-resolution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcalebzulawski%2Fimage-super-resolution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalebzulawski%2Fimage-super-resolution/lists"}