OValery16/Tutorial-about-3D-convolutional-network

Prediction code

developer888891 opened this issue · 1 comments

Hi, thanks for the repo! I'm working on hand gesture recognition currently(Especially on JESTER dataset), I saw your work on it, but I didn't find any prediction code in it. Can you please share a hand gesture prediction code for webcam?

Thank You!

Hi @developer888891,

For the prediction code, you just need to run the train.py with the arg "eval_only"

example: python train.py --eval_only True --resume True --config configs/config.json -g 0

For the webcam, my advice would be to use opencv and capture the different frames. For example, with this code https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_gui/py_video_display/py_video_display.html

Later you plug the image in the data loader "VideoFolder" (you can modify it a bit to get the frame directly from the webcam, it is not complicated), and after you run the prediction step with "validate(val_loader, model, criterion, train_data.classes_dict)"

If you like you like this project, feel free to leave a star. (it is my only reward ^^)

Olivier