bryanyzhu / two-stream-pytorch

PyTorch implementation of two-stream networks for video action recognition
MIT License
568 stars 150 forks source link

Is there a demo to recognition the action? #25

Closed MILOTIDE closed 6 years ago

MILOTIDE commented 6 years ago

Hi, may I know whether there is a demo to detect the human action in a short video?Not giving the accuracy of this net,but the prediction just like jump, run ,fall ,dance.Thanks.

bryanyzhu commented 6 years ago

Hi, you can modify this line a little bit to get what you want.

This line give you the predicted label, which is the class id. Instead of calculating accuracy, you can find the class name in this file, and print it out. You will get the predictions.

MILOTIDE commented 6 years ago

Thanks for your apply. I met another problem. I cannot install the dense flow,it looks like the branch of opencv3.1, but when make it, there are so many errors. There are many functions that support by opencv2 not by opencv3.1. I don't know why, can you help me? Thanks

MILOTIDE commented 6 years ago

Just Like the error: xx/dense_flow/src/dense_warp_flow_gpu.cpp:33:2: error: ‘SurfFeatureDetector’ was not declared in this scope I found that SurfFeatureDetector is used by opencv2, in opencv3 it should be: Ptr detector = SURF::create( ) So why the dense flow is the branch of opencv3.1,but the code is compatible with opencv2?

bryanyzhu commented 6 years ago

Hi, please check this repo, https://github.com/yjxiong/dense_flow/tree/opencv-3.1, to see if you can successfully compile and run their demo. Let me how it goes. Because I follow their repo to write the code, and it seems fine.