uci-cbcl / NoduleNet

[MICCAI' 19] NoduleNet: Decoupled False Positive Reduction for Pulmonary Nodule Detection and Segmentation
Other
185 stars 57 forks source link

Error when running inference on CPU only #21

Closed Tzeny closed 4 years ago

Tzeny commented 4 years ago

Hello, I have tried using your code to run a trained model on the CPU, however when I import box I get the following error:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-16c3b2134ae3> in <module>
      1 import torch
----> 2 from box import cpu_nms, cpu_overlap

ImportError: /home/tzeny/anaconda3/envs/torch_cpu/lib/python3.7/site-packages/box-0.0.0-py3.7-linux-x86_64.egg/box.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZNK2at11ATenOpTable11reportErrorEN3c1012TensorTypeIdE

From what I was able to find online this seems to be related to CUDA.

In your import code I saw you have alternative imports set up:

try:
    from utils.pybox import *
except ImportError as e:
    print(e)
    print('Warning: C++ module import failed! This should only happen in deployment')
    from utils.util import py_nms as torch_nms
    from utils.util import py_box_overlap as torch_overlap

However I couldn't find that part of the code on GitHub: https://github.com/uci-cbcl/NoduleNet/blob/master/utils/util.py.

Could you please provide it?

Thank you so much!

LXYTSOS commented 4 years ago

I also missing some other functions, the code may not be uploaded completely.

tanghaotommy commented 4 years ago

Thank you for your interest. I have uploaded these utility functions in the newest commit, in order to run without compiling box.