All Projects → bryanyzhu → Hidden Two Stream

bryanyzhu / Hidden Two Stream

Licence: other
Caffe implementation for "Hidden Two-Stream Convolutional Networks for Action Recognition"

Projects that are alternatives of or similar to Hidden Two Stream

Dispnet Flownet Docker
Dockerfile and runscripts for DispNet and FlowNet1 (estimation of disparity and optical flow)
Stars: ✭ 78 (-56.42%)
Mutual labels:  cnn, caffe, optical-flow
Liteflownet
LiteFlowNet: A Lightweight Convolutional Neural Network for Optical Flow Estimation, CVPR 2018 (Spotlight paper, 6.6%)
Stars: ✭ 474 (+164.8%)
Mutual labels:  cnn, caffe, optical-flow
Liteflownet2
A Lightweight Optical Flow CNN - Revisiting Data Fidelity and Regularization, TPAMI 2020
Stars: ✭ 195 (+8.94%)
Mutual labels:  cnn, caffe, optical-flow
Flownet2 Docker
Dockerfile and runscripts for FlowNet 2.0 (estimation of optical flow)
Stars: ✭ 137 (-23.46%)
Mutual labels:  cnn, caffe, optical-flow
GuidedNet
Caffe implementation for "Guided Optical Flow Learning"
Stars: ✭ 28 (-84.36%)
Mutual labels:  caffe, optical-flow, unsupervised-learning
Flownet2
FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks
Stars: ✭ 938 (+424.02%)
Mutual labels:  cnn, caffe, optical-flow
Pysad
Streaming Anomaly Detection Framework in Python (Outlier Detection for Streaming Data)
Stars: ✭ 87 (-51.4%)
Mutual labels:  unsupervised-learning, real-time
Mobilenet V2 Caffe
MobileNet-v2 experimental network description for caffe
Stars: ✭ 93 (-48.04%)
Mutual labels:  cnn, caffe
Ddflow
DDFlow: Learning Optical Flow with Unlabeled Data Distillation
Stars: ✭ 101 (-43.58%)
Mutual labels:  unsupervised-learning, optical-flow
Pwc Net pytorch
pytorch implementation of "PWC-Net: CNNs for Optical Flow Using Pyramid, Warping, and Cost Volume"
Stars: ✭ 111 (-37.99%)
Mutual labels:  cnn, optical-flow
Haddoc2
Caffe to VHDL
Stars: ✭ 57 (-68.16%)
Mutual labels:  cnn, caffe
Keras Oneclassanomalydetection
[5 FPS - 150 FPS] Learning Deep Features for One-Class Classification (AnomalyDetection). Corresponds RaspberryPi3. Convert to Tensorflow, ONNX, Caffe, PyTorch. Implementation by Python + OpenVINO/Tensorflow Lite.
Stars: ✭ 102 (-43.02%)
Mutual labels:  cnn, caffe
Yolo V3 Iou
YOLO3 动漫人脸检测 (Based on keras and tensorflow) 2019-1-19
Stars: ✭ 116 (-35.2%)
Mutual labels:  cnn, real-time
Recursive Cnns
Implementation of my paper "Real-time Document Localization in Natural Images by Recursive Application of a CNN."
Stars: ✭ 80 (-55.31%)
Mutual labels:  cnn, real-time
Tdd
Trajectory-pooled Deep-Convolutional Descriptors
Stars: ✭ 99 (-44.69%)
Mutual labels:  caffe, action-recognition
Pwc Net
PWC-Net: CNNs for Optical Flow Using Pyramid, Warping, and Cost Volume, CVPR 2018 (Oral)
Stars: ✭ 1,142 (+537.99%)
Mutual labels:  caffe, optical-flow
Back2future.pytorch
Unsupervised Learning of Multi-Frame Optical Flow with Occlusions
Stars: ✭ 104 (-41.9%)
Mutual labels:  unsupervised-learning, optical-flow
Noiseface
Noise-Tolerant Paradigm for Training Face Recognition CNNs
Stars: ✭ 132 (-26.26%)
Mutual labels:  cnn, caffe
I3d finetune
TensorFlow code for finetuning I3D model on UCF101.
Stars: ✭ 128 (-28.49%)
Mutual labels:  cnn, action-recognition
Video Caffe
Video-friendly caffe -- comes with the most recent version of Caffe (as of Jan 2019), a video reader, 3D(ND) pooling layer, and an example training script for C3D network and UCF-101 data
Stars: ✭ 172 (-3.91%)
Mutual labels:  caffe, action-recognition

