Open Z-Xiong opened 3 years ago
Parameter setting:
def parse_args():
parser = argparse.ArgumentParser(
description='MMAction2 webcam spatio-temporal detection demo')
parser.add_argument(
'--config',
default=('../configs/detection/ava/'
'slowonly_omnisource_pretrained_r101_8x8x1_20e_ava_rgb.py'),
help='spatio temporal detection config file path')
parser.add_argument(
'--checkpoint',
default=('https://download.openmmlab.com/mmaction/detection/ava/'
'slowonly_omnisource_pretrained_r101_8x8x1_20e_ava_rgb/'
'slowonly_omnisource_pretrained_r101_8x8x1_20e_ava_rgb'
'_20201217-16378594.pth'),
help='spatio temporal detection checkpoint file/url')
parser.add_argument(
'--action-score-thr',
type=float,
default=0.4,
help='the threshold of human action score')
parser.add_argument(
'--det-config',
default='../demo/faster_rcnn_r50_fpn_2x_coco.py',
help='human detection config file path (from mmdet)')
parser.add_argument(
'--det-checkpoint',
default=('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'),
help='human detection checkpoint file/url')
parser.add_argument(
'--det-score-thr',
type=float,
default=0.9,
help='the threshold of human detection score')
parser.add_argument(
'--input-video',
default='0',
type=str,
help='webcam id or input video file/url')
parser.add_argument(
'--label-map', default='../demo/label_map_ava.txt', help='label map file')
parser.add_argument(
'--device', type=str, default='cuda:0', help='CPU/CUDA device option')
parser.add_argument(
'--output-fps',
default=15,
type=int,
help='the fps of demo video output')
parser.add_argument(
'--out-filename',
default=None,
type=str,
help='the filename of output video')
parser.add_argument(
'--show',
# action='store_true',
default=True,
help='Whether to show results with cv2.imshow')
parser.add_argument(
'--display-height',
type=int,
default=0,
help='Image height for human detector and draw frames.')
parser.add_argument(
'--display-width',
type=int,
default=0,
help='Image width for human detector and draw frames.')
parser.add_argument(
'--predict-stepsize',
default=8,
type=int,
help='give out a prediction per n frames')
parser.add_argument(
'--clip-vis-length',
default=8,
type=int,
help='Number of draw frames per clip.')
parser.add_argument(
'--cfg-options',
nargs='+',
action=DictAction,
default={},
help='override some settings in the used config, the key-value pair '
'in xxx=yyy format will be merged into config file. For example, '
"'--cfg-options model.backbone.depth=18 model.backbone.with_cp=True'")
args = parser.parse_args()
return args
Hi, Do you solve this problem?
solve it. adjust param.
solve it. adjust param.
Hello, how is this parameter adjusted? Do you change the parameters according to this? keyframe = task.frames[len(task.frames) // 4] Try changing the number 4, make it bigger?
solve it. adjust param.
Hello, how is this parameter adjusted? Do you change the parameters according to this? keyframe = task.frames[len(task.frames) // 4] Try changing the number 4, make it bigger?
I can't rememeber it. May adjust "--predict-stepsize --output-fps". No imshow.
solve it. adjust param.
Hello, how is this parameter adjusted? Do you change the parameters according to this? keyframe = task.frames[len(task.frames) // 4] Try changing the number 4, make it bigger?
I can't rememeber it. May adjust "--predict-stepsize --output-fps". No imshow.
OK, thank you. Is your camera used in conjunction with the GUI interface? Is there video behavior detection during camera detection?
When I run "demo/webcam_demo_spatiotemporal_det.py" with USB cam or RTSP web cam , the program is stuck after running for a period of time.
I think this is caused by the inference speed or the display speed being slower than the reading speed.
Some log information is as follows:(Sometimes directly show killed)
I have adjust the keyframes:
However, it will still get stuck.
What parameters should I adjust so that the log information output will not get stuck.