Code Monkey home page Code Monkey logo

fsl-video's Introduction

A Closer Look at Few-Shot Video Classification: A New Baseline and Benchmark

This repo contains the reference source code for the paper:

https://arxiv.org/abs/2110.12358

Data Preparation

Few-shot versions of Kinetics and Something-Something V2 datasets can be downloaded from here. We used the split from CMN for Kinetics and the split from OTAM for SSv2. If you already have the full versions of Kinetics and SSv2, you can also use ./tools/select_kinetics100.py to select the few-shot verison datasets. Generate the annotation using ./tools/write_kinetics100.py

Feature Extractor Training

For classifier-based methods, we use the standard ResNet50 backbone and training strategies for video classification. Please refer to https://github.com/liu-zhy/temporal-adaptive-module for the feature extractor training. Note that we apply dropout for Baseline Plus and set 'consensus_type=avg' for both classifier-based methods.

For meta-learning methods, modify the corresponding code to have the correct path and filename for the dataset. To train the Meta-Baseline for example (see paper for other hyperparams), run:

CUDA_VISIBLE_DEVICES='0' python proto.py --work_dir [WORK_DIR] --dataset somethingotam

Testing

For classifier-based methods, modify ./config/test_baseline.yaml and run:

CUDA_VISIBLE_DEVICES='0' python baseline_evaluate.py

For meta-learning methods, run:

CUDA_VISIBLE_DEVICES='0' python proto.py --test_model True --checkpoint [CHECKPOINT] --dataset somethingotam

Please refer to utils.py for additional options.

References

We have modified and integrated the following code into this project:

https://github.com/wyharveychen/CloserLookFewShot

https://github.com/liu-zhy/temporal-adaptive-module

https://github.com/wangzehui20/OTAM-Video-via-Temporal-Alignment

fsl-video's People

Contributors

wanglimin avatar zhuzhenxi 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.