Intern/KIST

MeTRAbs Absolute 3D Human Pose Estimator 설치

땽뚕 2021. 9. 8. 22:45
728x90

 

1. https://github.com/isarandi/metrabs 에서 코드 다운받기

2. install_dependencies.sh DATASETS.md 따라서 설치

[install_dependencies.sh 설치 방법]

다운받은 metrabs 파일에서 터미널 열기

$set -euo pipefail

$sudo apt install build-essential --yes wget curl gfortran git ncurses-dev unzip tar

#miniconda 설치

$wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

$bash ./Miniconda3-latest-Linux-x86_64.sh -b

$eval "$("$HOME/miniconda3/bin/conda" shell.bash hook)"

miniconda설치

이어서

$conda create --yes --name metrabs python=3.8 Cython matplotlib pillow imageio ffmpeg scikit-image scikit-learn tqdm numba cachetools Pillow

$conda activate metrabs

$conda install --yes opencv -c conda-forge

$pip install tensorflow tf_slim tensorflow-addons attrdict jpeg4py imageio-ffmpeg transforms3d more_itertools spacepy

$git clone https://github.com/isarandi/cocoapi

$cd cocoapi/PythonAPI

$make

$python setup.py install

$cd ../..

$rm -rf cocoapi

$wget https://spdf.sci.gsfc.nasa.gov/pub/software/cdf/dist/cdf37_1/linux/cdf37_1-dist-cdf.tar.gz

$tar xf cdf37_1-dist-cdf.tar.gz

$rm cdf37_1-dist-cdf.tar.gz

$cd cdf37_1-dist

$make OS=linux ENV=gnu CURSES=yes FORTRAN=no UCOPTIONS=-O2 SHARED=yes -j4 all

$export LD_LIBRARY_PATH=$PWD/src/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

$wget https://sourceforge.net/projects/libjpeg-turbo/files/2.0.5/libjpeg-turbo-2.0.5.tar.gz

install_dependencies.sh 설치

 

 

https://vip00112.tistory.com/23 

 

[DATASETS.md 설치 방법]

다운받은 metrabs 파일에서 터미널 열기

$ export DATA_ROOT=/some/path1

$ export CUDA_ROOT=/some/path2/cuda-10.0

$ export CUDNN_ROOT=/some/path3/cudnn-7.6

$ git clone https://github.com/isarandi/metrabs.git

$ bash metrabs/dataset_preparation/all.sh

마지막 bash 명령에서 오류나면 디렉토리 알맞게 찾아가서 터미널 열고 입력하거나 디렉토리 바꿔서 명령하면 해결됨

$ export DATA_ROOT=/path/to/enough/space

$ cd somepath/metrabs/dataset_preparation

DATASETS.md 설치

3. model 파일 다운로드 압축 풀기

$wget https://omnomnom.vision.rwth-aachen.de/data/metrabs/metrabs_{singleperson_smpl,multiperson_smpl,multiperson_smpl_combined}.zip -P ./models

unzip models/*.zip -d ./models

 

→ github에서 설치해야하는 완료

 

[pycharm tensorflow 연결하기]

1. tensorflow 설치하기(2.5버전)

$pip3 install tensorflow-gpu

2. anaconda 설치

3. pycharm tensorflow 연결

pycharm에서 new project interpreter anaconda 버전으로 바꾸기

 

 

 

 

 

3-1. demo.py 실행 python interpreter anaconda 버전으로 바꿔도 가능 (우측 상단 configure python interpreter 누르고 interpreter setting에서 변경 가능하다.)

3-2. tensorflow 없다는 에러가 뜨면 settings-python interpreter에서 + 버튼 누르고 tensorflow 2.5.0 패키지 설치를 있다.

→ demo.py 실행하면

728x90