MVIG-SJTU / AlphaPose

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

Update CPU-only support for building the project. 更新对仅CPU构建的支持 #1214

Open Tianyuan-Wang opened 1 month ago

Tianyuan-Wang commented 1 month ago

Setup.py adds CUDA extensions based on whether there is a GPU or not. If not presented, add CPU extensions only. Also added exception handling for module importing where error may occur.

在setup.py中添加了判断有没有GPU以决定是否添加GPU相关扩展。将nms_cpu的构建工具改为torch.utils.cpp_extensionCppExtension。在使用构建的模块的地方添加了try-except以防止程序因找不到模块而中断。