DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别

 

 

results show

transfer pose show

 

 

 

 

 

 

 

 

 

 

 

 

DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第1张图片

 

 

 

 

 

 DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第2张图片

 

DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第3张图片

 

 

 DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第4张图片

 

 

 

 DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第5张图片

 

 DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第6张图片

 

 

ubuntu 16.04

cuda 9.0

cudnn 7

pytorch 1.0

 

  • installation log

 

 

Caffe2

DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第7张图片

DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第8张图片

 DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第9张图片

conda create -n name --clone name

DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第10张图片

 

https://caffe2.ai/docs/getting-started.html?platform=ubuntu&configuration=compile#install-with-gpu-support

 

 

DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第11张图片

 

Archiving  libnccl_static.a                    > /home/frist/pytorch/build/nccl/lib/libnccl_static.a
/home/frist/pytorch/third_party/nccl/nccl/src
[ 66%] No install step for 'nccl_external'
[ 66%] Completed 'nccl_external'
[ 66%] Built target nccl_external
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
  File "setup.py", line 719, in 
    build_deps()
  File "setup.py", line 285, in build_deps
    build_dir='build')
  File "/home/frist/pytorch/tools/build_pytorch_libs.py", line 281, in build_caffe2
    check_call(['make', '-j', str(max_jobs), 'install'], cwd=build_dir, env=my_env)
  File "/home/frist/anaconda2/envs/desepose1/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-j', '12', 'install']' returned non-zero exit status 2
(desepose1) frist@frist-Alienware-Aurora-R7:~/pytorch$ ^C
(desepose1) frist@frist-Alienware-Aurora-R7:~/pytorch$ 




sudo apt-get install liblapack-dev 

 

DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第12张图片

第一步:确定你机器是否有 libmklml_intel.so, 用以下命令:

find / -name libmklml_intel.so

第二步:如果没有 libmklml_intel.so, 请安装mklml;

第三步:假设 libmklml_intel.so在路径“/home/work/mklml/lib”下,设置环境变量:

export LD_LIBRARY_PATH=/home/work/mklml/lib:$LD_LIBRARY_PATH

最后,执行之前的命令,验证是否还有原来的错误。

/home/frist/pytorch/third_party/ideep/mkl-dnn/external/mklml_lnx_2019.0.3.20190220/lib/libmklml_intel.so

 

1.使用如下命令debug一下
conda install --debug mkl
2.anaconda里 搜索”mkl”,把相关的文件都删除

3.使用如下命令重新装一下mkl
conda install mkl

 

sudo apt-get install libblas-dev checkinstall
sudo apt-get install libblas-doc checkinstall

sudo apt-get install liblapack-dev checkinstall
sudo apt-get install liblapack-doc checkinstall

DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第13张图片

 

 DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第14张图片

 

 

conda install pytorch torchvision cudatoolkit=9.0 -c pytorch

 DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第15张图片

DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第16张图片

 

 DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第17张图片

 

 

cd ~ && python -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"


python2 -c 'from caffe2.python import workspace; print(workspace.NumCudaDevices())'

DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第18张图片

 

Install the COCO API:

# COCOAPI=/path/to/clone/cocoapi
git clone https://github.com/cocodataset/cocoapi.git $COCOAPI
cd $COCOAPI/PythonAPI
# Install into global site-packages
make install
# Alternatively, if you do not have permissions or prefer
# not to install the COCO API into global site-packages
python2 setup.py install --user

Note that instructions like # COCOAPI=/path/to/install/cocoapi indicate that you should pick a path where you'd like to have the software cloned and then set an environment variable (COCOAPI in this case) accordingly.


 


 

cd ~/cocoapi/PythonAPI


 

import pycocotools.coco

Traceback (most recent call last):

File "", line 1, in

File "pycocotools/coco.py", line 55, in

from . import mask as maskUtils

File "pycocotools/mask.py", line 3, in

import pycocotools._mask as _mask


 

(desepose1) frist@frist-Alienware-Aurora-R7:~/cocoapi/PythonAPI$ sudo apt-get install python-tk

DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第19张图片

(desepose1) frist@frist-Alienware-Aurora-R7:~/densepose$ pip install -r requirements.txt

 

 DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第20张图片

(desepose1) frist@frist-Alienware-Aurora-R7:~/densepose/detectron/tests$ python2 test_spatial_narrow_as_op.py

 DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第21张图片

 

 DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第22张图片

 

 found Detectron ops lib: /home/frist/anaconda2/envs/desepose1/lib/python2.7/site-packages/torch/lib/libcaffe2_detectron_ops_gpu.so

 

DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第23张图片

 

download detectron  and make  
copy detectron and info.egg to densepose
ok



/home/frist/anaconda2/pkgs/pytorch-1.0.1-py2.7_cuda9.0.176_cudnn7.4.2_2/lib/python2.7/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake
/home/frist/anaconda2/pkgs/pytorch-nightly-1.0.0.dev20190405-py3.7_cuda10.0.130_cudnn7.4.2_0/lib/python3.7/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake
/home/frist/anaconda2/envs/densepose/lib/python3.7/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake
/home/frist/anaconda2/envs/desepose1/lib/python2.7/site-packages/torch/share/cmake/Caffe2/Caffe2Config.cmake
/home/frist/.local/share/Trash/files/pytorch/build/Caffe2Config.cmake

 

 DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第24张图片

 

 

