mediapipe install on iOS

2022. 3. 3. 15:16· 개발/mediapipe
목차
  1. 1. xcode 설치
  2. 2. bazel 설치 
  3. 3. python version 을 3.7을 default로 만들고 six 라이브러리를 다운로드 받는다고 하는데,
  4. 4. git clone mediapipe
  5. 5. set bundle ID prefix
  6. 6.  xcode 프로젝트 생성
  7. References

mediapipe 를 윈도우에서 설치하였으나 iOS 개발하고 싶은 프로젝트가 있어 iOS 설치도 진행합니다.

윈도우에 설치한 이유가 단순히 아는 분을 도와드리려고 했었던 건데, 

경험해볼만한 이유가 있었어서 이게 웬 횡재야 하면서 조금 소름이 돋았습니다 역시 구글인가;

여튼 공식 홈페이지를 참고하여 설치합니다.

 

1. xcode 설치

xcode는 이미 설치되어있어서 건너뜁니다.

명령어는 아래와 같습니다.

xcode-select --install

2. bazel 설치 

brew install bazel

설치완료

3. python version 을 3.7을 default로 만들고 six 라이브러리를 다운로드 받는다고 하는데,

저는 3.9를 쓰고 있어서 그냥 일단 진행해보겠습니다.

six 라이브러리를 설치하는 명령어는 그대로 따라칩니다.

이거 여기서 된다고 하는데 뒤에 tulsi 에서 앱 생성 시에 오류가 납니다. 3.7로 하라는 이유가 있습니다!!

뒤에 따라가시다 보면 해결법을 적어놓았습니다 ㅎ

(이미 있다네요 ㅎ 그러면 넘어갑니다~) 바보입니다 아래에 해결해야해서 고치고 넘어갑니다 ㅎㅎ

4. git clone mediapipe

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

원하는 폴더위치에 넣기 위해 잠시 경로를 옮겼습니다.

클론 받아줍니다.

5. set bundle ID prefix

5-1. custom provisioning 을 하고싶은 분.

cmd 에서 아래 명령어를 쳐서 Provisioning Profiles 폴더로 들어갑니다.

open ~/Library/MobileDevice/"Provisioning Profiles"

만약 다운로드 된 파일이 없을 경우 애플 개발자 센터에서 로그인 후 생성합니다.

https://developer.apple.com/account/resources/certificates/list

 

로그인 - Apple

 

idmsa.apple.com

 

mediapipe/mediapipe 폴더 안에 provisioning_profile.mobileprovision 이라는 파일명으로 복사하거나

심볼릭 링크로 연결해둡니다. 저는 복사했습니다.

심볼릭링크 연결은 아래와 같이 합니다.

cd mediapipe
ln -s ~/Downloads/MyProvisioningProfile.mobileprovision mediapipe/provisioning_profile.mobileprovision

근데 커스텀일 경우 이렇게 하는 거랍니다.

5-2.  저는 그냥 커스텀 프로비저닝 안하고 그냥 생성하는 방향으로 하겠습니다.

터미널에 아래와 같이 타이핑합니다. 소스 까서 보면 생성해주는 걸 알 수 있습니다. 겁내지 말고 진행합니다.

python3 mediapipe/examples/ios/link_local_profiles.py

bundle id 가 생성되고, .bzl 파일 안에 경로도 바뀐 것을 파일을 열어 확인해볼 수 있습니다.

6.  xcode 프로젝트 생성

tulsi 라는 앱을 아래와 같은 방식으로 설치하여서 bazel 빌드 설정들을 자동으로 설정하여 생성할 수 있다고 합니다.

일단 다 따라해 보겠습니다.

mediapipe 폴더에서 나온 후, 클론합니다.

아래 명령어로 진행합니다.

# cd out of the mediapipe directory, then:
git clone https://github.com/bazelbuild/tulsi.git
cd tulsi
# remove Xcode version from Tulsi's .bazelrc (see http://github.com/bazelbuild/tulsi#building-and-installing):
sed -i .orig '/xcode_version/d' .bazelrc
# build and run Tulsi:
sh build_and_run.sh

아.. xcode 13 버전이어야 한다네요.. 다시 업데이트하고 오겠습니다.

100기가 정도 여유를 만드니까 다운로드 되네요 아마도 45기가에서 안되었던 것 보면 50기가 정도 여유가 있어야 하는가 봅니다..

