All Projects → Gregjksmith → Single-Image-Example-Based-Super-Resolution

Gregjksmith / Single-Image-Example-Based-Super-Resolution

Licence: MIT license
Single image example-based super resolution. Improves the spatial and temporal resolution of an image using a direct mapping of LR HR patch pairs. C++, openCV.

Programming Languages

C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to Single-Image-Example-Based-Super-Resolution

Pytorch Lapsrn
Pytorch implementation for LapSRN (CVPR2017)
Stars: ✭ 215 (+551.52%)
Mutual labels:  super-resolution
Magpie
将任何窗口放大至全屏
Stars: ✭ 4,478 (+13469.7%)
Mutual labels:  super-resolution
MLSR
Source code for ECCV2020 "Fast Adaptation to Super-Resolution Networks via Meta-Learning"
Stars: ✭ 59 (+78.79%)
Mutual labels:  super-resolution
Master Thesis Bayesiancnn
Master Thesis on Bayesian Convolutional Neural Network using Variational Inference
Stars: ✭ 222 (+572.73%)
Mutual labels:  super-resolution
SRCNN-PyTorch
Pytorch framework can easily implement srcnn algorithm with excellent performance
Stars: ✭ 48 (+45.45%)
Mutual labels:  super-resolution
ESPCN-PyTorch
A PyTorch implementation of ESPCN based on CVPR 2016 paper Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network.
Stars: ✭ 33 (+0%)
Mutual labels:  super-resolution
Ignn
Code repo for "Cross-Scale Internal Graph Neural Network for Image Super-Resolution" (NeurIPS'20)
Stars: ✭ 210 (+536.36%)
Mutual labels:  super-resolution
WaifuLite
Super Resolution for Anime image, lightweight implementation
Stars: ✭ 20 (-39.39%)
Mutual labels:  super-resolution
TEGAN
Generative Adversarial Network (GAN) for physically realistic enrichment of turbulent flow fields
Stars: ✭ 60 (+81.82%)
Mutual labels:  super-resolution
MSG-Net
Depth Map Super-Resolution by Deep Multi-Scale Guidance, ECCV 2016
Stars: ✭ 76 (+130.3%)
Mutual labels:  super-resolution
Zoom Learn Zoom
computational zoom from raw sensor data
Stars: ✭ 224 (+578.79%)
Mutual labels:  super-resolution
Image Super Resolution
🔎 Super-scale your images and run experiments with Residual Dense and Adversarial Networks.
Stars: ✭ 3,293 (+9878.79%)
Mutual labels:  super-resolution
CSSR
Crack Segmentation for Low-Resolution Images using Joint Learning with Super-Resolution (CSSR) was accepted to international conference on MVA2021 (oral), and selected for the Best Practical Paper Award.
Stars: ✭ 50 (+51.52%)
Mutual labels:  super-resolution
Msrn Pytorch
This repository is a PyTorch version of the paper "Multi-scale Residual Network for Image Super-Resolution" (ECCV 2018).
Stars: ✭ 221 (+569.7%)
Mutual labels:  super-resolution
pytorch-gans
PyTorch implementation of GANs (Generative Adversarial Networks). DCGAN, Pix2Pix, CycleGAN, SRGAN
Stars: ✭ 21 (-36.36%)
Mutual labels:  super-resolution
Ranksrgan
ICCV 2019 (oral) RankSRGAN: Generative Adversarial Networks with Ranker for Image Super-Resolution. PyTorch implementation
Stars: ✭ 213 (+545.45%)
Mutual labels:  super-resolution
Jalali-Lab-Implementation-of-RAISR
Implementation of RAISR (Rapid and Accurate Image Super Resolution) algorithm in Python 3.x by Jalali Laboratory at UCLA. The implementation presented here achieved performance results that are comparable to that presented in Google's research paper (with less than ± 0.1 dB in PSNR). Just-in-time (JIT) compilation employing JIT numba is used to …
Stars: ✭ 118 (+257.58%)
Mutual labels:  super-resolution
AI-Lossless-Zoomer
AI无损放大工具
Stars: ✭ 940 (+2748.48%)
Mutual labels:  super-resolution
tensorflow-bicubic-downsample
tf.image.resize_images has aliasing when downsampling and does not have gradients for bicubic mode. This implementation fixes those problems.
Stars: ✭ 23 (-30.3%)
Mutual labels:  super-resolution
SRDenseNet-pytorch
SRDenseNet-pytorch(ICCV_2017)
Stars: ✭ 113 (+242.42%)
Mutual labels:  super-resolution

Single Image Example-based Super-Resolution

Description

Performs example-based Super-resolution on an image using direct mapping between high and low resolution patches.

Learning is done utilizing a self-example high-resolution, low-resolution coupled dictionary. Self-example means the dictionary is created from sampling patches from the input low resolution image. This approach is based on the observation that similar patches of a natural image occur within the same scale and between different scales.

An affine mapping approach is learned to transform a low resolution patch to its high resolution counterpart. This problem is ill-posed and hence we add a regularization term based on Tikhonov regularization.

We take patches of the image in the wavelet domain to perform training and prediction. We expand the discrete wavelet basis by using a discrete rational wavelet transform. Results suggest that the increased sparsity and the larger basis help to improve the ill-posed nature of the problem.

Super-resolution is performed through gradual upscaling. This method better retains low resolution patch structures and outperforms single step upscaling at higher upscaling rates.

API

gs::superResolution

cv::Mat* gs::superResolution(cv::Mat inputImage, float upscale, int iterations, double lambda, unsigned int patchSize unsigned int patchOverlap, unsigned int neighborhoodSize, double neighborhoodWeight);

gs::superResolution uses example patches from the input low resolution image to perform super-resolution.

Paramaters

cv::Mat inputImage: Input low resolution image.

float upscale: Upscaling factor. Must be greater than 1.

int iterations: Number of upscaling iterations performed. The final product is upscaled by a factor of 'upscale'.

double lambda: Regularization weight.

unsigned int patchSize: Patch size.

unsigned int patchOverlap: Patch overlap.

unsigned int neighborhoodSize: K-nearest neighbors used.

double neighborhoodWeight: K-nearest neighbor scaling factor. Dictionary atoms are scaled based on the atom's distance from a low resolution patch.

gs::superResolutionWavelet

cv::Mat* gs::superResolutionWavelet(cv::Mat inputImage, float upscale, int iterations, double lambda, unsigned int patchSize unsigned int patchOverlap, unsigned int neighborhoodSize, double neighborhoodWeight, int waveletP, int waveletQ);

gs::superResolutionWavelet uses example wavelet patches from the input low resolution image to perform super-resolution.

Paramaters

cv::Mat inputImage: Input low resolution image.

float upscale: Upscaling factor. Must be greater than 1.

int iterations: Number of upscaling iterations performed. The final product is upscaled by a factor of 'upscale'.

double lambda: Regularization weight.

unsigned int patchSize: Patch size.

unsigned int patchOverlap: Patch overlap.

unsigned int neighborhoodSize: K-nearest neighbors used.

double neighborhoodWeight: K-nearest neighbor scaling factor. Dictionary atoms are scaled based on the atom's distance from a low resolution patch.

int waveletP: upsampling wavelet factor.

int waveletQ: downsampling wavelet factor. WaveletQ must be larger than waveletP.

Example

#include "SuperResolution.h"
#define LR_IMAGE_PATH "../images/peppers256.tif"
#define GT_IMAGE_PATH "../images/peppers.png"

int main()
{

	cv::Mat imageLR;
	cv::Mat imageGT;

	/*load the test images*/
	cv::Mat imageLR = imread(LR_IMAGE_PATH, CV_LOAD_IMAGE_GRAYSCALE);
	imageLR = gs::to32F(imageLR);
	imageGT = imread(GT_IMAGE_PATH, CV_LOAD_IMAGE_GRAYSCALE);
	imageGT = gs::to32F(imageGT);

	/*SR variables*/
	float upscale = 2.0;
	int iterations = 1;
	unsigned int patchSize = 4;
	unsigned int patchOverlap = 3;
	double lambda = 1e-12;
	unsigned int neighborhoodSize = 200;
	double neighborhoodWeight = 1.0;

	/*Super-resolve the image*/
	Mat* imageSR = gs::superResolve(imageLR, upscale, iterations, lambda, patchSize, patchOverlap, neighborhoodSize, neighborhoodWeight);
	/*export the report and images*/
	gs::exportReport(imageLR, *imageSR, imageGT, upscale, iterations, lambda, patchSize, patchOverlap, neighborhoodSize, neighborhoodWeight);

	int waveletP = 7;
	int waveletQ = 8;
	neighborhoodWeight = 4.0;
	/*Super-resolve the image*/
	Mat* imageSRWavelet = gs::superResolveWavelet(imageLR, upscale, iterations, lambda, patchSize, patchOverlap, neighborhoodSize, neighborhoodWeight, waveletP, waveletQ);
	/*export the report and images*/
	gs::exportReportWavelet(imageLR, *s, imageGT, 2, 1, lambda, patchSize, patchOverlap, neighborhoodSize, neighborhoodWeight,waveletP,waveletQ);
}

Results

###Input Image:

input image

###Super-resolved:

super-resolved

###Bicubic Interpolation:

bicubic interpolation

###Ground Truth:

ground truth

License

This project is licensed under the terms of the MIT license.

[1] Bevilacqua, Marco, et al. "Single-image super-resolution via linear mapping of interpolated self-examples." IEEE Transactions on Image Processing 23.12 (2014): 5334-5347.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].