GithubHelp home page GithubHelp logo

huicongzhang / bsstnet Goto Github PK

View Code? Open in Web Editor NEW
19.0 5.0 1.0 204 KB

Implementation of "Blur-aware Spatio-temporal Sparse Transformer for Video Deblurring". (Zhang et al., CVPR 2024)

Home Page: https://vilab.hit.edu.cn/projects/bsstnet

Python 78.02% C++ 8.33% Cuda 13.56% Shell 0.09%
cvpr2024 pytorch-implementation video-deblurring

bsstnet's Introduction

Blur-aware Spatio-temporal Sparse Transformer for Video Deblurring

Huicong Zhang, Haozhe Xie, Hongxun Yao

Harbin Institute of Technology, S-Lab, Nanyang Technological University

Overview

Update

  • [2024/07/04] The training and testing code are released.
  • [2024/02/29] The repo is created.

Datasets

We use the GoPro and DVD datasets in our experiments, which are available below:

You could download the zip file and then extract it to the datasets folder.

Pretrained Models

You could download the pretrained model from here and put the weights in model_zoos.

Prerequisites

Clone the Code Repository

git clone https://github.com/huicongzhang/BSSTNet.git

Install Denpendencies

conda create -n BSSTNet python=3.8
conda activate BSSTNet
pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
pip install mmcv-full==1.7.1 -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.9/index.html
pip install -r requirements.txt
BASICSR_EXT=True python setup.py develop

Test

To train BSSTNet, you can simply use the following commands:

GoPro dataset

scripts/dist_test.sh 2 options/test/BSST/gopro_BSST.yml

DVD dataset

scripts/dist_test.sh 2 options/test/BSST/dvd_BSST.yml

Train

To train BSSTNet, you can simply use the following commands:

GoPro dataset

scripts/dist_train.sh 2 options/test/BSST/gopro_BSST.yml

DVD dataset

scripts/dist_train.sh 2 options/test/BSST/dvd_BSST.yml

Cite this work

@inproceedings{zhang2024bsstnet,
  title     = {Blur-aware Spatio-temporal Sparse Transformer for Video Deblurring},
  author    = {Zhang, Huicong and 
               Xie, Haozhe and 
               Yao, Hongxun},
  booktitle = {CVPR},
  year      = {2024}
}

License

This project is open sourced under MIT license.

Acknowledgement

This project is based on BasicSR, ProPainter and Shift-Net.

bsstnet's People

Contributors

huicongzhang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

changxuan-fan

bsstnet's Issues

get_bi_flows error

Hi, could you test the get_bi_flows snippet in Video_BSST_model.py.

I tested it with following:

import torch
lqs = torch.rand(1, 10, 3, 180, 320).cuda()
flows_forward, flows_backward = get_bi_flows(lqs)

But it turns error in Line 66 that
Exception has occurred: RuntimeError grid_sampler(): expected grid and input to have same batch size, but got input with sizes [2160, 1, 12, 20] and grid with sizes [1980, 9, 9, 2]

Thanks!

About optical flow model

Hi, thanks for you excellent work! In your paper, when reporting runtime or parameters, did you include the computation of these parameters about RAFT? I think the computational cost of RAFT should be included.

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.