facebookresearch / maskrcnn-benchmark

Fast, modular reference implementation of Instance Segmentation and Object Detection algorithms in PyTorch.
MIT License
9.29k stars 2.5k forks source link

Issue with Demo #691

Open bebenoz opened 5 years ago

bebenoz commented 5 years ago

🐛 Bug

Hello, After following the steps in installation Option 1 Step by step installation. Everything seems to be ok installation wise however when I try to run the demo code for webcam I get the following error. python webcam.py --min-image-size 800 Traceback (most recent call last): File "webcam.py", line 6, in from predictor import COCODemo File "/home/nova/mask-rcnn/maskrcnn-benchmark/demo/predictor.py", line 6, in from maskrcnn_benchmark.modeling.detector import build_detection_model File "/home/nova/mask-rcnn/maskrcnn-benchmark/maskrcnn_benchmark/modeling/detector/init.py", line 2, in from .detectors import build_detection_model File "/home/nova/mask-rcnn/maskrcnn-benchmark/maskrcnn_benchmark/modeling/detector/detectors.py", line 2, in from .generalized_rcnn import GeneralizedRCNN File "/home/nova/mask-rcnn/maskrcnn-benchmark/maskrcnn_benchmark/modeling/detector/generalized_rcnn.py", line 11, in from ..backbone import build_backbone File "/home/nova/mask-rcnn/maskrcnn-benchmark/maskrcnn_benchmark/modeling/backbone/init.py", line 2, in from .backbone import build_backbone File "/home/nova/mask-rcnn/maskrcnn-benchmark/maskrcnn_benchmark/modeling/backbone/backbone.py", line 7, in from maskrcnn_benchmark.modeling.make_layers import conv_with_kaiming_uniform File "/home/nova/mask-rcnn/maskrcnn-benchmark/maskrcnn_benchmark/modeling/make_layers.py", line 10, in from maskrcnn_benchmark.layers import Conv2d File "/home/nova/mask-rcnn/maskrcnn-benchmark/maskrcnn_benchmark/layers/init.py", line 9, in from .nms import nms File "/home/nova/mask-rcnn/maskrcnn-benchmark/maskrcnn_benchmark/layers/nms.py", line 3, in from maskrcnn_benchmark import _C ImportError: /home/nova/mask-rcnn/maskrcnn-benchmark/maskrcnn_benchmark/_C.cpython-37m-x86_64-linux-gnu.so: undefined symbol: __cudaRegisterFatBinaryEnd My specs are as follows

image

Thanks

chengyangfu commented 5 years ago

Hi @bebenoz , This is caused when you use different PyTorch versions to compile and execute the code. Make sure you use the same PyTorch version/library to compile and run the code. Then remove the build directory and recompile the maskrcnn-benchmark.

rm -rf build
python setup.py build develop
Dorozhko-Anton commented 5 years ago

Hi @bebenoz . were you able to solve the problem ? If no, could you provide environment info using collect_env.py script ?

You can get the script and run it with:

wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py