Media-Smart / SKU110K-DenseDet

A state of art detector for densely packed scenes dataset SKU-110K
Apache License 2.0
111 stars 24 forks source link

ImportError: libtorch_cpu.so: cannot open shared object file: No such file or directory #12

Closed azmathmoosa closed 3 years ago

azmathmoosa commented 3 years ago

Trying to run

$ python tools/train.py configs/Pepsico_fusion_bfp_x101_32x4d.py 
Traceback (most recent call last):
  File "tools/train.py", line 9, in <module>
    from mmdet.apis import (get_root_logger, set_random_seed,
  File "/data/work/pocs/pepsico/cartbox/SKU110K-DenseDet/mmdet/apis/__init__.py", line 2, in <module>
    from .inference import (inference_detector, init_detector, show_result,
  File "/data/work/pocs/pepsico/cartbox/SKU110K-DenseDet/mmdet/apis/inference.py", line 11, in <module>
    from mmdet.core import get_classes
  File "/data/work/pocs/pepsico/cartbox/SKU110K-DenseDet/mmdet/core/__init__.py", line 6, in <module>
    from .post_processing import *  # noqa: F401, F403
  File "/data/work/pocs/pepsico/cartbox/SKU110K-DenseDet/mmdet/core/post_processing/__init__.py", line 1, in <module>
    from .bbox_nms import multiclass_nms
  File "/data/work/pocs/pepsico/cartbox/SKU110K-DenseDet/mmdet/core/post_processing/bbox_nms.py", line 3, in <module>
    from mmdet.ops.nms import nms_wrapper
  File "/data/work/pocs/pepsico/cartbox/SKU110K-DenseDet/mmdet/ops/__init__.py", line 7, in <module>
    from .nms import nms, soft_nms
  File "/data/work/pocs/pepsico/cartbox/SKU110K-DenseDet/mmdet/ops/nms/__init__.py", line 1, in <module>
    from .nms_wrapper import nms, soft_nms
  File "/data/work/pocs/pepsico/cartbox/SKU110K-DenseDet/mmdet/ops/nms/nms_wrapper.py", line 4, in <module>
    from . import nms_cpu, nms_cuda
ImportError: libtorch_cpu.so: cannot open shared object file: No such file or directory

I followed your guide and installed

torch==1.4.0
torchvision==0.5.0
mmcv==0.5.9 (i cloned that branch and did pip install -e .)
mmdet==1.0rc1+2d6b8e9  (i ran python setup.py develop from the parent directory)

If I upgrade torch, it fails to compile mmdet saying AT_CHECK is undefined.

What should I do?

azmathmoosa commented 3 years ago

Okay I downgraded to torch==1.2.0 torchvision==0.4.0 and rebuilt mmdet and mmcv. Its working now.