MVIG-SJTU / AlphaPose

Real-Time and Accurate Full-Body Multi-Person Pose Estimation&Tracking System
http://mvig.org/research/alphapose.html
Other
8.06k stars 1.98k forks source link

add support for PyTorch 1.11 and CUDA 11.3 #1032

Closed peteruhrig closed 2 years ago

peteruhrig commented 2 years ago

This version works with the Ampere generation of Nvidia cards. Thanks to Thomas Zeiser from HPC Support at Friedrich-Alexander-Universität Erlangen-Nürnberg for the patch! It builds on top of PR 592 (https://github.com/MVIG-SJTU/AlphaPose/pull/592)

How to install

Prerequisites:

We are starting with Nvidia's docker container at docker://nvidia/cuda:11.3.1-devel-ubuntu20.04. You can also just use a regular Ubuntu 20.04 LTS and install CUDA 11.3.1 first.

Step 1: Installing Tools and dependencies in Ubuntu:

apt install -y --no-install-recommends \
build-essential \
cmake \
git \
wget \
nano \
ffmpeg \
software-properties-common \
python3-setuptools \
python3-dev \
python3-pip \
python3-tk \
cython \
libx264-dev \
sudo \
pkg-config \
libyaml-dev

Step 2: Installing Python dependencies:

pip3 install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu113
pip3 install matplotlib scipy cython

Step 3: For some reason, the build script seems to be relying on the python command, so we need to create a symbolic link for it:

cd /usr/bin
ln -s python3 python

Step 4: Clone and build:

git clone https://github.com/MVIG-SJTU/AlphaPose.git
cd AlphaPose
python3 setup.py build develop
Serdnad commented 2 years ago

Thanks for this! After upgrading from a GTX 1660 to an RTX 3060, I was no longer able to run inference, with the process getting stuck at loading the pose model. With these changes, it works flawlessly.

liudan8 commented 2 years ago

detector/nms/src/nms_kernel.cu:5:10: fatal error: THC/THC.h: No such file or directory hello, how can I fix it?