Yolov5 pose遇到的问题及解决方法
AttributeError: ‘IDetect’ object has no attribute ‘nkpt’
问题出在权值文件与模型不匹配或者权值文件路径错误。需要去README.md内下载正确的权值文件(注意区分Yolov5s6_pose_640和Yolov5s6_person_640)或者保证超参内正确的权值文件路径。(参考https://github.com/WongKinYiu/yolov7/issues/740)
IndexError: index is out of bounds for dimension with size 0
解决方法1:直接在Terminal运行python detect.py --kpt-label
解决方法2:pycharm右上角如图1所示
在Edit Configurations设置界面下的Parameters这一栏添加–kpt-label,如图2所示。
之后就可以正常运行了。