* 참고 블로그
https://jin-t.tistory.com/4#comment5854351 |
+ TENSORFLOW는 처음부터 1.14로 깔아라!!
conda install -c conda-forge tensorflow-gpu=1.14
+ 영상에서 나오는 깃허브는 만료됨 여기서 받기
https://github.com/gsethi2409/tf-pose-estimation
gsethi2409/tf-pose-estimation
Hey! This is a clone of the tf-pose-estimation by Ildoo Kim modified to work with Tensorflow 2.0+! - gsethi2409/tf-pose-estimation
github.com
https://jlog1016.tistory.com/52 |
https://prabhjotkaurgosal.com/human-pose-estimation-using-openpose/ |
위에 두 블로그에서 설치했는데 오류 떠서 3번째 블로그 보고 다시 차근차근했음
Human pose estimation using OpenPose
IntroductionMotivationBackgroundInstallationTestingTroubleshootingReferencesAdditional Functionality Introduction This is a guide to install OpenPose and run a quick demo. However, before we get st…
prabhjotkaurgosal.com
* 오류 정리
ImportError: cannot import name '_pafprocess' |
1. C:\Users\유저이름\Desktop\tf-pose-estimation\tf_pose\pafprocess으로 이동
2. swig -python -c++ pafprocess.i && python setup.py build_ext --inplace
(안되면 swig -python -c++ pafprocess.i && python3 setup.py build_ext --inplace)
그럼 또 ModuleNotFoundError: No module named 'tf_slim' 뜨는데, 그냥 설치해주면 된다
1. pip3 install tf_slim
ModuleNotFoundError: No module named 'tensorflow.contrib'ModuleNotFoundError: No module named 'tensorflow.contrib.tensorrt'
ImportError: cannot import name 'trt_convert' |
이 오류들 때문에 밤샜다..
해본 방법은 2가지이다.
(1번 실패 2번 성공)
1. opencv 재설치
(1) python 버전확인
파이썬 3.6 환경이다.
(2) https://www.lfd.uci.edu/~gohlke/pythonlibs/ 여기서 다시 다운로드
64 환경이라 위에꺼 받았다
(3) 다운로드 받은 폴더로 가서 (C:\Users\유저 이름\Downloads)
pip install opencv_python-4.4.0-cp36-cp36m-win_amd64.whl
근데 이래도 해결 안됐다..
2. estimator.py, run.py 수정
[estimator.py]
2줄 지우기 (주석)
- import tensorflow.contrib.tensorrt as trt
- from tensorflow.python.compiler.tensorrt import trt
1줄 추가하기
- tf.compat.v1.disable_eager_execution()
[run.py]
1줄 지우기
- from tensorflow.python.compiler.tensorrt import trt
이러면 해결 됨
*결과
- python run.py --model=mobilenet_thin --resize=432x368 --image=./images/p1.jpg
+ 사진은 첨부안하지만 웹캠도 됐음!
- python run_webcam.py --model=mobilenet_thin --resize=432x368 --camera=0
-> 창 닫아도 안꺼지는데 콘다 창에서 CTRL + C 누르면 나가진다
'머신러닝' 카테고리의 다른 글
[Pandas] apply lambda 식으로 데이터 가공 (0) | 2021.06.01 |
---|---|
[Pandas] 정렬, Aggregation, GroupBy, 결손 데이터 (0) | 2021.05.26 |
[Pandas] Index 객체와 데이터 셀렉션 및 필터링 (0) | 2021.05.19 |
[Pandas] DataFrame 객체 (0) | 2021.05.19 |
[numpy] ndarray, 행렬 정렬 (0) | 2021.05.05 |