open-mmlab / mmpose-webcam-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mmpose-webcam-demo

简体中文 | English

基于 MMPose Webcam API 开发应用或 demo 的项目模板

配置环境

创建虚拟环境

conda create -n mmpose-demo python=3.9 pytorch=1.10 cudatoolkit=11.3 torchvision -c pytorch -y
conda activate mmpose-demo

安装 MMCV 和 MMDetection

pip install openmim
mim install mmcv-full
pip install mmdet

安装 MMPose

为了能随时同步最新的 MMPose 代码,我们推荐将 MMPose 克隆到本地,并通过开发模式安装

cd ..
git clone clone https://github.com/open-mmlab/mmpose.git
cd mmpose
pip install -e .

测试 MMPose 安装成功

python -c "from mmpose.apis import webcam"

配置 pre-commit hook

# 在 mmpose-webcam-demo 目录中执行以下操作
pip install pre-commit
pre-commit install

运行示例

# use GPU
python run.py --config configs/pose_estimation/pose_estimation.py

# use CPU
python run.py --config configs/pose_estimation/pose_estimation.py --cpu

# use debug mode
python run.py --config configs/pose_estimation/pose_estimation.py --debug

相关链接

About

License:Apache License 2.0


Languages

Language:Python 100.0%