LiWentomng / BoxInstSeg

A toolbox for box-supervised instance segmentation.
Apache License 2.0
407 stars 38 forks source link

No module named 'tree_filter_cuda' #13

Open matanPercepto opened 1 year ago

matanPercepto commented 1 year ago

Hi, I tried installing your package inside an nvidia cuda docker, I made sure to install correct and cuda supporting versions of pytorch and mmcv-full, and used the bash setup.sh command to install your package, but when I tried to run it, I receive the following error: File "/*****.py", line 5, in <module> from mmdet.apis import init_detector File "/app/BoxInstSeg/mmdet/apis/__init__.py", line 2, in <module> from .inference import (async_inference_detector, inference_detector, File "/app/BoxInstSeg/mmdet/apis/inference.py", line 13, in <module> from mmdet.datasets import replace_ImageToTensor File "/app/BoxInstSeg/mmdet/datasets/__init__.py", line 9, in <module> from .utils import (NumClassCheckHook, get_loading_pipeline, File "/app/BoxInstSeg/mmdet/datasets/utils.py", line 11, in <module> from mmdet.models.roi_heads.mask_heads import FusedSemanticHead File "/app/BoxInstSeg/mmdet/models/__init__.py", line 7, in <module> from .dense_heads import * # noqa: F401,F403 File "/app/BoxInstSeg/mmdet/models/dense_heads/__init__.py", line 5, in <module> from .box_solov2_head import BoxSOLOv2Head File "/app/BoxInstSeg/mmdet/models/dense_heads/box_solov2_head.py", line 13, in <module> from mmdet.ops.tree_filter.modules.tree_filter import MinimumSpanningTree, TreeFilter2D File "/app/BoxInstSeg/mmdet/ops/tree_filter/modules/tree_filter.py", line 5, in <module> from ..functions.mst import mst File "/app/BoxInstSeg/mmdet/ops/tree_filter/functions/mst.py", line 7, in <module> import tree_filter_cuda as _C ModuleNotFoundError: No module named 'tree_filter_cuda' Any advice on what I did wrong in the installation? Thanks!

system details: CUDA: 11.1.1 cudnn: 8 ubuntu: 20.04 python 3.9 pytorch 1.10.1 mmcv-full: 1.5.0

LiWentomng commented 1 year ago

@matanPercepto Hello, please try to use pytorch1.9.0 under CUDA 11.1.1, and re-compile tree_filter_cuda operation by the following.

cd mmdet/ops/tree_filter 
python setup.py build develop
matanPercepto commented 1 year ago

Thanks, I tried it but now the installation fails with error: `Installed /app/BoxInstSeg/mmdet/ops/pairwise

20 66.77 Processing dependencies for boxinst-plugin==0.0.1

20 66.77 Finished processing dependencies for boxinst-plugin==0.0.1

20 68.03 No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda'

20 68.03 Traceback (most recent call last):

20 68.03 File "/app/BoxInstSeg/mmdet/ops/tree_filter/setup.py", line 22, in

20 68.03 raise Exception('This implementation is only avaliable for CUDA devices.')

20 68.03 Exception: This implementation is only avaliable for CUDA devices.

I tried addingENV CUDA_VISIBLE_DEVICES=0andENV CUDA_HOME=/usr/local/cuda` but it still didn't work.