TRN-pytorch icon indicating copy to clipboard operation
TRN-pytorch copied to clipboard

Testing in Webcam?

Open Malathi15 opened this issue 5 years ago • 4 comments

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

Malathi15 avatar Apr 11 '19 04:04 Malathi15

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

dukebrah avatar Apr 30 '19 01:04 dukebrah

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

Malathi15 avatar Apr 30 '19 10:04 Malathi15

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

dukebrah avatar Apr 30 '19 16:04 dukebrah

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

595448755 avatar May 17 '19 11:05 595448755