zhoubolei / TRN-pytorch

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

Testing in Webcam? #51

Open Malathi15 opened 5 years ago

Malathi15 commented 5 years ago

@metalbubble Is it possible to test this model in webcam? If it's possible what are the changes I have to do?

dukebrah commented 5 years ago

see https://github.com/metalbubble/TRN-pytorch/pull/56

Malathi15 commented 5 years ago

@dineshp Thank you for your reply.. can you please tell me which file I have to run for testing in webcam?

dukebrah commented 5 years ago

that would be this file right here: https://github.com/metalbubble/TRN-pytorch/pull/56/files#diff-6d38062373d75d1c750cb395fa650a34

595448755 commented 5 years ago

@dineshp thanks to provid the script. I got an error when I run the script. Can you help me?

[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.