mit-han-lab / temporal-shift-module

[ICCV 2019] TSM: Temporal Shift Module for Efficient Video Understanding
https://arxiv.org/abs/1811.08383
MIT License
2.05k stars 418 forks source link

Online demo green screen #162

Open FireWizard312 opened 3 years ago

FireWizard312 commented 3 years ago

When I run the online demo main.py, the code runs, but it cannot recognize any gesture and the camera screen it shows is completely green. When I tried another code to see if my camera was the issue, it showed it working perfectly fine. Can someone help me?

god-is-a-crab commented 1 year ago

For anyone else having this issue with an rpi cam, good place to start would be here. I was able to fix this by replacing the cap = cv2.VideoCapture(0) line with

cap = cv2.VideoCapture("nvarguscamerasrc ! nvvidconv flip-method=2 ! video/x-raw, format=BGRx ! videoconvert ! video/x-raw, format=BGR ! appsink", cv2.CAP_GSTREAMER)

in online_demo/main.py.