(desepose1) frist@frist-Alienware-Aurora-R7:~/densepose$ export Caffe2_DIR=$Caffe2_DIR:/home/frist/anaconda2/pkgs/pytorch-1.0.1-py2.7_cuda9.0.176_cudnn7.4.2_2/lib/python2.7/site-packages/torch/share/cmake/Caffe2 



export include=$include:/home/frist/anaconda2/pkgs/pytorch-1.0.1-py2.7_cuda9.0.176_cudnn7.4.2_2/lib/python2.7/site-packages/torch/lib/include

export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/home/frist/anaconda2/pkgs/pytorch-1.0.1-py2.7_cuda9.0.176_cudnn7.4.2_2/lib/python2.7/site-packages/torch/lib/include



export PATH=$PATH:/home/frist/anaconda2/pkgs/pytorch-1.0.1-py2.7_cuda9.0.176_cudnn7.4.2_2/lib/python2.7/site-packages/torch/lib/include/caffe2/core

export PATH=$PATH:/home/frist/anaconda2/pkgs/pytorch-1.0.1-py2.7_cuda9.0.176_cudnn7.4.2_2/lib/python2.7/site-packages/torch/lib/include


/home/frist/anaconda2/pkgs/pytorch-1.0.1-py2.7_cuda9.0.176_cudnn7.4.2_2/lib/python2.7/site-packages/torch/lib/include/caffe2/core/allocator.h

 

DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第25张图片

 

 

/usr/include/google/protobuf/io/coded_stream.h



/home/frist/anaconda2/pkgs/libprotobuf-3.6.1-hd408876_0/include/google/protobuf/io/coded_stream.h

/home/frist/anaconda2/pkgs/libprotobuf-3.5.2-h6f1eeef_0/include/google/protobuf/io/coded_stream.h

/home/frist/anaconda2/pkgs/libprotobuf-3.0.0-0/include/google/protobuf/io/coded_stream.h

/home/frist/anaconda2/envs/desepose1/include/google/protobuf/io/coded_stream.h


export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/home/frist/anaconda2/pkgs/libprotobuf-3.5.2-h6f1eeef_0/include

 

must  3.5 version others not ok

DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第26张图片

 

(desepose1) frist@frist-Alienware-Aurora-R7:~/densepose$ protoc --version
libprotoc 2.6.1

(desepose1) frist@frist-Alienware-Aurora-R7:~/densepose$ which protoc 
/usr/bin/protoc

DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第27张图片

 

如果安装2.6.1版本

    # 移除所有相关protobuf的版本
    sudo apt-get remove libprotobuf-dev protobuf-compiler
    sudo apt-get remove libprotobuf-lite8 libprotoc8
    sudo apt-get remove python-protobuf
    sudo pip uninstall protobuf
    # anaconda
    conda uninstall protobuf
    conda uninstall libprotobuf
     
    # 重新安装
    sudo apt-get install libprotobuf-dev protobuf-compiler
    #if anaconda,不要重复
    conda install -c anaconda protobuf=2.6.1

 

must install version 3.5 it is ok  and then set export env variables

DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第28张图片

 

/home/frist/anaconda2/pkgs/libprotobuf-3.6.1-hd408876_0/include/google/protobuf/stubs/common.h

export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/home/frist/anaconda2/pkgs/libprotobuf-3.6.1-hd408876_0/include

DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第29张图片

export PATH=$PATH:/home/frist//anaconda2/envs/desepose1/lib/python2.7/site-packages/torch/share/cmake/Caffe2


 


 


 


 

/home/frist/anaconda2/pkgs/libprotobuf-3.6.1-hd408876_0/include/google/protobuf/io/coded_stream.h

/home/frist/anaconda2/pkgs/libprotobuf-3.5.2-h6f1eeef_0/include/google/protobuf/io/coded_stream.h

/home/frist/anaconda2/pkgs/libprotobuf-3.0.0-0/include/google/protobuf/io/coded_stream.h

/home/frist/anaconda2/envs/desepose1/include/google/protobuf/io/coded_stream.h


export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/home/frist/anaconda2/pkgs/libprotobuf-3.5.2-h6f1eeef_0/include

 

DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第30张图片

 

 

https://blog.csdn.net/FatMigo/article/details/88246815


 

/home/frist/intel/compilers_and_libraries_2019.3.199/linux/mkl/include/mkl_cblas.h


 

export CPATH=//home/frist/intel/compilers_and_libraries_2019.3.199/linux/mkl/include:$CPATH



/home/frist/anaconda2/pkgs/pytorch-1.0.1-py2.7_cuda9.0.176_cudnn7.4.2_2/lib/python2.7/site-packages/torch/lib/include/caffe2/core/workspace.h:19:48: fatal error: caffe2/utils/threadpool/ThreadPool.h: No such file or directory

 DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第31张图片

 

copy pytorch caffe2 utils threadpool folder to the related directories

DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第32张图片

 DensePose Pytorch实现 FaceBook 三维立体 3D 人体姿态估计 人体姿态迁移 姿态识别 动作识别_第33张图片

success
python2 infer_simple_image.py \
    --cfg configs/DensePose_ResNet101_FPN_s1x-e2e.yaml \
    --output-dir DensePoseData/infer_out/ \
    --image-ext jpg \
    --wts DensePoseData/DensePose_ResNet101_FPN_s1x-e2e.pkl \
    DensePoseData/demo_data/1.jpeg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

你可能感兴趣的:(pose,net)