mmaction2 icon indicating copy to clipboard operation
mmaction2 copied to clipboard

Inference with yolov(>=)5

Open soumyadbanik opened this issue 2 years ago • 1 comments

The doc issue

I have a custom model trained on my own custom AVA format dataset for spatiotemporal activity detection with the config detection/ava/slowfast_kinetics_pretrained_r50_4x16x1_20e_ava_rgb.py. While inferencing, the model is using faster_rcnn_r50_fpn_2x_coco.py to get the person detection probably with faster_rcnn_r50 .

How can I use YOLOv5 instead. What configuration should be changed? Not able to find any related details in the docs.

I'm using this CLI for getting the detections python3 demo/demo_spatiotemporal_det.py --video path/to/src/video --config configs/detection/ava/slowfast_kinetics_pretrained_r50_4x16x1_20e_ava_rgb.py --checkpoint work_dirs/ava/slowfast_kinetics_pretrained_r50_4x16x1_20e_ava_rgb/latest.pth --det-config demo/faster_rcnn_r50_fpn_2x_coco.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.70 --label-map labels.pbtxt --out-filename /output/video/path --predict-stepsize 8 --output-stepsize 4 --output-fps 8

Suggest a potential alternative/fix

No response

soumyadbanik avatar May 31 '23 13:05 soumyadbanik

Hi, @soumyadbanik The demo supports specifying the detection model by assigning --det-config and --det-checkpoint, and please make sure that the arg det-cat-id is assigned as the category id for human detection in your model.
there is a doc for all supported demos, you can refer to it for details

cir7 avatar Jun 01 '23 02:06 cir7