参考链接:
1)github代码链接:https://github.com/google/mediapipe
2)说明文档:https://google.github.io/mediapipe
3)python环境配置文档:https://google.github.io/mediapipe/getting_started/python
4)API简单调用的使用文档:https://google.github.io/mediapipe/solutions/hands#python-solution-api
0.环境准备
python环境配置文档:https://google.github.io/mediapipe/getting_started/python
ubuntu20.04
cuda11.2
python3.8
opencv-python==4.1.2.30
mediapipe==0.8.2
sudo apt install -y protobuf-compiler
sudo apt install -y cmake
1.简介
稍微说明下,文档基本在第一个链接中,python中是通过安装mediapipe的pypi库,调用API来用的。
说明文档:https://google.github.io/mediapipe
import cv2 import mediapipe as mp mp_drawing = mp.solutions.drawing_utils mp_hands = mp.solutions.hands file_list=[] # For static images: hands = mp_hands.Hands( static_image_mode=True, max_num_hands=2, min_detection_confidence=0.5) for idx, file