13.2.1. 버전으로 업데이트 했는데도 쉘명령어가 실행이 안되서 커맨드 껐다 새로 키고, 

bazel shutdown 을 해보겠습니다.

빌드는 성공적으로 됐지만 실행이 안되네요;;

참 쉽지가 않네요 ㅠ 더 찾아보겠습니다.

문제에 대한 유사한? 답

https://github.com/beeware/briefcase/issues/572#issuecomment-786275993

 

Cannot run with mediapipe lib · Issue #572 · beeware/briefcase

just create a helloworld project,then add mediapipe lib,import mediapipe in app.py,it can build but cannot run app. the following is test code """ My first application ""&q...

github.com

을 쫓아가다가 pip install mediapipe 를 해야된다고 해서 설치하려는데 설치가 안되네요?

m1 특유의 문제라고 도달하여 아래 참고하여 pip3 install mediapipe 로 설치하였습니다.

python version을 3.7로 바꿔줬습니다..

https://hyeophyeop.tistory.com/132

 

python mediapipe 설치 오류 해결 방법(media pipe install ERROR: Could not find a version that satisfies the requirement m

오류정보 media pipe install ERROR: Could not find a version that satisfies the requirement mediapipe (from versions: none) media pipe install ERROR: Could not find a version that sat..

hyeophyeop.tistory.com

 

다시 tulsi 폴더 경로에 들어가서

sh build_and_run.sh

하니까 잉 됐습니다잉!

open existing project > mediapipe/Mediapipe.tulsiproj 선택 

그러면 하단에 failed가 나오고

우측에 bazel 버튼을 클릭하여 bazel exe 파일을 선택해주면 되는데

여기서 두 가지가 있다 그냥 bazel, bazel-version 이 있는데 bazel-version 이걸로 선택해야 된다.

나는 5.0.0 버전이어서 exe파일 이름이 bazel-5.0.0 이었다.

뭔가 돌아가고는 있다~

config 탭으로 넘어가서 generate 버튼을 누른다

어디에 저장할지 지정하면 된다.

 

완료됐고 자동으로 xcode 가 켜집니다.

완성!

 

 

 

References

https://google.github.io/mediapipe/getting_started/ios.html

 

MediaPipe on iOS

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

google.github.io

https://hyeophyeop.tistory.com/132

 

python mediapipe 설치 오류 해결 방법(media pipe install ERROR: Could not find a version that satisfies the requirement m

오류정보 media pipe install ERROR: Could not find a version that satisfies the requirement mediapipe (from versions: none) media pipe install ERROR: Could not find a version that sat..

hyeophyeop.tistory.com

https://github.com/beeware/briefcase/issues/572#issuecomment-786275993

 

Cannot run with mediapipe lib · Issue #572 · beeware/briefcase

just create a helloworld project,then add mediapipe lib,import mediapipe in app.py,it can build but cannot run app. the following is test code """ My first application ""&q...

github.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
Windows 에서 media pipe 설치하기  (0) 2022.03.01
  1. 1. xcode 설치
  2. 2. bazel 설치 
  3. 3. python version 을 3.7을 default로 만들고 six 라이브러리를 다운로드 받는다고 하는데,
  4. 4. git clone mediapipe
  5. 5. set bundle ID prefix
  6. 6.  xcode 프로젝트 생성
  7. References
'개발/mediapipe' 카테고리의 다른 글
  • mediapipe hello world error on m1
  • Framework Concepts - Graphs
  • Framework Concepts - Calculators
  • Windows 에서 media pipe 설치하기
내공얌냠
내공얌냠
내공냠냠
내공얌냠
내공냠냠
내공얌냠
전체
오늘
어제
  • 분류 전체보기 (255)
    • 개발 (113)
      • mediapipe (16)
      • insightface (5)
      • JongjuAR (3)
    • 자료구조 알고리즘 (79)
      • 코딩테스트 (64)
      • 이론 (15)
    • 공부 (54)
      • 단행본 (8)
      • 튜토리얼 (19)
      • 논문 (15)
      • 복기 (5)
    • 참여 (5)

블로그 메뉴

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

공지사항

인기 글

태그

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

최근 댓글

최근 글

hELLO · Designed By 정상우.v4.2.2
내공얌냠
mediapipe install on iOS
상단으로

티스토리툴바

단축키

내 블로그

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

블로그 게시글

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

모든 영역

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

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