Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_bbox_transform_inv: Could not broadcast input array #1

Closed
lunzueta opened this issue Jun 25, 2016 · 2 comments
Closed

_bbox_transform_inv: Could not broadcast input array #1

lunzueta opened this issue Jun 25, 2016 · 2 comments

Comments

@lunzueta
Copy link

Hi @mitmul. I'm testing this program in Windows 10 64-bits (Anaconda + Pycharm), following your instructions.

The first error I found was in the file cpu_nms.pyx, line 26: cdef np.ndarray[np.int_t, ndim=1] order = scores.argsort()[::-1], where the error was ValueError: Buffer dtype mismatch, expected 'int_t' but got 'long long'. This can be fixed by replacing int_t with int64_t (in a similar way as suggested in rbgirshick/py-faster-rcnn#36).

After fixing that error, I get another error in the file bbox_transform.py, line 73, in _bbox_transform_inv:
pred_boxes[:, 0::4] = pred_ctr_x - 0.5 * pred_w
ValueError: could not broadcast input array from shape (300,21) into shape (1,21)

I'm stuck with this. Any suggestion?

@mitmul
Copy link
Owner

mitmul commented Jun 26, 2016

Hi @lunzueta, I didn't notice that error because I haven't tested anything with Windows :p, so thank you for letting me know the first error. I added a description about the workaround you showed me to README.

As for the second error, that's a known bug of Chainer. Please see this PR to Chainer (and actually I wrote about this in my README.md, but sorry I guess it's hard to notice). I think some people have installed Chainer via pip, so it could be pain to apply diff to Chainer's source. So I've fixed this problem by replacing the Chainer's roi_pooling_2d function with my modified one at this commit.

Could you run git pull and try it again?

@lunzueta
Copy link
Author

Thank you @mitmul. That solved the problem. Yes, I installed chainer via pip and I didn't realize about that comment in the description :-P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants