open-mmlab / mmaction2

OpenMMLab's Next Generation Video Understanding Toolbox and Benchmark
https://mmaction2.readthedocs.io
Apache License 2.0
4.31k stars 1.25k forks source link

[Feature] Webcam SpatioTemporal Demo Recommendation #2873

Open mbahadirk opened 2 months ago

mbahadirk commented 2 months ago

What is the problem this feature will solve?

When i tried to use webcam_demo_spatiotemporal_det.py it was lagging. It was piling up in my cache and going like 9gb use of ram. It makes impossible to use anything

What is the feature?

but if you would like to use that you should double your output fps of your webcam's fps. it lets your queue to flow and clean the cache by that. you can check my config here:

commandLine = "python demo/webcam_demo_spatiotemporal_det.py \ --input-video 0 \ --config configs/detection/slowonly/slowonly_kinetics400-pretrained-r101_8xb16-8x8x1-20e_ava21-rgb.py \ --checkpoint checkpoints/slowonly_omnisource_pretrained_r101_8x8x1_20e_ava_rgb_20201217-16378594.pth \ --det-config demo/demo_configs/faster-rcnn_r50_fpn_2x_coco_infer.py \ --det-checkpoint http://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_2x_coco/faster_rcnn_r50_fpn_2x_coco_bbox_mAP-0.384_20200504_210434-a5d8aa15.pth \ --det-score-thr 0.9 \ --action-score-thr 0.4 \ --label-map tools/data/ava/label_map.txt \ --predict-stepsize 5 \ --clip-vis-length 5 \ --output-fps 60 \ --display-height 0 \ --display-width 0 \ --show"

What alternatives have you considered?

it still doesn't work well but at least you can fix your memory problem. good luck!