Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Strange Problem #293

Open
engineer1109 opened this issue Dec 20, 2018 · 6 comments
Open

Strange Problem #293

engineer1109 opened this issue Dec 20, 2018 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@engineer1109
Copy link

❓ Questions and Help

Traceback (most recent call last):
File "webcam.py", line 80, in
main()
File "webcam.py", line 71, in main
composite = coco_demo.run_on_opencv_image(img)
File "/media/wjl/New/maskrcnn-benchmark/demo/predictor.py", line 171, in run_on_opencv_image
predictions = self.compute_prediction(image)
File "/media/wjl/New/maskrcnn-benchmark/demo/predictor.py", line 202, in compute_prediction
predictions = self.model(image_list)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/maskrcnn_benchmark-0.1-py3.6-linux-x86_64.egg/maskrcnn_benchmark/modeling/detector/generalized_rcnn.py", line 50, in forward
proposals, proposal_losses = self.rpn(images, features, targets)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/maskrcnn_benchmark-0.1-py3.6-linux-x86_64.egg/maskrcnn_benchmark/modeling/rpn/rpn.py", line 102, in forward
return self._forward_test(anchors, objectness, rpn_box_regression)
File "/usr/local/lib/python3.6/dist-packages/maskrcnn_benchmark-0.1-py3.6-linux-x86_64.egg/maskrcnn_benchmark/modeling/rpn/rpn.py", line 128, in _forward_test
boxes = self.box_selector_test(anchors, objectness, rpn_box_regression)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/maskrcnn_benchmark-0.1-py3.6-linux-x86_64.egg/maskrcnn_benchmark/modeling/rpn/inference.py", line 138, in forward
sampled_boxes.append(self.forward_for_single_feature_map(a, o, b))
File "/usr/local/lib/python3.6/dist-packages/maskrcnn_benchmark-0.1-py3.6-linux-x86_64.egg/maskrcnn_benchmark/modeling/rpn/inference.py", line 118, in forward_for_single_feature_map
score_field="objectness",
File "/usr/local/lib/python3.6/dist-packages/maskrcnn_benchmark-0.1-py3.6-linux-x86_64.egg/maskrcnn_benchmark/structures/boxlist_ops.py", line 27, in boxlist_nms
keep = _box_nms(boxes, score, nms_thresh)
RuntimeError: Dimension out of range (expected to be in range of [-2, 1], but got 2) (maybe_wrap_dim at /media/wjl/New/maskrcnn-benchmark/pytorch/c10/core/WrapDimMinimal.h:18)
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) + 0x6c (0x7fc2942a37fc in /usr/local/lib/python3.6/dist-packages/torch/lib/libc10.so)
frame #1: + 0x5d9bc3 (0x7fc294d19bc3 in /usr/local/lib/python3.6/dist-packages/torch/lib/libcaffe2.so)
frame #2: at::native::min_out(at::Tensor&, at::Tensor&, at::Tensor const&, long, bool) + 0x66 (0x7fc294d1d366 in /usr/local/lib/python3.6/dist-packages/torch/lib/libcaffe2.so)
frame #3: at::native::min(at::Tensor const&, long, bool) + 0xdd (0x7fc294d1d7fd in /usr/local/lib/python3.6/dist-packages/torch/lib/libcaffe2.so)
frame #4: at::TypeDefault::min(at::Tensor const&, long, bool) const + 0x91 (0x7fc294f3a191 in /usr/local/lib/python3.6/dist-packages/torch/lib/libcaffe2.so)
frame #5: torch::autograd::VariableType::min(at::Tensor const&, long, bool) const + 0x252 (0x7fc29765f022 in /usr/local/lib/python3.6/dist-packages/torch/lib/libtorch.so.1)
frame #6: at::native::argmin(at::Tensor const&, long, bool) + 0x4d (0x7fc294d1b84d in /usr/local/lib/python3.6/dist-packages/torch/lib/libcaffe2.so)
frame #7: at::TypeDefault::argmin(at::Tensor const&, long, bool) const + 0x91 (0x7fc294f318d1 in /usr/local/lib/python3.6/dist-packages/torch/lib/libcaffe2.so)
frame #8: torch::autograd::VariableType::argmin(at::Tensor const&, long, bool) const + 0x16a (0x7fc29761785a in /usr/local/lib/python3.6/dist-packages/torch/lib/libtorch.so.1)
frame #9: at::native::_argmin(at::Tensor const&, long, bool) + 0x48 (0x7fc294d19f18 in /usr/local/lib/python3.6/dist-packages/torch/lib/libcaffe2.so)
frame #10: at::TypeDefault::_argmin(at::Tensor const&, long, bool) const + 0x91 (0x7fc294f31ac1 in /usr/local/lib/python3.6/dist-packages/torch/lib/libcaffe2.so)
frame #11: torch::autograd::VariableType::_argmin(at::Tensor const&, long, bool) const + 0x16a (0x7fc297615f9a in /usr/local/lib/python3.6/dist-packages/torch/lib/libtorch.so.1)
frame #12: nms(at::Tensor const&, at::Tensor const&, float) + 0xc7 (0x7fc26b0a9bb7 in /usr/local/lib/python3.6/dist-packages/maskrcnn_benchmark-0.1-py3.6-linux-x86_64.egg/maskrcnn_benchmark/_C.cpython-36m-x86_64-linux-gnu.so)
frame #13: + 0x20a78 (0x7fc26b0b5a78 in /usr/local/lib/python3.6/dist-packages/maskrcnn_benchmark-0.1-py3.6-linux-x86_64.egg/maskrcnn_benchmark/_C.cpython-36m-x86_64-linux-gnu.so)
frame #14: + 0x1dd4c (0x7fc26b0b2d4c in /usr/local/lib/python3.6/dist-packages/maskrcnn_benchmark-0.1-py3.6-linux-x86_64.egg/maskrcnn_benchmark/_C.cpython-36m-x86_64-linux-gnu.so)

