Error: OpenPose library could not be found. Did you enable
BUILD_PYTHONin CMake and have this Python script in the right folder?
在这里插入代码片
ImportError: cannot import name 'pyopenpose' from 'openpose'
from openpose import pyopenpose as op
未执行成功ls /usr/local/python/openpose
观察是否有文件 pyopenpose.cpython-35m-x86_64-linux-gnu.so*
如果没有 进入build
执行sudo make install
pyopenpose.cpython-35m-x86_64-linux-gnu.so
进行下面操作import sys
sys.path
pyopenpose.cpython-35m-x86_64-linux-gnu.so
所在目录sys.path.append('/usr/local/python/openpose')
python3
关键字指向的是home下的anaconda/usr/local/python
目录下的pyopenpose.cpython-35m-x86_64-linux-gnu.so*
文件,使用的是系统python解释器sudo vim ~/.bashrc
export PATH=/home/ubuntu/anaconda3/bin:$PATH
alias py35=/usr/bin/python3.5
指定py35为系统python3.5的别称source ~/.bashrc
py35 01_body_from_image.py
参考链接
Error:
Prototxt file not found: ../../../models/pose/body_25/pose_deploy.prototxt.
Possible causes:
1. Not downloading the OpenPose trained models.
2. Not running OpenPose from the same directory where the `model` folder is located.
3. Using paths with spaces.
vim 01_body_from_image.py
修改第38行params["model_folder"] = "../../../models/"
为`
params["model_folder"] = "../../models/"
a bytes-like object is required, not 'NoneType'
修改第33行parser.add_argument("--image_path", default="../../../examples/media/COCO_val2014_000000000192.jpg", help="Process an image. Read all standard formats (jpg, png, bmp, etc.).")
为
:parser.add_argument("--image_path", default="../../examples/media/COCO_val2014_000000000192.jpg", help="Process an image. Read all standard formats (jpg, png, bmp, etc.).")
因篇幅问题不能全部显示,请点此查看更多更全内容