DirtyHarryLYL / HAKE-Action-Torch

HAKE-Action in PyTorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting error about nms cpp extension

wjhmike95 opened this issue · comments

Thanks for your great job! When i run demo i get error like this:
Traceback (most recent call last):
File "tools/demo.py", line 204, in
a2v = Activity2Vec(args.mode, cfg, logger)
File "tools/demo.py", line 33, in init
self.alphapose = AlphaPose(cfg.DEMO.DETECTOR, cfg.DEMO.YOLO_CFG, cfg.DEMO.YOLO_WEIGHT, cfg.DEMO.POSE_CFG, cfg.DEMO.POSE_WEIGHT, cfg.DEMO.TRACKER_WEIGHT, logger)
File "/home/wjh/Desktop/video/HAKE-Action-Torch/tools/inference_tools/pose_inference.py", line 230, in init
self.det_loader = DetectionLoader(get_detector(self.args.detector, self.args), self.cfg, self.args)
File "/home/wjh/Desktop/video/HAKE-Action-Torch/tools/inference_tools/detector/apis.py", line 12, in get_detector
from .yolo_api import YOLODetector
File "/home/wjh/Desktop/video/HAKE-Action-Torch/tools/inference_tools/detector/yolo_api.py", line 27, in
from .nms import nms_wrapper
File "/home/wjh/Desktop/video/HAKE-Action-Torch/tools/inference_tools/detector/nms/init.py", line 1, in
from .nms_wrapper import nms, soft_nms
File "/home/wjh/Desktop/video/HAKE-Action-Torch/tools/inference_tools/detector/nms/nms_wrapper.py", line 6, in
from . import nms_cpu, nms_cuda
ImportError: libtorch_cpu.so: cannot open shared object file: No such file or directory

This error seems related to nms cpp extension. I can not fix it.

Thanks for playing with Activity2Vec! To solve this problem, we need the detailed information about your environment. Could you please provide the output of the following command?

python -c 'from torch.utils.collect_env import main; main()'

I got these:
Collecting environment information...
PyTorch version: 1.4.0
Is debug build: No
CUDA used to build PyTorch: 10.1

OS: Ubuntu 18.04.5 LTS
GCC version: (Ubuntu 6.5.0-2ubuntu1~18.04) 6.5.0 20181026
CMake version: Could not collect

Python version: 3.7
Is CUDA available: Yes
CUDA runtime version: 10.1.105
GPU models and configuration: GPU 0: GeForce RTX 2060
Nvidia driver version: 460.39
cuDNN version: /usr/local/cuda-10.1/targets/x86_64-linux/lib/libcudnn.so.7

Versions of relevant libraries:
[pip3] numpy==1.20.1
[pip3] torch==1.4.0
[pip3] torchfile==0.1.0
[pip3] torchvision==0.5.0
[conda] torch 1.4.0 pypi_0 pypi
[conda] torchfile 0.1.0 pypi_0 pypi
[conda] torchvision 0.5.0 pypi_0 pypi

Thanks! It seems that the nms module of Activity2Vec needs to be rebuilt.
Please remove the "build" folder in the root directory of Activity2Vec and re-run the setup command:

rm -r build/
python setup.py build develop

Thanks, problem solved by reinstall torch1.4.0, and rebuild twice.