Pose Estimation(feat. Openpose)

dobby
7 min readJun 12, 2021

cp-vton 돌리기 위해서 masking 작업, Segmentation 작업이 끝났다.

이제 마지막 pose estimation을 통해 파일을 얻자.

Cp-vton 에서는 openpose를 사용했다고함.

→ caffe framework 씀
→ 불긴한예감이듬
→ 새로운 sota (신규:설치쉬운) 찾기?

→ 일단은 openpose 돌리자~
→ opencv에서 caffeframework 해주는거같기도한데.? ( link:https://m.blog.naver.com/rhrkdfus/221531159811)

— 안돼 Prerequisites — ubuntu 20, cuDNN 8.0.4, CUda 11

내 환경: ubuntu18, cuDNN 8.0.4, CUda 11, RTX3090

sota 찍은거찾자 2020년 이후에나온거.

Transpose 사용해보자. 우선 output이 어떻게 나오는지 보자;

Transpose 말고 딴거찾자,

그냥 openpose ubuntu20인거 무시하고 해보자. 나 ubuntu 18 인데 cudnn 8.0.4 , cuda 11 로 해도되네? git에는 ubuntu 20만된다고햇는데.. ㅋㅋ

compile할때 warning 겁나많이뜨긴하…..무섭네

아머야 docker로도 돌릴수잇네 → cuda 10, cuda8 밖에.. 그러면 RTX3090을 못잡음..

Test Demo Run:./build/examples/openpose/openpose.bin — video examples/media/video.avi 이거 하면

Error: F0610 06:26:41.852391 28291 syncedmem.hpp:22] Check failed: error == cudaSuccess (2 vs. 0) out of memory

이런건 그냥 gpu 지정해주면되더라 (누가 돌리고잇어서그런거임)

Run: ./build/examples/openpose/openpose.bin — video examples/media/video.avi — num_gpu_start 1

result

아 짜증나게 됐다안됏다그러네 GPU 메모리문제로뜨는데..

CUDA_VISIBLE_DEVICES=1,2,3 ./build/examples/openpose/openpose.bin — image_dir tmp_input — write_json tmp_keypoint/

뭔가 — face , — hand 빼니깐 되네;

json 형태 파일로 비교해보자

cat 019590_0_keypoints.json
{“version”: 1.0, “people”: [{“face_keypoints”: [], “pose_keypoints”: [98.7716535433071, 36.0727272727273, 0.900299713015556, 94.740157480315, 78.8945454545455, 0.719002336263657, 54.9291338582677, 77.9636363636364, 0.65305108577013, 43.8425196850394, 146.385454545455, 0.665697321295738, 30.488188976378, 197.818181818182, 0.827481016516685, 133.795275590551, 80.9890909090909, 0.639681480824947, 134.551181102362, 119.621818181818, 0.167225090088323, 0, 0, 0, 64, 171.287272727273, 0.2754459194839, 0, 0, 0, 0, 0, 0, 112.125984251969, 174.545454545455, 0.267485176678747, 0, 0, 0, 0, 0, 0, 91.2125984251969, 26.9963636363636, 0.9388437718153, 108.094488188976, 28.8581818181818, 0.930973559617996, 80.6299212598425, 29.3236363636364, 0.909433931112289, 118.425196850394, 33.28, 0.911161601543427], “hand_right_keypoints”: [], “hand_left_keypoints”: []}]}

나온결과.cat tmp_keypoint/019590_0_keypoints.json

{“version”:1.3,”people”:[{“person_id”:[-1],”pose_keypoints_2d”:[98.4018,35.6999,0.861802,93.4763,80.8154,0.799366,54.7289,77.9991,0.641476,43.493,141.38,0.75689,30.7864,195.616,0.776379,132.919,82.2176,0.666589,133.643,148.433,0.700312,139.296,211.121,0.761718,87.8389,178.018,0.404435,64.596,178.006,0.433333,0,0,0,0,0,0,111.811,180.13,0.34702,0,0,0,0,0,0,90.6639,25.8666,0.866005,108.952,27.9776,0.836017,80.8055,27.2843,0.828818,119.536,31.5193,0.853107,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],”face_keypoints_2d”:[],”hand_left_keypoints_2d”:[],”hand_right_keypoints_2d”:[],”pose_keypoints_3d”:[],”face_keypoints_3d”:[],”hand_left_keypoints_3d”:[],”hand_right_keypoints_3d”:[]}]}

조금씩 다르긴함. 같은 데이터가지고 추출한건데. cp-vton에서 제공하는 keypoint랑 내가 직접돌린거랑은 차이가 존재함

→ 아니 , sematic segmentation된 사진에다가 돌려야하는건가? 비교해보자

--

--