MCPcopy Index your code
hub / github.com/ChenHsing/SVFormer

github.com/ChenHsing/SVFormer @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
786 symbols 1,877 edges 84 files 489 documented · 62%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

SVFormer: Semi-supervised Video Transformer for Action Recognition

This is the official implementation of the paper SVFormer

@inproceedings{svformer,
  title={SVFormer: Semi-supervised Video Transformer for Action Recognition},
  author={Zhen Xing, Qi Dai, Han Hu, Jingjing Chen, Zuxuan Wu, Yu-Gang Jiang},
  booktitle={CVPR},
  year={2023}
}

Installation

We tested the released code with the following conda environment

conda create -n svformer python=3.7
conda activate svformer
bash env.sh

Data Preparation

We expect that --train_list_path and --val_list_path command line arguments to be a data list file of the following format

<path_1> <label_1>
<path_2> <label_2>
...
<path_n> <label_n>

where <path_i> points to a video file, and <label_i> is an integer between 0 and num_classes - 1. --num_classes should also be specified in the command line argument.

Additionally, <path_i> might be a relative path when --data_root is specified, and the actual path will be relative to the path passed as --data_root.

We provide example as list_hmdb_40.

Train script of SVFormer-B at Kinetic-400 1% setting

bash train.sh

Main Results in paper

This is an original-implementation for open-source use. We are still re-running some models, and their scripts, checkpoints will be released later. In the following table we report the accuracy in original paper.

Backbone UCF101-1% UCF101-10% Kinetic400-1% Kinetic400-10%
SVFormer-S 31.4 79.1 32.6 61.6
SVFormer-B 46.3 86.7 49.1 69.4
Backbone HMDB51-40% HMDB51-50% HMDB51-60%
SVFormer-S 56.2 58.2 59.7
SVFormer-B 61.6 64.4 68.2

Acknowledgements

Our code is modified from TimeSformer. Thanks for their awesome work!

Core symbols most depended-on inside this repo

reset
called by 26
timesformer/utils/meters.py
get
called by 19
timesformer/utils/ava_evaluation/np_box_list.py
get_field
called by 19
timesformer/utils/ava_evaluation/np_box_list.py
add_value
called by 13
timesformer/utils/meters.py
trunc_normal_
called by 12
timesformer/models/vit_utils.py
get
called by 12
timesformer/models/features.py
get_win_median
called by 11
timesformer/utils/meters.py
num_boxes
called by 11
timesformer/utils/ava_evaluation/np_box_list.py

Shape

Function 346
Method 337
Class 103

Languages

Python100%

Modules by API surface

timesformer/datasets/video_transform.py57 symbols
timesformer/utils/meters.py45 symbols
timesformer/datasets/rand_augment.py42 symbols
timesformer/models/vit.py37 symbols
timesformer/datasets/cv2_transform.py32 symbols
timesformer/utils/ava_evaluation/object_detection_evaluation.py31 symbols
timesformer/models/features.py27 symbols
timesformer/models/cross_view.py24 symbols
timesformer/models/bottle.py24 symbols
timesformer/models/resnet_helper.py22 symbols
timesformer/visualization/utils.py20 symbols
timesformer/utils/ava_evaluation/np_box_list_ops.py18 symbols

For agents

$ claude mcp add SVFormer \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact