Giter Site home page Giter Site logo

zsxkib / evtexture Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dachunkai/evtexture

0.0 0.0 0.0 16.46 MB

[ICML 2024] EvTexture: Event-driven Texture Enhancement for Video Super-Resolution

Home Page: https://dachunkai.github.io/evtexture.github.io/

License: Apache License 2.0

Shell 0.15% C++ 7.94% Python 66.88% Cuda 11.83% Jupyter Notebook 12.64% Dockerfile 0.55%

evtexture's Introduction

PWC PWC

Official Pytorch implementation for the "EvTexture: Event-driven Texture Enhancement for Video Super-Resolution" paper (ICML 2024).

๐ŸŒ Project | ๐Ÿ“ƒ Paper | ๐Ÿ–ผ๏ธ Poster

Authors: Dachun Kai๐Ÿ“ง๏ธ, Jiayao Lu, Yueyi Zhang๐Ÿ“ง๏ธ, Xiaoyan Sun, University of Science and Technology of China

Feel free to ask questions. If our work helps, please don't hesitate to give us a โญ!

๐Ÿš€ News

  • Release training code
  • 2024/07/02: Release the colab file for a quick test
  • 2024/06/28: Release details to prepare datasets
  • 2024/06/08: Publish docker image
  • 2024/06/08: Release pretrained models and test sets for quick testing
  • 2024/06/07: Video demos released
  • 2024/05/25: Initialize the repository
  • 2024/05/02: ๐ŸŽ‰ ๐ŸŽ‰ Our paper was accepted in ICML'2024

๐Ÿ”– Table of Content

  1. Video Demos
  2. Code
  3. Citation
  4. Contact
  5. License and Acknowledgement

๐Ÿ”ฅ Video Demos

A $4\times$ upsampling results on the Vid4 and REDS4 test sets.

Vid4_City.mp4
Vid4_Foliage.mp4
REDS_000.mp4
REDS_011.mp4

Code

Installation

  • Dependencies: Miniconda, CUDA Toolkit 11.1.1, torch 1.10.2+cu111, and torchvision 0.11.3+cu111.

  • Run in Conda

    conda create -y -n evtexture python=3.7
    conda activate evtexture
    pip install torch-1.10.2+cu111-cp37-cp37m-linux_x86_64.whl
    pip install torchvision-0.11.3+cu111-cp37-cp37m-linux_x86_64.whl
    git clone https://github.com/DachunKai/EvTexture.git
    cd EvTexture && pip install -r requirements.txt && python setup.py develop
  • Run in Docker ๐Ÿ‘

    Note: before running the Docker image, make sure to install nvidia-docker by following the official instructions.

    [Option 1] Directly pull the published Docker image we have provided from Alibaba Cloud.

    docker pull registry.cn-hangzhou.aliyuncs.com/dachunkai/evtexture:latest

    [Option 2] We also provide a Dockerfile that you can use to build the image yourself.

    cd EvTexture && docker build -t evtexture ./docker

    The pulled or self-built Docker image containes a complete conda environment named evtexture. After running the image, you can mount your data and operate within this environment.

    source activate evtexture && cd EvTexture && python setup.py develop

Test

  1. Download the pretrained models from (Releases / Onedrive / Google Drive / Baidu Cloud(n8hg)) and place them to experiments/pretrained_models/EvTexture/. The network architecture code is in evtexture_arch.py.

    • EvTexture_REDS_BIx4.pth: trained on REDS dataset with BI degradation for $4\times$ SR scale.
    • EvTexture_Vimeo90K_BIx4.pth: trained on Vimeo-90K dataset with BI degradation for $4\times$ SR scale.
  2. Download the preprocessed test sets (including events) for REDS4 and Vid4 from (Releases / Onedrive / Google Drive / Baidu Cloud(n8hg)), and place them to datasets/.

    • Vid4_h5: HDF5 files containing preprocessed test datasets for Vid4.

    • REDS4_h5: HDF5 files containing preprocessed test datasets for REDS4.

  3. Run the following command:

    • Test on Vid4 for 4x VSR:
      ./scripts/dist_test.sh [num_gpus] options/test/EvTexture/test_EvTexture_Vid4_BIx4.yml
    • Test on REDS4 for 4x VSR:
      ./scripts/dist_test.sh [num_gpus] options/test/EvTexture/test_EvTexture_REDS4_BIx4.yml
      This will generate the inference results in results/. The output results on REDS4 and Vid4 can be downloaded from (Releases / Onedrive / Google Drive / Baidu Cloud(n8hg)).

Data Preparation

  • Both video and event data are required as input, as shown in the snippet. We package each video and its event data into an HDF5 file.

  • Example: The structure of calendar.h5 file from the Vid4 dataset is shown below.

    calendar.h5
    โ”œโ”€โ”€ images
    โ”‚   โ”œโ”€โ”€ 000000 # frame, ndarray, [H, W, C]
    โ”‚   โ”œโ”€โ”€ ...
    โ”œโ”€โ”€ voxels_f
    โ”‚   โ”œโ”€โ”€ 000000 # forward event voxel, ndarray, [Bins, H, W]
    โ”‚   โ”œโ”€โ”€ ...
    โ”œโ”€โ”€ voxels_b
    โ”‚   โ”œโ”€โ”€ 000000 # backward event voxel, ndarray, [Bins, H, W]
    โ”‚   โ”œโ”€โ”€ ...
    
  • To simulate and generate the event voxels, refer to the dataset preparation details in DataPreparation.md.

Inference on your own video

โค๏ธ Seeking Collaboration: For issues #6 and #7, our method can indeed perform inference on videos without event data. The solution is to use an event camera simulator, such as vid2e, to generate event data from the video, and then input both the video data and the generated event data into our model. This part, however, may require extensive engineering work to package everything into a script, as detailed in DataPreparation.md. We currently do not have enough time to undertake this task, so we are looking for collaborators to join us in this effort! ๐Ÿ˜Š

๐Ÿ˜Š Citation

If you find the code and pre-trained models useful for your research, please consider citing our paper. ๐Ÿ˜ƒ

@inproceedings{kai2024evtexture,
  title={Ev{T}exture: {E}vent-driven {T}exture {E}nhancement for {V}ideo {S}uper-{R}esolution},
  author={Kai, Dachun and Lu, Jiayao and Zhang, Yueyi and Sun, Xiaoyan},
  booktitle={International Conference on Machine Learning},
  year={2024},
  organization={PMLR}
}

Contact

If you meet any problems, please describe them in issues or contact:

License and Acknowledgement

This project is released under the Apache-2.0 license. Our work is built upon BasicSR, which is an open source toolbox for image/video restoration tasks. Thanks to the inspirations and codes from RAFT, event_utils and EvTexture-jupyter.

evtexture's People

Contributors

dachunkai avatar eltociear 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.