Fight_Detection_From_Surveillance_Cameras-PyTorch_Project icon indicating copy to clipboard operation
Fight_Detection_From_Surveillance_Cameras-PyTorch_Project copied to clipboard

infer error

Open dongxiaolong opened this issue 2 years ago • 0 comments

when I run the code python -m infer --modelPath="./Models/model_16_m3_0.8888.pth" --streaming=False --inputPath='/mnt/Data/ProjectCode/fightDetection/Fight_Detection_From_Surveillance_Cameras-PyTorch_Project/dataset/fight/fi001.mp4' --outputPath="./outputVideo.mp4" --sequenceLength=16 --skip=2 I get that error: Traceback (most recent call last): File "/home/dong/.conda/envs/fightDetection/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/dong/.conda/envs/fightDetection/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/mnt/Data/ProjectCode/fightDetection/Fight_Detection_From_Surveillance_Cameras-PyTorch_Project/infer.py", line 35, in <module> main() File "/mnt/Data/ProjectCode/fightDetection/Fight_Detection_From_Surveillance_Cameras-PyTorch_Project/infer.py", line 25, in main start_streaming(model, args.inputPath) File "/mnt/Data/ProjectCode/fightDetection/Fight_Detection_From_Surveillance_Cameras-PyTorch_Project/FDSC/Fight_utils.py", line 461, in start_streaming cv2.imshow("RTSP", frame) cv2.error: OpenCV(4.6.0) /io/opencv/modules/highgui/src/window.cpp:967: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'imshow'

It seems occurred some error, than no frame return. So get that error. Could you help me to solve it.

dongxiaolong avatar Jun 23 '22 09:06 dongxiaolong