frame #16: python3() [0x54ffe4]
frame #18: python3() [0x54fbe1]
frame #19: python3() [0x54fe6d]
frame #21: python3() [0x54f0e8]
frame #22: python3() [0x550116]
frame #24: python3() [0x54fbe1]
frame #29: python3() [0x54fbe1]
frame #33: python3() [0x4e0e9b]
frame #35: python3() [0x54fd37]
frame #37: python3() [0x54f0e8]
frame #38: python3() [0x550116]
frame #40: python3() [0x54fbe1]
frame #45: python3() [0x54fbe1]
frame #49: python3() [0x4e0e9b]
frame #51: python3() [0x54fd37]
frame #53: python3() [0x54fbe1]
frame #58: python3() [0x54fbe1]
frame #62: python3() [0x4e0e9b]

Python 3.6
Cuda10.0
Pytorch 1.0
Ubuntu 18.04
Gcc 7

@fmassa
Copy link
Contributor

fmassa commented Dec 20, 2018

Hi,

This is weird. I suppose that you are running an unmodified version of maskrcnn-benchmark?
Also, what's your PyTorch version?

@engineer1109
Copy link
Author

Hi,

This is weird. I suppose that you are running an unmodified version of maskrcnn-benchmark?
Also, what's your PyTorch version?

Pytorch 1.0 I compiled on ubuntu

@fmassa
Copy link
Contributor

fmassa commented Dec 21, 2018

can you do

import torch
print(torch.__version__)

and

cd maskrchh-benchmark
git log -n 1

and paste the results here?

@engineer1109
Copy link
Author

import torch
print(torch.version)

1.0.0a0+bb9b7de

git log -n 1

commit 4ab3356 (HEAD -> master, origin/master, origin/HEAD)
Author: ywlng 34298319+yewenlong@users.noreply.github.com
Date: Fri Dec 14 21:07:44 2018 +0800

fix error when running with --show-mask-heatmaps (#274)

@engineer1109
Copy link
Author

can you do

import torch
print(torch.__version__)

and

cd maskrchh-benchmark
git log -n 1

and paste the results here?

import torch
print(torch.version)

1.0.0a0+bb9b7de

git log -n 1

commit 4ab3356 (HEAD -> master, origin/master, origin/HEAD)
Author: ywlng 34298319+yewenlong@users.noreply.github.com
Date: Fri Dec 14 21:07:44 2018 +0800

fix error when running with --show-mask-heatmaps (#274)

@fmassa fmassa added the help wanted Extra attention is needed label Dec 25, 2018
@fmassa
Copy link
Contributor

fmassa commented Dec 25, 2018

I just tried reproducing the problem with the latest nightly of PyTorch, but I couldn't reproduce it.
Could you try installing a newer version of PyTorch from a nightly?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants