Windows 에서 media pipe 설치하기

2022. 3. 1. 13:09· 개발/mediapipe
목차
  1.  
  2.  
  3.  
  4.  
  5. References

아래의 링크를 보고 따라합니다.

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

 

Installation

Cross-platform, customizable ML solutions for live and streaming media.

google.github.io

1. MYSYS2 설치

먼저 mysys2 를 다운로드하여 설치하고 PATH 에 추가해줍니다.

여기서 지정해준 경로 내부 폴더로 PATH를 추가하게 됩니다.

PATH 추가

 

2. 필요한 패키지 설치

PATH를 저장한 후 새로운 cmd를 켜서 아래와 같이 입력합니다.

pacman -S git patch unzip

Y 를 입력해서 설치를 진행시킵니다.

3. python을 설치하고 PATH에 추가합니다.

https://www.python.org/downloads/

 

Download Python

The official home of the Python Programming Language

www.python.org

설치 시 하단에 체크 중에 Add Python 3.9 to PATH가 편리하게 있어서 체크 후 Install Now로 설치를 진행하였습니다.

4. Visual C++ Build Tool 2019 와 WinSDK를 설치합니다.

Visual C++ Build Tool 2019 -> 저는 visual studio 가 설치되어있어서 생략하였습니다.

https://visualstudio.microsoft.com/ko/visual-cpp-build-tools/

 

Microsoft C++ Build Tools - Visual Studio

Microsoft C++ Build Tools는 Visual Studio 없이 스크립트 가능한 독립 실행형 설치 관리자를 통해 MSVC 도구 집합을 제공합니다. 명령줄에서 Windows를 대상으로 하는 C++ 라이브러리 및 애플리케이션을 빌드

visualstudio.microsoft.com

WinSDK

https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/

 

Windows SDK - Windows app development

What's new The Windows SDK for Windows 11 lets you update your apps for the latest version of the Windows OS. Learn more about the new features in Windows 11. To see the new APIs introduced with Windows 11, see New APIs in Windows 11 build 22000. Rebuilt t

developer.microsoft.com

일단 다 체크 된 상태로 설치해봅니다. 3.3 GB 라니..;;;

5. Bazel 혹은 Bazelisk 를 설치하고 PATH에 Bazel 의 위치를 추가합니다

저는 Bazel 을 설치하겠습니다.

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

 

Installing Bazel on Windows - Bazel main

Installing Bazel on Windows This page describes the requirements and steps to install Bazel on Windows. It also includes troubleshooting and other ways to install Bazel, such as using Chocolatey or Scoop. Installing Bazel This section covers the prerequisi

docs.bazel.build

미리 설치하는

Visual C++ Redistributable for Visual Studio 2015 이건 다른 버전으로 이미 설치가 되어있었기 때문에 저는 생략하였습니다.

https://github.com/bazelbuild/bazel/releases

 

Releases · bazelbuild/bazel

a fast, scalable, multi-language and extensible build system - bazelbuild/bazel

github.com

아래에서 원하는 버전으로 미러서버에서 다운로드 받습니다.

원하는 경로에 .exe 파일을 넣고 이름은 bazel.exe 로 변경 후 해당 경로를 (bazel.exe까지 포함안함 그 전단계까지..) PATH에 추가합니다.

bazel version 을 입력하면 아래와 같이 나오게 됩니다.

 

6. bazel 변수를 설정해줍니다.

set BAZEL_VS=C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
set BAZEL_VC=C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC
set BAZEL_VC_FULL_VERSION=<Your local VC version>
set BAZEL_WINSDK_FULL_VERSION=<Your local WinSDK version>

// 저는 아래와 같은 버전이었습니다!
set BAZEL_VC_FULL_VERSION=19.29.30136
set BAZEL_WINSDK_FULL_VERSION=10.0.19041.0

VC_FULL_VERSION 을 찾기위해선 컴퓨터 마다 다르지만

스택오버플로우를 참고하여 저는 여기서 cl.exe 를 실행시켜 확인할 수 있었습니다.

C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64

WinSDK 버전

Visual studio installer 실행 후 우측에서 확인.

변수 설정

7. media pipe repository 를 clone 하고 받은 폴더의 루트 디렉토리로 경로를 변경합니다.

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

8. opencv 설치

https://opencv.org/releases/

 

Releases - OpenCV

Become a Member Stay up to date on OpenCV and Computer Vision news Join our Newsletter  

opencv.org

저는 도큐먼트대로 3.4.10 으로 설치하였습니다.

https://sourceforge.net/projects/opencvlibrary/files/3.4.10/opencv-3.4.10-vc14_vc15.exe/download

다운로드 받아 실행시키면 압축이 해제되고, 해당 폴더를 c:\opencv 이렇게 되도록 위치시킵니다.

만약 다른 경로에 하고 싶다면 도큐먼트에서 말하는 WORKSPACE 파일 내부의 new local repository의 path 부분을 수정해주시면 됩니다.

9. 테스트

레포지토리 하위 WORKSPACE 파일이랑 같은 레벨에서 진행합니다.

bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="C:/Users/<사용자명>/AppData/Local/Programs/Python/Python39/python.exe" mediapipe/examples/desktop/hello_world

set GLOG_logtostderr=1

bazel-bin\mediapipe\examples\desktop\hello_world\hello_world.exe

 

 

 

 

 

 

 

 

 

 

References

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

 

Installation

Cross-platform, customizable ML solutions for live and streaming media.

google.github.io

 

https://stackoverflow.com/questions/1233312/finding-version-of-microsoft-c-compiler-from-command-line-for-makefiles

 

Finding version of Microsoft C++ compiler from command-line (for makefiles)

I must be missing something really obvious, but for some reason, the command-line version of the Microsoft C++ compiler (cl.exe) does not seem to support reporting just its version when run. We need

stackoverflow.com

 

728x90
반응형

'개발 > mediapipe' 카테고리의 다른 글

python - face mesh  (0) 2022.03.05
mediapipe hello world error on m1  (0) 2022.03.03
Framework Concepts - Graphs  (0) 2022.03.03
Framework Concepts - Calculators  (0) 2022.03.03
mediapipe install on iOS  (2) 2022.03.03
  1.  
  2.  
  3.  
  4.  
  5. References
'개발/mediapipe' 카테고리의 다른 글
  • mediapipe hello world error on m1
  • Framework Concepts - Graphs
  • Framework Concepts - Calculators
  • mediapipe install on iOS
내공얌냠
내공얌냠
내공냠냠
내공얌냠
내공냠냠
내공얌냠
전체
오늘
어제
  • 분류 전체보기 (255) N
    • 개발 (113)
      • mediapipe (16)
      • insightface (5)
      • JongjuAR (3)
    • 자료구조 알고리즘 (79)
      • 코딩테스트 (64)
      • 이론 (15)
    • 공부 (54) N
      • 단행본 (8) N
      • 튜토리얼 (19)
      • 논문 (15)
      • 복기 (5)
    • 참여 (5)

블로그 메뉴

  • 홈
  • 태그
  • 미디어로그
  • 위치로그
  • 방명록

공지사항

인기 글

태그

  • 테디노트 rag 기본편
  • speaker adaptation tts
  • git tutorial
  • 플러터 튜토리얼
  • python telegrambot
  • flutter
  • postgresql 재설치
  • 컴퓨터 비전 기초
  • 구글 미디어파이프
  • ios google places api
  • mediapipe
  • postgresql install in mac
  • 딥러닝 기반 음성인식 기초
  • vscode 스프링 설치
  • 음성인식 튜토리얼
  • google mediapipe
  • 컴퓨터 비전 책 추천
  • mediapipe translate
  • 테디노트의 랭체인을 활용한 rag 비법노트 기본편 후기
  • flutter 행사 후기
  • 음성인식 기초
  • flutter tutorial
  • flutter 행사
  • 컴퓨터 비전
  • 깃 튜토리얼
  • 플러터
  • 머신러닝이란
  • flutter conference
  • 테디노트의 랭체인을 활용한 rag 비법노트 기본편
  • 미디어파이프

최근 댓글

최근 글

hELLO · Designed By 정상우.v4.2.2
내공얌냠
Windows 에서 media pipe 설치하기
상단으로

티스토리툴바

단축키

내 블로그

내 블로그 - 관리자 홈 전환
Q
Q
새 글 쓰기
W
W

블로그 게시글

글 수정 (권한 있는 경우)
E
E
댓글 영역으로 이동
C
C

모든 영역

이 페이지의 URL 복사
S
S
맨 위로 이동
T
T
티스토리 홈 이동
H
H
단축키 안내
Shift + /
⇧ + /

* 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.