问题描述
Performing Human Detection for each frame
[ ] 0/72, elapsed: 0s, ETA:Traceback (most recent call last):
File "/root/miniconda3/envs/pyskl/lib/python3.7/site-packages/mmcv/utils/registry.py", line 52, in build_from_cfg
return obj_cls(**args)
TypeError: __init__() got an unexpected keyword argument 'scale'During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "show_pose.py", line 254, in <module>
main()
File "show_pose.py", line 194, in main
det_results = detection_inference(args, frame_paths)
File "show_pose.py", line 142, in detection_inference
result = inference_detector(model, frame_path)
File "/root/miniconda3/envs/pyskl/lib/python3.7/site-packages/mmdet/apis/inference.py", line 120, in inference_detector
test_pipeline = Compose(cfg.data.test.pipeline)
File "/root/miniconda3/envs/pyskl/lib/python3.7/site-packages/mmdet/datasets/pipelines/compose.py", line 23, in __init__
transform = build_from_cfg(transform, PIPELINES)
File "/root/miniconda3/envs/pyskl/lib/python3.7/site-packages/mmcv/utils/registry.py", line 55, in build_from_cfg
raise type(e)(f'{obj_cls.__name__}: {e}')
TypeError: Resize: __init__() got an unexpected keyword argument 'scale'
原因分析
替换的config配置文件和替换的checkpoint权重和这个mmcv版本不匹配
发现conda list命令之后,并没有找到mmdet库
于是转变思路,调整一下使用mmdetection来训练模型
解决方案
尝试使用mmdet==2.23.0这个版本来训练checkpoint权重
config配置文件的话也需要使用mmdet==2.23.0这个版本
那就重新训练一个mmdet模型试试