zhoubolei / TRN-pytorch

Temporal Relation Networks
http://relation.csail.mit.edu/
Other
787 stars 190 forks source link

added script for gesture webcam demo #56

Closed dukebrah closed 4 years ago

dukebrah commented 5 years ago

added script for real-time gesture recognition webcam demo (https://www.youtube.com/watch?v=6PAvFzV4Yfo)

595448755 commented 5 years ago

[root@01:/ai/trn-pytorch# python fps_dem_trn.py [INFO] sampling THREADED frames from webcam... VIDEOIO ERROR: V4L: can't open camera by index 0 Multi-Scale Temporal Relation Network Module in use ['8-frame relation', '7-frame relation', '6-frame relation', '5-frame relation', '4-frame relation', '3-frame relation', '2-frame relation'] Freezing BatchNorm2D except the first one. Traceback (most recent call last): File "fps_dem_trn.py", line 140, in crop_img = frame[0:720, 0:720] TypeError: 'NoneType' object is not subscriptable terminate called without an active exception Aborted (core dumped)

I got an error while running this command: " python fps_dem_trn.py ". Ask how to solve it ,please. Many thanks.

595448755 commented 5 years ago

@dineshp Can you help me. What can I do next? Thanks.

dukebrah commented 5 years ago

https://answers.opencv.org/question/199105/videoio-error-v4l-cant-open-camera-by-index-0/

dukebrah commented 5 years ago

https://github.com/skvark/opencv-python/issues/124

595448755 commented 5 years ago

@dineshp Thanks very much. I got an error when I run the command "sudo modprobe bcm2835-v4l2". root@01:/ai/trn-pytorch# root@ai-k4-u18-c92n742-01:/ai/trn-pytorch# sudo modprobe bcm2835-v4l2 -bash: root@01:/ai/trn-pytorch#: No such file or directory cm2835-v4l2 not found in directory /lib/modules/4.15.0-49-genericroot@ai-k4-u18-c92n742-01:/ai/trn-pytorch# modprobe: FATAL: Module bcm2835-v4l2 not found in directory /lib/modules/4.15.0-49-generic

I have no "raspberry pi", I use the laptop remote(SSH) call Ubuntu18.04 server, how to use the laptop camera connection to webcam.

dukebrah commented 5 years ago

@dineshp Thanks very much. I got an error when I run the command "sudo modprobe bcm2835-v4l2". root@01:/ai/trn-pytorch# root@ai-k4-u18-c92n742-01:/ai/trn-pytorch# sudo modprobe bcm2835-v4l2 -bash: root@01:/ai/trn-pytorch#: No such file or directory cm2835-v4l2 not found in directory /lib/modules/4.15.0-49-genericroot@ai-k4-u18-c92n742-01:/ai/trn-pytorch# modprobe: FATAL: Module bcm2835-v4l2 not found in directory /lib/modules/4.15.0-49-generic

I have no "raspberry pi", I use the laptop remote(SSH) call Ubuntu18.04 server, how to use the laptop camera connection to webcam.

If you don't have a webcam you can interact with you are out of luck

595448755 commented 5 years ago

@dineshp
Thanks for sharing!

ddb4ng commented 4 years ago

[root@01:/ai/trn-pytorch# python fps_dem_trn.py [INFO] sampling THREADED frames from webcam... VIDEOIO ERROR: V4L: can't open camera by index 0 Multi-Scale Temporal Relation Network Module in use ['8-frame relation', '7-frame relation', '6-frame relation', '5-frame relation', '4-frame relation', '3-frame relation', '2-frame relation'] Freezing BatchNorm2D except the first one. Traceback (most recent call last): File "fps_dem_trn.py", line 140, in crop_img = frame[0:720, 0:720] TypeError: 'NoneType' object is not subscriptable terminate called without an active exception Aborted (core dumped)

I got an error while running this command: " python fps_dem_trn.py ". Ask how to solve it ,please. Many thanks.

Did you manage to solve this issue? We would like to know how

zhoubolei commented 4 years ago

Thanks @dineshp !