Giter Club home page Giter Club logo

temporal-shift-module's Introduction

Temporal Shift Module for Jester Gesture Recognition

According to mit official code, we reduce and modify some codes for jester dataset.

Prerequisites

  • Python 3.6
  • PyTorch 1.2
  • Opencv 3.4
  • Other packages can be found in requirements.txt

Data Preparation

Firstly, we need to download the Jester dataset. Then, we process the data and generate corresponding labels. Finally, we get category.txt, train_videofolder.txt, val_videofolder.txt and test_videofolder.txt documents.

python3 datas/generate_label.py

Train and Validate

bash train.sh

After total training epochs, you can get result.csv, that is the test result document, including video number and corresponding label.

Reference

paper links

temporal-shift-module's People

Contributors

dependabot[bot] avatar jiamingno1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

temporal-shift-module's Issues

Dense Sample 还是Uniform Sampling?

请问online_demo中的模型是用Dense Sample 还是Uniform Sampling策略训练出来的?你提供的代码是Uniform Sampling,精度能到90+,但online实测时什么都识别出来出,不知道是不是因为采样方式。

关于在线模型

你好,请问你有没有尝试训练在线的模型?
def shift(x, n_segment, fold_div=3):
nt, c, h, w = x.size()
n_batch = nt // n_segment
x = x.view(n_batch, n_segment, c, h, w)

    fold = c // fold_div

    out = torch.zeros_like(x)
    out[:, :-1, :fold] = x[:, 1:, :fold]  # shift future frames
    out[:, 1:, fold: 2 * fold] = x[:, :-1, fold: 2 * fold]  # shift past frames
    out[:, :, 2 * fold:] = x[:, :, 2 * fold:]  # not shift

    return out.view(nt, c, h, w)

如果想训练在线模型,这一部分应该怎么修改?谢谢!

some questions about code

1、mv2的预训练模型是在ImageNet上训练好的么?
2、我跑了一下,在jester上准确率是90%,在测试阶段为什么还要重新加载一下mobilenet_v2.pth.tar,那么特征提取这部分是不是要微调一下,不是很明白TSM是在MV2把特征提取好了再做后续工作,还是test的时候用TSM_jester_RGB_MobileNetV2_shift8_blockres_avg_segment8_e5.pth这个模型。

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.