본문 바로가기

Deep Learning & Computer Vision

Google MediaPipe 설치 (Windows 10)

 

 

 

https://google.github.io/mediapipe/getting_started/install#installing-on-windows

 

Installation

MediaPipe is the simplest way for researchers and developers to build world-class ML solutions and applications for mobile, edge, cloud and the web.

google.github.io

위 페이지를 참고하여 윈도우10 환경에 mediapipe를 설치할 것임

참고로 파이썬 딥러닝 환경은 구축되어 있는 상태

 

 

 

 

 

 

1.  MSYS2를 설치하고 환경변수를 설정

https://www.msys2.org/

 

MSYS2

MSYS2 installer One click installer for msys2 msys2-x86_64-20200602.exe SHA256: a4fd4e48f506618ee5eb8bbd439c2b37433edff5ada04c72db82ccbdbca35cd7 MSYS2 is a software distro and building platform for Windows At its core, it is an independent rewrite of MSYS,

www.msys2.org

'C:\msys64' 위치에 MSYS2가 설치 후

%PATH% 환경 변수에 'C:\msys64\usr\bin' 추가

 

 

 

2. MSYS2 열고,

$ pacman -S git patch unzip 

 

 

 

3. 파이썬 설치 후 환경변수 설정

python 3.7.6 설치되어 있음

 

 

 

4. visual C++ Build Tools 2019와 WinSDK 설치

되어 있으니 패스

 

 

 

5. Bazel 설치(2.0 혹은 그보다 높은 버전)

https://docs.bazel.build/versions/master/install-windows.html

 

Installing Bazel on Windows

Installing Bazel on Windows Installing Bazel Step 1: Check your system Recommended: 64 bit Windows 10, version 1703 (Creators Update) or newer To check your Windows version: Click the Start button. Type winver in the search box and press Enter. You should

docs.bazel.build

bazel version

 

 

 

6. Bazel 변수 설정

cmd

# Find the exact paths and version numbers from your local version.
C:\> set BAZEL_VS=C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
C:\> set BAZEL_VC=C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC
C:\> set BAZEL_VC_FULL_VERSION=14.25.28610
C:\> set BAZEL_WINSDK_FULL_VERSION=10.1.18362.1

 

 

 

7. mediapipe.git cloning

anaconda prompt를 열고 가상환경 활성화 후

git clone https://github.com/google/mediapipe.git

 

 

 

8. OpenCV 설치

opencv 4.1.2.30 설치되어 있음

 

 

 

9. Hello World example 실행

pycharm console 혹은 anaconda prompt

bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="본인의 파이썬 루트/python.exe" mediapipe/examples/desktop/hello_world
set GLOG_logtostderr=1
bazel-bin\mediapipe\examples\desktop\hello_world\hello_world.exe

아주 잘 출력됨