densepose是一个比较先进的3D姿态估计模型,很厉害,具体可以见官网:http://densepose.org/
了解链接:http://tech.ifeng.com/a/20180619/45030393_0.shtml
一,安装caffe2和Detectron:
好的教程如下:https://blog.csdn.net/qq_38522972/article/details/83585580
按照这个链接绝对没问题
二,Install the COCO API:
1,定位到要下载的路径:
git clone https://github.com/cocodataset/cocoapi.git $COCOAPI
cd $COCOAPI/PythonAPI
2,安装
make install
出错如下:
解决方案:
pip install cython
成功。。
3,测试,如果在python中输入 import pycocotools.coco不出错就ok
出错,解决方案:sudo apt-get install python-tk
再次测试:成功:
三:densepose搭建
1,Clone the Densepose repository:
it clone https://github.com/facebookresearch/densepose $DENSEPOSE
2,Install Python dependencies:
pip install -r $DENSEPOSE/requirements.txt
3,Set up Python modules:
cd $DENSEPOSE && make
python2 $DENSEPOSE/detectron/tests/test_spatial_narrow_as_op.py
4,Build the custom operators library:
cd $DENSEPOSE && make ops
5.Check that the custom operator tests pass:
python2 $DENSEPOSE/detectron/tests/test_zero_even_op.py
出现上图说明现在densepose已经完全搭建好了,enjoy............................................................
四,测试应用,这个模型可研究性很大,我先放个我提uv图的demo,更深入的见官网
用人家的模型测试图片:
python2 tools/infer_simple.py \
--cfg configs/DensePose_ResNet101_FPN_s1x-e2e.yaml \
--output-dir DensePoseData/infer_out/ \
--image-ext jpg \
--wts https://s3.amazonaws.com/densepose/DensePose_ResNet101_FPN_s1x-e2e.pkl \
DensePoseData/demo_data/demo_im.jpg