openpose+smplx

boss不知道从哪淘换来的pose_iter_440000.caffemodel和basicModel_f_lbs_10_207_0_v1.0.0.pkl让我搞2d图像3d蒙皮,人都麻了,最后还是从头过了一下openpose和smplx。这里记录一下

openpose

这个是用来得到骨架坐标的,可以理解为(x,y,置信度)
不过boss那猴年马月的版本已经不适配数据格式了,现在与下游衔接的版本格式如下

{
	"version":1.3,
	"people":[{
		"person_id":[-1],
		"pose_keypoints_2d":
		"face_keypoints_2d":
		"hand_left_keypoints_2d":
		"hand_right_keypoints_2d":
省略了一些暂时没用的东西

Ubuntu

cd openpose/
git submodule update --init --recursive --remote
mkdir build/
cd build/
cmake-gui ..

我卡在了cmake报错

-- Could NOT find GFlags (missing: GFLAGS_INCLUDE_DIR GFLAGS_LIBRARY) 
-- Could NOT find Glog (missing: GLOG_INCLUDE_DIR GLOG_LIBRARY) 
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find Protobuf (missing: Protobuf_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.10/Modules/FindProtobuf.cmake:543 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:429 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/pengpeng/wyh/openpose/build/CMakeFiles/CMakeOutput.log".
See also "/home/pengpeng/wyh/openpose/build/CMakeFiles/CMakeError.log".

看到一些教程1教程2元旦就懒得继续了,不过Win10上有用简易版

Win10

直接走bat就可以,不过有可能下载不了模型,那就直接在这个博文下载,然后移到对应文件夹就好

bin\OpenPoseDemo.exe --video examples\media\video.avi --face --hand --write_json output_json_folder/

输入当然可以换成图片,不如说1650小破机子连face和hand都不能做,更别提视频了
好像图片名必须得是数字?否则英文都不好使,很迷
注意这里没有做face和hand的话,后面smplx也要相应去掉,否则张量维度出问题。
关于骨架和原图的可视化可以直接保存,通过--write_images output_images/ --write_images_format jpg,视频是--write_video output/result.avi。只保存前面提到的坐标json是不太好自己可视化的,毕竟还要用到一些中间变量坐标对齐什么的,不过xxw23大佬推荐我用这个方法,之后可以看一下
另外一张图里有多人的坐标的话好像smplx也会乱,就像游戏里建模扯面筋了一样,还得多试试


关于上面说的输出和输入,其实可以参看官方文档(藏挺严实啊),可以输入图片文件夹或者视频,然后输出图片或者视频,如果报错其实有可能是路径太长导致获取不到文件

smplx

说真的我一开始被smpl搞得晕头转向,真的没有好好把这个讲清楚怎么做的😭都是那个破basicModel什么pkl的直接或者改一下python3就用,感觉就是个固定的骨架坐标啊,pose等参数就是固定/随机值,很迷

好在看到xxw23大佬的博文明白点该怎么用到任意图像上了

大体上看大佬的教程就好,我再补充点我的想法

  • 输入暂时没有看到哪里能修改文件名,现在只能让输入固定改叫01_img,之后再看看
  • 前面说的取消face和hand就是在yaml里面改成False
  • 关于1-改成~,其实smplx里有个类似名的tgm_conversion.py有个样板,是用的torch.logical_not
  • smplify-x的requirements里有个human-body-prior是git来的,命令行翻不了墙就直接下压缩包pip install -e什么的常规操作了。human-body-prior的requirements里面还有俩git来的configermesh,前者也还好,后者就有点麻烦了,下面详说

Win10

Installing collected packages: pyzmq, psbody-mesh
  Running setup.py develop for psbody-mesh
    error: subprocess-exited-with-error

    × python setup.py develop did not run successfully.
    │ exit code: 1
    ╰─> [30 lines of output]
        [VERSION] read version is 0.4
        running develop
        E:\Anaconda3\envs\gait\lib\site-packages\setuptools\command\easy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
          warnings.warn(
        E:\Anaconda3\envs\gait\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
          warnings.warn(
        running egg_info
        creating psbody_mesh.egg-info
        writing psbody_mesh.egg-info\PKG-INFO
        writing dependency_links to psbody_mesh.egg-info\dependency_links.txt
        writing namespace_packages to psbody_mesh.egg-info\namespace_packages.txt
        writing requirements to psbody_mesh.egg-info\requires.txt
        writing top-level names to psbody_mesh.egg-info\top_level.txt
        writing manifest file 'psbody_mesh.egg-info\SOURCES.txt'
        reading manifest file 'psbody_mesh.egg-info\SOURCES.txt'
        reading manifest template 'MANIFEST.in'
        adding license file 'LICENSE.txt'
        writing manifest file 'psbody_mesh.egg-info\SOURCES.txt'
        running build_ext
        [CGAL] deflating cgal from "mesh\thirdparty\CGAL-4.7.tar.gz" to "D:\Doctor\smplify-x\src\human-body-prior\mesh\build\temp.win-amd64-3.9"
        building 'psbody.mesh.aabb_normals' extension
        creating build\temp.win-amd64-3.9\Release
        creating build\temp.win-amd64-3.9\Release\mesh
        creating build\temp.win-amd64-3.9\Release\mesh\src
        C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DNDEBUG=1 -DCGAL_NDEBUG=1 -DMESH_CGAL_AVOID_COMPILED_VERSION=1 -DCGAL_HAS_NO_THREADS=1 -DCGAL_NO_AUTOLINK_CGAL=1 -Imesh/src -IE:\Anaconda3\envs\gait\lib\site-packages\numpy\core\include -ID:\Doctor\smplify-x\src\human-body-prior\mesh\build\temp.win-amd64-3.9\Release\CGAL-4.7\include -IE:\Anaconda3\envs\gait\include -IE:\Anaconda3\envs\gait\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt -IC:\Program Files (x86)\Windows Kits\8.1\include\shared -IC:\Program Files (x86)\Windows Kits\8.1\include\um -IC:\Program Files (x86)\Windows Kits\8.1\include\winrt /EHsc /Tpmesh/src/aabb_normals.cpp /Fobuild\temp.win-amd64-3.9\Release\mesh/src/aabb_normals.obj -O3
        cl : Command line warning D9002 : ignoring unknown option '-O3'
        aabb_normals.cpp
        e:\anaconda3\envs\gait\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
        d:\doctor\smplify-x\src\human-body-prior\mesh\mesh\src\AABB_n_tree.h(9): fatal error C1083: Cannot open include file: 'CGAL/AABB_tree.h': No such file or directory
        error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit code 2
        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [30 lines of output]
    [VERSION] read version is 0.4
    running develop
    E:\Anaconda3\envs\gait\lib\site-packages\setuptools\command\easy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    E:\Anaconda3\envs\gait\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    running egg_info
    creating psbody_mesh.egg-info
    writing psbody_mesh.egg-info\PKG-INFO
    writing dependency_links to psbody_mesh.egg-info\dependency_links.txt
    writing namespace_packages to psbody_mesh.egg-info\namespace_packages.txt
    writing requirements to psbody_mesh.egg-info\requires.txt
    writing top-level names to psbody_mesh.egg-info\top_level.txt
    writing manifest file 'psbody_mesh.egg-info\SOURCES.txt'
    reading manifest file 'psbody_mesh.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    adding license file 'LICENSE.txt'
    writing manifest file 'psbody_mesh.egg-info\SOURCES.txt'
    running build_ext
    [CGAL] deflating cgal from "mesh\thirdparty\CGAL-4.7.tar.gz" to "D:\Doctor\smplify-x\src\human-body-prior\mesh\build\temp.win-amd64-3.9"
    building 'psbody.mesh.aabb_normals' extension
    creating build\temp.win-amd64-3.9\Release
    creating build\temp.win-amd64-3.9\Release\mesh
    creating build\temp.win-amd64-3.9\Release\mesh\src
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DNDEBUG=1 -DCGAL_NDEBUG=1 -DMESH_CGAL_AVOID_COMPILED_VERSION=1 -DCGAL_HAS_NO_THREADS=1 -DCGAL_NO_AUTOLINK_CGAL=1 -Imesh/src -IE:\Anaconda3\envs\gait\lib\site-packages\numpy\core\include -ID:\Doctor\smplify-x\src\human-body-prior\mesh\build\temp.win-amd64-3.9\Release\CGAL-4.7\include -IE:\Anaconda3\envs\gait\include -IE:\Anaconda3\envs\gait\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt -IC:\Program Files (x86)\Windows Kits\8.1\include\shared -IC:\Program Files (x86)\Windows Kits\8.1\include\um -IC:\Program Files (x86)\Windows Kits\8.1\include\winrt /EHsc /Tpmesh/src/aabb_normals.cpp /Fobuild\temp.win-amd64-3.9\Release\mesh/src/aabb_normals.obj -O3
    cl : Command line warning D9002 : ignoring unknown option '-O3'
    aabb_normals.cpp
    e:\anaconda3\envs\gait\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
    d:\doctor\smplify-x\src\human-body-prior\mesh\mesh\src\AABB_n_tree.h(9): fatal error C1083: Cannot open include file: 'CGAL/AABB_tree.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit code 2
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

GPT4让我去安装CGAL和Boost,没有成功
另外也找到一些其他教程1教程2,暂时也没有成功

Ubuntu

Installing collected packages: psbody-mesh
  Running setup.py develop for psbody-mesh
    error: subprocess-exited-with-error
    
    × python setup.py develop did not run successfully.
    │ exit code: 1
    ╰─> [81 lines of output]
        [VERSION] read version is 0.4
        /home/pengpeng/.conda/envs/wyh/lib/python3.9/site-packages/setuptools/__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
        !!
        
                ********************************************************************************
                Requirements should be satisfied by a PEP 517 installer.
                If you are using pip, you can try `pip install --use-pep517`.
                ********************************************************************************
        
        !!
          dist.fetch_build_eggs(dist.setup_requires)
        /home/pengpeng/.conda/envs/wyh/lib/python3.9/site-packages/setuptools/dist.py:945: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated.
        !!
        
                ********************************************************************************
                Please replace its usage with implicit namespaces (PEP 420).
        
                See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages for details.
                ********************************************************************************
        
        !!
          ep.load()(self, ep.name, value)
        running develop
        /home/pengpeng/.conda/envs/wyh/lib/python3.9/site-packages/setuptools/command/develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated.
        !!
        
                ********************************************************************************
                Please avoid running ``setup.py`` and ``easy_install``.
                Instead, use pypa/build, pypa/installer or other
                standards-based tools.
        
                See https://github.com/pypa/setuptools/issues/917 for details.
                ********************************************************************************
        
        !!
          easy_install.initialize_options(self)
        /media/pengpeng/新加卷/pose_smpl/smplify-x/src/human-body-prior/mesh/setup.py:145: SetuptoolsDeprecationWarning: setup.py install is deprecated.
        !!
        
                ********************************************************************************
                Please avoid running ``setup.py`` directly.
                Instead, use pypa/build, pypa/installer or other
                standards-based tools.
        
                See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
                ********************************************************************************
        
        !!
          return _install.initialize_options(self)
        running egg_info
        writing psbody_mesh.egg-info/PKG-INFO
        writing dependency_links to psbody_mesh.egg-info/dependency_links.txt
        writing namespace_packages to psbody_mesh.egg-info/namespace_packages.txt
        writing requirements to psbody_mesh.egg-info/requires.txt
        writing top-level names to psbody_mesh.egg-info/top_level.txt
        reading manifest file 'psbody_mesh.egg-info/SOURCES.txt'
        reading manifest template 'MANIFEST.in'
        adding license file 'LICENSE.txt'
        writing manifest file 'psbody_mesh.egg-info/SOURCES.txt'
        running build_ext
        [CGAL] deflating cgal from "mesh/thirdparty/CGAL-4.7.tar.gz" to "/media/pengpeng/新加卷/pose_smpl/smplify-x/src/human-body-prior/mesh/build/temp.linux-x86_64-cpython-39"
        building 'psbody.mesh.aabb_normals' extension
        gcc -pthread -B /home/pengpeng/.conda/envs/wyh/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/pengpeng/.conda/envs/wyh/include -I/home/pengpeng/.conda/envs/wyh/include -fPIC -O2 -isystem /home/pengpeng/.conda/envs/wyh/include -fPIC -DNDEBUG=1 -DCGAL_NDEBUG=1 -DMESH_CGAL_AVOID_COMPILED_VERSION=1 -DCGAL_HAS_NO_THREADS=1 -DCGAL_NO_AUTOLINK_CGAL=1 -Imesh/src -I/home/pengpeng/.conda/envs/wyh/lib/python3.9/site-packages/numpy/core/include -I/media/pengpeng/新加卷/pose_smpl/smplify-x/src/human-body-prior/mesh/build/temp.linux-x86_64-cpython-39/CGAL-4.7/include -I/home/pengpeng/.conda/envs/wyh/include/python3.9 -c mesh/src/aabb_normals.cpp -o build/temp.linux-x86_64-cpython-39/mesh/src/aabb_normals.o -O3 -fopenmp
        In file included from /home/pengpeng/.conda/envs/wyh/lib/python3.9/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929:0,
                         from /home/pengpeng/.conda/envs/wyh/lib/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                         from /home/pengpeng/.conda/envs/wyh/lib/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h:5,
                         from mesh/src/aabb_normals.cpp:4:
        /home/pengpeng/.conda/envs/wyh/lib/python3.9/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
         #warning "Using deprecated NumPy API, disable it with " \
          ^~~~~~~
        In file included from /media/pengpeng/新加卷/pose_smpl/smplify-x/src/human-body-prior/mesh/build/temp.linux-x86_64-cpython-39/CGAL-4.7/include/CGAL/Profile_counter.h:53:0,
                         from /media/pengpeng/新加卷/pose_smpl/smplify-x/src/human-body-prior/mesh/build/temp.linux-x86_64-cpython-39/CGAL-4.7/include/CGAL/internal/AABB_tree/AABB_node.h:24,
                         from /media/pengpeng/新加卷/pose_smpl/smplify-x/src/human-body-prior/mesh/build/temp.linux-x86_64-cpython-39/CGAL-4.7/include/CGAL/internal/AABB_tree/AABB_traversal_traits.h:24,
                         from /media/pengpeng/新加卷/pose_smpl/smplify-x/src/human-body-prior/mesh/build/temp.linux-x86_64-cpython-39/CGAL-4.7/include/CGAL/AABB_tree.h:26,
                         from mesh/src/AABB_n_tree.h:9,
                         from mesh/src/aabb_normals.cpp:10:
        /media/pengpeng/新加卷/pose_smpl/smplify-x/src/human-body-prior/mesh/build/temp.linux-x86_64-cpython-39/CGAL-4.7/include/CGAL/config.h:85:10: fatal error: boost/config.hpp: 没有那个文件或目录
         #include <boost/config.hpp>
                  ^~~~~~~~~~~~~~~~~~
        compilation terminated.
        error: command '/usr/bin/gcc' failed with exit code 1
        [end of output]
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [81 lines of output]
    [VERSION] read version is 0.4
    /home/pengpeng/.conda/envs/wyh/lib/python3.9/site-packages/setuptools/__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
    !!
    
            ********************************************************************************
            Requirements should be satisfied by a PEP 517 installer.
            If you are using pip, you can try `pip install --use-pep517`.
            ********************************************************************************
    
    !!
      dist.fetch_build_eggs(dist.setup_requires)
    /home/pengpeng/.conda/envs/wyh/lib/python3.9/site-packages/setuptools/dist.py:945: SetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated.
    !!
    
            ********************************************************************************
            Please replace its usage with implicit namespaces (PEP 420).
    
            See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages for details.
            ********************************************************************************
    
    !!
      ep.load()(self, ep.name, value)
    running develop
    /home/pengpeng/.conda/envs/wyh/lib/python3.9/site-packages/setuptools/command/develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated.
    !!
    
            ********************************************************************************
            Please avoid running ``setup.py`` and ``easy_install``.
            Instead, use pypa/build, pypa/installer or other
            standards-based tools.
    
            See https://github.com/pypa/setuptools/issues/917 for details.
            ********************************************************************************
    
    !!
      easy_install.initialize_options(self)
    /media/pengpeng/新加卷/pose_smpl/smplify-x/src/human-body-prior/mesh/setup.py:145: SetuptoolsDeprecationWarning: setup.py install is deprecated.
    !!
    
            ********************************************************************************
            Please avoid running ``setup.py`` directly.
            Instead, use pypa/build, pypa/installer or other
            standards-based tools.
    
            See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
            ********************************************************************************
    
    !!
      return _install.initialize_options(self)
    running egg_info
    writing psbody_mesh.egg-info/PKG-INFO
    writing dependency_links to psbody_mesh.egg-info/dependency_links.txt
    writing namespace_packages to psbody_mesh.egg-info/namespace_packages.txt
    writing requirements to psbody_mesh.egg-info/requires.txt
    writing top-level names to psbody_mesh.egg-info/top_level.txt
    reading manifest file 'psbody_mesh.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    adding license file 'LICENSE.txt'
    writing manifest file 'psbody_mesh.egg-info/SOURCES.txt'
    running build_ext
    [CGAL] deflating cgal from "mesh/thirdparty/CGAL-4.7.tar.gz" to "/media/pengpeng/新加卷/pose_smpl/smplify-x/src/human-body-prior/mesh/build/temp.linux-x86_64-cpython-39"
    building 'psbody.mesh.aabb_normals' extension
    gcc -pthread -B /home/pengpeng/.conda/envs/wyh/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/pengpeng/.conda/envs/wyh/include -I/home/pengpeng/.conda/envs/wyh/include -fPIC -O2 -isystem /home/pengpeng/.conda/envs/wyh/include -fPIC -DNDEBUG=1 -DCGAL_NDEBUG=1 -DMESH_CGAL_AVOID_COMPILED_VERSION=1 -DCGAL_HAS_NO_THREADS=1 -DCGAL_NO_AUTOLINK_CGAL=1 -Imesh/src -I/home/pengpeng/.conda/envs/wyh/lib/python3.9/site-packages/numpy/core/include -I/media/pengpeng/新加卷/pose_smpl/smplify-x/src/human-body-prior/mesh/build/temp.linux-x86_64-cpython-39/CGAL-4.7/include -I/home/pengpeng/.conda/envs/wyh/include/python3.9 -c mesh/src/aabb_normals.cpp -o build/temp.linux-x86_64-cpython-39/mesh/src/aabb_normals.o -O3 -fopenmp
    In file included from /home/pengpeng/.conda/envs/wyh/lib/python3.9/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929:0,
                     from /home/pengpeng/.conda/envs/wyh/lib/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                     from /home/pengpeng/.conda/envs/wyh/lib/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h:5,
                     from mesh/src/aabb_normals.cpp:4:
    /home/pengpeng/.conda/envs/wyh/lib/python3.9/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     #warning "Using deprecated NumPy API, disable it with " \
      ^~~~~~~
    In file included from /media/pengpeng/新加卷/pose_smpl/smplify-x/src/human-body-prior/mesh/build/temp.linux-x86_64-cpython-39/CGAL-4.7/include/CGAL/Profile_counter.h:53:0,
                     from /media/pengpeng/新加卷/pose_smpl/smplify-x/src/human-body-prior/mesh/build/temp.linux-x86_64-cpython-39/CGAL-4.7/include/CGAL/internal/AABB_tree/AABB_node.h:24,
                     from /media/pengpeng/新加卷/pose_smpl/smplify-x/src/human-body-prior/mesh/build/temp.linux-x86_64-cpython-39/CGAL-4.7/include/CGAL/internal/AABB_tree/AABB_traversal_traits.h:24,
                     from /media/pengpeng/新加卷/pose_smpl/smplify-x/src/human-body-prior/mesh/build/temp.linux-x86_64-cpython-39/CGAL-4.7/include/CGAL/AABB_tree.h:26,
                     from mesh/src/AABB_n_tree.h:9,
                     from mesh/src/aabb_normals.cpp:10:
    /media/pengpeng/新加卷/pose_smpl/smplify-x/src/human-body-prior/mesh/build/temp.linux-x86_64-cpython-39/CGAL-4.7/include/CGAL/config.h:85:10: fatal error: boost/config.hpp: 没有那个文件或目录
     #include <boost/config.hpp>
              ^~~~~~~~~~~~~~~~~~
    compilation terminated.
    error: command '/usr/bin/gcc' failed with exit code 1
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

其实本质上也是psbody-mesh这个子包有问题,也是要Boost库,不过Ubuntu上确实方便多了

sudo apt-get update
sudo apt-get install libboost-all-dev

最后可以得到这样的pkl,而不是某些其他smpl库得到的obj,所以可视化还得用到人家的代码,而不是直接3d查看器完事

{'camera_rotation': array([[[1., 0., 0.],
        [0., 1., 0.],
        [0., 0., 1.]]], dtype=float32), 'camera_translation': array([[ 0.07093499,  0.5376859 , 10.50814   ]], dtype=float32), 'betas': array([[ 0.15671302, -0.56283265, -1.4208894 ,  0.46733293,  0.33072573,
         0.99756336, -0.22000568, -0.09456196, -0.43617406, -0.06318266]],
      dtype=float32), 'global_orient': array([[ 2.9855592e+00, -1.6365360e-01, -3.3559036e-04]], dtype=float32), 'left_hand_pose': array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]], dtype=float32), 'right_hand_pose': array([[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]], dtype=float32), 'jaw_pose': array([[1.0679027 , 2.1088629 , 0.39061677]], dtype=float32), 'leye_pose': array([[ 0.51915103, -0.24069265, -0.08876719]], dtype=float32), 'reye_pose': array([[0.78681904, 0.86230123, 0.12824216]], dtype=float32), 'expression': array([[ 1.1810302 , -0.05678427,  0.2845336 , -0.05222232,  0.12355927,
        -0.10784631, -0.21096773,  0.5458505 ,  0.2065703 , -0.47784936]],
      dtype=float32), 'body_pose': array([[ 2.04257056e-01,  1.51344657e-01,  1.42422688e+00,
         1.08767486e+00, -3.09433672e-04,  1.45797837e+00,
         1.88049710e+00, -2.05580902e+00,  5.18116891e-01,
         1.11650184e-01, -1.45333067e-01,  2.35135406e-01,
         2.23634362e+00,  6.75012887e-01,  9.54699218e-01,
        -5.35427749e-01, -7.73193419e-01, -1.50922537e+00,
        -8.18808973e-01, -4.18194771e-01,  1.36420560e+00,
         4.92308319e-01, -1.43806696e+00,  1.18422496e+00,
         1.16979577e-01, -3.98899764e-01, -1.37306201e+00,
        -2.79278308e-01, -3.18977952e-01, -7.39190429e-02,
         3.43973815e-01, -3.71044040e-01]], dtype=float32)}

所以这种东西直接蒙皮到原图上还是有些难度,接下来先看看东南大学的一个方法

  • 17
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值