Git Product home page Git Product logo

fani's Introduction

Feature Aggregating Network with Inter-Frame Interaction for Efficient Video Super-Resolution

Overview

This repository provides the tensorflow implementation of the Video Super-resolution model FANI for mobile devices.

Contents


Requirements

[back]


Dataset preparation

  • Download REDS dataset and extract it into data folder.

    The REDS dataset folder should contain three subfolders: train/, val/ and test/. Please find the download links to above files in website.

[back]


Training and Validation

Configuration

Before training and testing, please make sure the fields in config.yml is properly set.

log_dir: snapshot -> The directory which records logs and checkpoints. 

dataset:
    dataloader_settings: -> The setting of different splits dataloader.
        train:
            batch_size: 4
            drop_remainder: True
            shuffle: True
            num_parallel_calls: 6
        val:
            batch_size: 1
    data_dir: data/ -> The directory of REDS dataset.
    degradation: sharp_bicubic -> The degradation of images.
    train_frame_num: 10 -> The number of image frame(s) for per training step.
    test_frame_num: 100 -> The number of image frame(s) for per testing step.
    crop_size: 64 -> The height and width of cropped patch.

model:
    path: model/mobile_rrn.py -> The path of model file.
    name: MobileRRN -> The name of model class.

learner:
    general:
        total_steps: 1500000 -> The number of training steps.
        log_train_info_steps: 100 -> The frequency of logging training info.
        keep_ckpt_steps: 10000 -> The frequency of saving checkpoint.
        valid_steps: 100000 -> The frequency of validation.

    optimizer: -> Define the module name and setting of optimizer
        name: Adam
        beta_1: 0.9
        beta_2: 0.999

    lr_scheduler: -> Define the module name and setting of learning rate scheduler
        name: ExponentialDecay
        initial_learning_rate: 0.0001
        decay_steps: 1000000
        decay_rate: 0.1
        staircase: True

    saver:
        restore_ckpt: null -> The path to checkpoint where would be restored from.

Training

To train the model, use the following command:

sh train.sh

The main arguments are as follows:

process :   Process type should be train or test.
config_path :   Path of yml config file of the application.

After training, the checkpoints will be produced in log_dir.

Validation

To valid the model, use the following command:

sh valid.sh

After validating, the output images will be produced in log_dir/output.

[back]


Testing

To generate testing outputs, use the following command:

sh test.sh

The main arguments are as follows:

model_path :   Path of model file.
model_name :   Name of model class.
ckpt_path :   Path of checkpoint.
data_dir :   Directory of testing frames in REDS dataset.
output_dir :   Directory for saving output super-resolution images.

[back]


Convert to tflite

To convert the keras model to tflite, use the following command:

sh convert_to_tflite.sh

The main arguments are as follows:

model_path :   Path of model file.
model_name :   Name of model class.
input_shape :   Series of the input shapes split by `:`.
ckpt_path :   Path of checkpoint.
output_tflite :   Path of output tflite.

[back]


TFLite inference on Mobile

  • AI benchmark: An app allowing you to load your model and run it locally on your own Android devices with various acceleration options (e.g. CPU, GPU, APU, etc.).

[back]


License

FANI is released under the MIT license.

[back]


Citation

@inproceedings{DBLP:conf/icdm/LiZZFZX23,
  author       = {Yawei Li and
                  Zhao Zhang and
                  Suiyi Zhao and
                  Jicong Fan and
                  Haijun Zhang and
                  Mingliang Xu},
  editor       = {Guihai Chen and
                  Latifur Khan and
                  Xiaofeng Gao and
                  Meikang Qiu and
                  Witold Pedrycz and
                  Xindong Wu},
  title        = {Feature Aggregating Network with Inter-Frame Interaction for Efficient
                  Video Super-Resolution},
  booktitle    = {{IEEE} International Conference on Data Mining, {ICDM} 2023, Shanghai,
                  China, December 1-4, 2023},
  pages        = {329--338},
  publisher    = {{IEEE}},
  year         = {2023},
  url          = {https://doi.org/10.1109/ICDM58522.2023.00042},
  doi          = {10.1109/ICDM58522.2023.00042},
  timestamp    = {Tue, 13 Feb 2024 13:16:49 +0100},
  biburl       = {https://dblp.org/rec/conf/icdm/LiZZFZX23.bib},
  bibsource    = {dblp computer science bibliography, https://dblp.org}
}

[back]

fani's People

Contributors

kyrie2to11 avatar

Watchers

 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.