- Nvidia device with CUDA, example for Ubuntu 20.04 (if you have no nvidia device, delete this line from setup.py
- Python 3.7+
- Cython
- PyTorch 1.11+, for users who want to use 1.5 < PyTorch < 1.11, please switch to the
pytorch<1.11
branch by:git checkout "pytorch<1.11"
; for users who want to use PyTorch < 1.5, please switch to thepytorch<1.5
branch by:git checkout "pytorch<1.5"
- torchvision 0.12.0+
- numpy
- python-package setuptools >= 40.0, reported by this issue
- Linux, Windows user check here
- 配置conda环境
conda create -n myconda python=3.8
conda activate alphapose
pip3 install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu113
- 安装
# 1. install
export PATH=/usr/local/cuda/bin/:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:$LD_LIBRARY_PATH
pip install cython
sudo apt-get install libyaml-dev
pip install -r requirements.txt
python3 ./AlphaPose/setup.py build develop --user
# 2. Install PyTorch3D (Optional, only for visualization)
conda install -c fvcore -c iopath -c conda-forge fvcore iopath
conda install -c bottler nvidiacub
pip install git+ssh://[email protected]/facebookresearch/pytorch3d.git@stable
- 安装ffmpeg
sudo apt-get install ffmpeg
- 安装facenet依赖
pip install -r requirements.txt
- Download the object detection model manually: yolov3-spp.weights(Google Drive | Baidu pan). Place it into
AlphaPose/detector/yolo/data
. - (Optional) If you want to use YOLOX as the detector, you can download the weights here, and place them into
AlphaPose/detector/yolox/data
. We recommend yolox-l and yolox-x. - Download our pose models. Place them into
AlphaPose/pretrained_models
. All models and details are available in our Model Zoo. - For pose tracking, please refer to our tracking docments for model download
在https://github.com/zpykillcc/facenet 可以找到mtcnn和facenet模型放入recgnize/model_check_point
- flask接受前端请求,调用Alphapose模块和recgnize模块进行姿势识别的人脸识别
- Alphapose使用pytorch
- FaceNet使用tensorflow
flask run -p 6006
端口6006