yjxiong / anet2016-cuhk

Action Recognition Toolbox for CUHK&ETHZ&SIAT submission to ActivityNet 2016
BSD 2-Clause "Simplified" License
252 stars 92 forks source link

Will it work with opencv 2.4.13? #18

Closed JunweiLiang closed 7 years ago

JunweiLiang commented 7 years ago

Hi Professor, I have CUDA8 installed so I changed opencv to 2.4.13 in build_all.sh. It built up without errors. But python examples/classify_video.py data/plastering.avi gets: ----------------Classification Results---------------------- Sumo 0.901697 Playing violin 0.0560898 Chopping wood 0.0172752 Shot put 0.00946948 Volleyball 0.00875752 Playing accordion 0.00338519 Playing lacrosse 0.000827064 Baking cookies 0.000784449 Surfing 0.000487826 Grooming horse 0.00035665

And it output similar things with other videos. Do you think of anything that might cause this?

meetvora commented 7 years ago

I am facing the exact same issue. The model yields the similar output on all videos; the final classes remain the same with some minute fluctuation in scores. Further, the issue is independent of the CUDA or OpenCV version. I've CUDA 7.5 installed and the OpenCV as provided in the submodule.

@yjxiong, I would be grateful for your reply.

Thank you.

yjxiong commented 7 years ago

Thanks for bringing the issue. I will be looking into it.

yjxiong commented 7 years ago

I have identified the problem.

It is related to the new cuDNN code in the bundled Caffe. The networks will produce incorrect results after reshaping the input blobs, which is the case for the RGB frame model based on ResNet. ResNet uses convolutional testing.

A fix has been created in the Caffe repo. It has been merged to the default branch.

https://github.com/yjxiong/caffe/pull/172

Please update the bundled Caffe to the lastest version by

cd lib/caffe-action
git pull origin action_recog

The issue will then be resolved.

Thanks for pointing out the issue!

JunweiLiang commented 7 years ago

Thanks! I followed your update command and then rebuilt the caffe, and got the correct results:

python examples/classify_video.py data/plastering.avi

----------------Classification Results---------------------- Plastering 0.898966 Rock climbing 0.0795791 Hanging wallpaper 0.00924809 Painting fence 0.00826285 Hand washing clothes 0.00112166 Paintball 0.000652745 Hitting a pinata 0.000427511 Laying tile 0.000393567 Throwing darts 0.000368393 Fun sliding down 0.000330714

zswzifir commented 6 years ago

I have got the following results, different from @JunweiLiang , dose it correctly?

python examples/classify_video.py data/plastering.avi

----------------Classification Results---------------------- Plastering 0.72248733 Rock climbing 0.085579015 Hand washing clothes 0.082578614 Hanging wallpaper 0.037271608 Fun sliding down 0.019044047 Painting fence 0.014269345 Hitting a pinata 0.009739993 Painting furniture 0.008977824 Paintball 0.004037094 Laying tile 0.0027983687