Deep Learning
1.Install Anaconda
2.conda create -n pose python=3.6.8
3.conda activate pose
4.install pytorch
conda install pytorch==1.0.1 torchvision==0.2.2 cudatoolkit=10.0 -c pytorch
5.install caffe2 requiements
pip install future ^ hypothesis ^ numpy ^ protobuf ^ six
6.install some packages
Chong Ming Wei要先裝cython
pip install cython
install cocoapi
cd (WinDensePose-master)/cocoapi/PythonAPI/
python setup.py build
python setup.py install
install densepose
cd (WinDensePose-master)/densepose/
python setup.py build
python setup.py install
set path enviroment
set PYTHONPATH=(WinDensePose-master)\densepose;%PYTHONPATH%
OR
編輯環境變數>>環境變數>>新增系統變數
Download UV data(Necessary)
We need to download manually the archive below because under Windows we can not eexecute .sh scripts. Follow the link and unzip and copy all files in densepose\DensePoseData\UV_data.
Another option is to install cygwin and then run the scripts which are in the folder densepose\DensePoseData. Scripts are: get_DensePose_COCO.sh, get_densepose_uv.sh, get_eval_data.sh
Test with(weight檔要額外下載下來,直接打下面指令會報錯)
python tools/infer_simple.py –cfg configs/DensePose_ResNet101_FPN_s1x-e2e.yaml –output-dir DensePoseData/infer_out/ –image-ext jpg –wts https://dl.fbaipublicfiles.com/densepose/DensePose_ResNet101_FPN_s1x-e2e.pkl DensePoseData/demo_data/demo_im.jpg
Reference: