GithubHelp home page GithubHelp logo

sr's Introduction

Image and video super resolution

This repo contains TensorFlow implementations of following image and video super resolution models:

  • SRCNN — "Image Super-Resolution Using Deep Convolutional Networks" [arxiv]
  • ESPCN — "Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network" [arxiv]
  • VSRNet — "Video Super-Resolution With Convolutional Neural Networks" [ieee]
  • VESPCN — "Real-Time Video Super-Resolution with Spatio-Temporal Networks and Motion Compensation" [arxiv]

This repo is a part of GSoC project for super resolution filter in ffmpeg.

Model training

To train provided models you should prepare datasets first using generate_datasets.sh script. It will download several videos (from https://www.harmonicinc.com/4k-demo-footage-download/) to build video dataset for video models and DIV2K dataset (https://data.vision.ee.ethz.ch/cvl/DIV2K/) for image models. After that either of the train scripts for each model can be used to train them.

Model generation

To generate binary model files, that can be used in ffmpeg's sr filter, use generate_header_and_model.py script. It additionally produces header files (that are used for internal models in ffmpeg). To use this script specify at least what model to generate and path to the checkpoint files (that can be a folder with several checkpoints, in this case latest checkpoint will be used). For example, to generate model files for trained ESPCN model following command can be used:

python3 generate_header_and_model.py --model=espcn --ckpt_path=logdir/espcn_batch_32_lr_1e-3_decay_adam/train

Benchmark results

Image test set

This test set is produced with generate_datasets.sh script and consists of test part of DIV2K dataset.

Model PSNR SSIM Time (s/image)
SRCNN 32.5634 0.9234 0.1875
ESPCN 33.8585 0.9324 0.1532

Video test set

To get this test set you should manually download HD videos [Website] and use:

python3 prepare_dataset.py --video_folder=folder_with_videos --dataset_folder=datasets/test --type=full --temporal_radius=1 --frames_per_scene=5 --crop --crop_height=720 --crop_width=1280
Model PSNR SSIM Time (s/image)
SRCNN 31.0228 0.8914 0.0614
ESPCN 32.0147 0.9006 0.0492
VSRNet 30.7809 0.8862 0.0743
VESPCN 32.0523 0.8991 0.0528

sr's People

Contributors

highvoltagerocknroll avatar

Watchers

Ishmael Sameen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.