GithubHelp home page GithubHelp logo

whuhxb / svt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kahnchana/svt

0.0 0.0 0.0 755 KB

Official repository for "Self-Supervised Video Transformer" (CVPR'22)

Home Page: https://kahnchana.github.io/svt

License: MIT License

Shell 0.52% Python 99.48%

svt's Introduction

Self-Supervised Video Transformer (CVPR'22-Oral)

Kanchana Ranasinghe, Muzammal Naseer, Salman Khan, Fahad Shahbaz Khan, Michael Ryoo

Paper Link | Project Page

Abstract: In this paper, we propose self-supervised training for video transformers using unlabelled video data. From a given video, we create local and global spatiotemporal views with varying spatial sizes and frame rates. Our self-supervised objective seeks to match the features of these different views representing the same video, to be invariant to spatiotemporal variations in actions. To the best of our knowledge, the proposed approach is the first to alleviate the dependency on negative samples or dedicated memory banks in Self-supervised Video Transformer (SVT). Further, owing to the flexibility of Transformer models, SVT supports slow-fast video processing within a single architecture using dynamically adjusted positional encodings and supports long-term relationship modeling along spatiotemporal dimensions. Our approach performs well on four action recognition benchmarks (Kinetics-400, UCF-101, HMDB-51, and SSv2) and converges faster with small batch sizes.

intro_image

Usage & Data

Refer to requirements.txt for installing all python dependencies. We use python 3.7 with pytorch 1.7.1.

We download the official version of Kinetics-400 from here and videos are resized using code here.

Self-supervised Training

For self-supervised pre-training on models on the Kinetics-400 dataset, use the scripts in the scripts directory as follows. Change the paths to dataset as required.

./scripts/train.sh

Downstream Evaluation

Scripts to perform evaluation (linear or knn) on selected downstream tasks are as below. Paths to datasets and pre-trained models must be set appropriately. Note that in the case of linear evaluation, a linear layer will be fine-tuned on the new dataset and this training can be time-consuming on a single GPU.

./scripts/eval_linear.sh
./scripts/eval_knn.sh

Pretrained Models

Our pre-trained models can be found under releases.

Citation

@inproceedings{ranasinghe2022selfsupervised,
    title={Self-supervised Video Transformer}, 
    author={Kanchana Ranasinghe and Muzammal Naseer and Salman Khan and Fahad Shahbaz Khan and Michael Ryoo},
    booktitle={IEEE/CVF International Conference on Computer Vision and Pattern Recognition},
    month = {June},
    year={2022}
  }

Acknowledgements

Our code is based on DINO and TimeSformer repositories. We thank the authors for releasing their code. If you use our model, please consider citing these works as well.

svt's People

Contributors

kahnchana avatar salman-h-khan 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.