MMDetection-inference by demo

Published by onesixx on

mm/demo/image_demo.py

Image

python demo/image_demo.py \\
    ${IMAGE_FILE} \\
    ${CONFIG_FILE} \\
    ${CHECKPOINT_FILE} \\
    [--device ${GPU_ID}] \\
    [--score-thr ${SCORE_THR}]
python demo/image_demo.py \\
    demo/demo.jpg \\
    configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py \\
    checkpoints/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth \\
    --device cuda:6
    --score-thr 0.4

https://mmdetection.readthedocs.io/en/latest/1_exist_data_model.html#high-level-apis-for-inference

video

python demo/video_demo.py \\
    ${VIDEO_FILE} \\
    ${CONFIG_FILE} \\
    ${CHECKPOINT_FILE} \\
    [--device ${GPU_ID}] \\
    [--score-thr ${SCORE_THR}] \\
    [--out ${OUT_FILE}] \\
    [--show] \\
    [--wait-time ${WAIT_TIME}]
!python demo/video_demo.py \\
    demo/demo.mp4 \\
    configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py \\
    checkpoints/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth \\
    --device cuda:6 
    --score-thr 0.6
    --out ../dataout/demo_result.mp4

Categories: vision

onesixx

Blog Owner

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x