Hidden Two-Stream Convolutional Networks for Action Recognition

This is the Caffe implementation of the "Hidden Two-Stream Convolutional Networks for Action Recognition". You can refer to paper for more details at Arxiv.

Dependencies

OpenCV 3 (Installation can be refered here)

Tested on Ubuntu 16.04 with Titan X GPU, CUDNN 5.1

Compiling

To get started, first compile caffe, by configuring a

"Makefile.config" 

then make with

$ make -j 6 all

Training

(this assumes you compiled the code sucessfully)

Here, we take UCF101 split 1 as an example.

First, go to folder,

cd models/ucf101_split1_unsup_end

Then change the FRAME_PATH in train_rgb_split1.txt and val_rgb_split1.txt to where you store the extracted video frames,

/FRAME_PATH/WallPushups/v_WallPushups_g21_c06 111 98

This follows the format as in TSN. 111 indicates the number of frames of that video clip, and 98 represents the action label. For more details about how to construct file list for training and validation, we refer you to here.

Then you need to download the initialization models (pre-trained temporal stream CNN stacked upon pre-trained MotionNet),

UCF101 split1

Then tune the parameters in end_train_val.prototxt and end_solver.prototxt as you need, or leave as it is.

Finally, you can simply run

../../build/tools/caffe train -solver=end_solver.prototxt -weights=ucf101_split1_vgg16_init.caffemodel

NOTE: It is highly likely that you may get better performance than us if you carefully tune the hyper-params such as loss weights, learning rate etc.

Testing

(this assumes you compiled the code sucessfully)

First, download our trained models:

UCF101 split 1 UCF101 split 2 UCF101 split 3

HMDB51 split 1 HMDB51 split 2 HMDB51 split 3

Then go to this folder

cd models/ucf101_split1_unsup_end/eval_ucf101

Then run

python demo_hidden.py

But maybe you need to set paths correctly in demo_hidden.py before you run it, like model_def_file and model_file. And also change the FRAME_PATH in testlist01_with_labels.txt.

After you get both spatial and hidden predictions, the late fusion code is in folder ./test, run late_fusion.m to get the final two stream predictions.

MotionNet

The training and testing code of MotionNet is in folder

cd models/multiframe_MotionNet

The pretraied model can be downloaded at MotionNet.

Misc

  1. There is a chance that you may get a little bit higher or lower accuracy on UCF101 and HMDB51 than the numbers reported in our paper, even using our provided trained models. This is normal because your extracted video frames may not be the same as ours, and the quality of image has an impact on the final performance. Thus, no need to raise an issue unless the performance gap is large, e.g. larger than 1%.

  2. Since there are so many losses to compute, you may encounter model divergence in the very beginning of the training. You can simply reduce learning rate first to get a good initialization, and then back on track. Or you just rerun training several times.

TODO

  • [ ] Experiment on large-scale action datasets, like Sports-1M and Kinetics

License and Citation

Please cite this paper in your publications if you use this code or precomputed results for your research:

@article{hidden_ar_zhu_2017,
  title={{Hidden Two-Stream Convolutional Networks for Action Recognition}},
  author={Yi Zhu and Zhenzhong Lan and Shawn Newsam and Alexander G. Hauptmann},
  journal={arXiv preprint arXiv:1704.00389},
  year={2017}
}

Related Projects

GuidedNet: Guided Optical Flow Learning

Two_Stream Pytorch: PyTorch implementation of two-stream networks for video action recognition

Acknowledgement

The code base is borrowed from TSN, DispNet and UnsupFlownet. Thanks for open sourcing the code.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].