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

faster rcnn runs in windows and error occurs #36

Closed
wait1988 opened this issue Dec 7, 2015 · 5 comments
Closed

faster rcnn runs in windows and error occurs #36

wait1988 opened this issue Dec 7, 2015 · 5 comments

Comments

@wait1988
Copy link

wait1988 commented Dec 7, 2015

I1207 16:32:10.283551 732336 python_layer.hpp:66] Traceback (most recent call last):
File "F:\sunqin\DeepLearning\Caffe\Projects\faster-rcnn\tools..\lib\rpn\proposal_layer.py", line 143, in forward
keep = nms(np.hstack((proposals, scores)), nms_thresh)
File "F:\sunqin\DeepLearning\Caffe\Projects\faster-rcnn\tools..\lib\fast_rcnn\nms_wrapper.py", line 17, in nms
return cpu_nms(dets, thresh)
File "nms\cpu_nms.pyx", line 25, in nms.cpu_nms.cpu_nms (nms\cpu_nms.c:1756)
cdef np.ndarray[np.int_t, ndim=1] order = scores.argsort()[::-1]
ValueError: Buffer dtype mismatch, expected 'int_t' but got 'long long'
Traceback (most recent call last):
File "./tools/demo.py", line 142, in
_, _= im_detect(net, im)
File "F:\sunqin\DeepLearning\Caffe\Projects\faster-rcnn\tools..\lib\fast_rcnn\test.py", line 155, in im_detect
blobs_out = net.forward(**forward_kwargs)
File "F:\sunqin\DeepLearning\Caffe\Projects\faster-rcnn\tools..\caffe-fast-rcnn\python\caffe\pycaffe.py", line 95, in _Net_forward
self._forward(start_ind, end_ind)
File "F:\sunqin\DeepLearning\Caffe\Projects\faster-rcnn\tools..\lib\rpn\proposal_layer.py", line 143, in forward
keep = nms(np.hstack((proposals, scores)), nms_thresh)
File "F:\sunqin\DeepLearning\Caffe\Projects\faster-rcnn\tools..\lib\fast_rcnn\nms_wrapper.py", line 17, in nms
return cpu_nms(dets, thresh)
File "nms\cpu_nms.pyx", line 25, in nms.cpu_nms.cpu_nms (nms\cpu_nms.c:1756)
ValueError: Buffer dtype mismatch, expected 'int_t' but got 'long long'

@wait1988
Copy link
Author

wait1988 commented Dec 9, 2015

I've fixed this error by replacing int_t to int32_t

@wait1988 wait1988 closed this as completed Dec 9, 2015
@SunShineMin
Copy link

Hi, wait1988,

Could you tell me how you modify setup.py in windows. When I run it in windows, this issue occurred:
clxx: fatal error C1083: cannot open source file:"-fPIC". How should I set nvcc compiler-options when I compile gpu_nms.pyx?

@cervantes-loves-ai
Copy link

when i try to run faster rcnn than i got like this kind of error, i'm using gtx970. thanks in advance

shape
I0719 14:46:28.321624 9405 net.cpp:150] Setting up rpn_cls_prob_reshape
I0719 14:46:28.321630 9405 net.cpp:157] Top shape: 1 18 15 15 (4050)
I0719 14:46:28.321635 9405 net.cpp:165] Memory required for data: 21835056
I0719 14:46:28.321638 9405 layer_factory.hpp:77] Creating layer proposal
F0719 14:46:28.321650 9405 layer_factory.hpp:81] Check failed: registry.count(type) == 1 (0 vs. 1) Unknown layer type: Python (known types: AbsVal, Accuracy, ArgMax, BNLL, BatchNorm, BatchReindex, Bias, Concat, ContrastiveLoss, Convolution, Data, Deconvolution, Dropout, DummyData, ELU, Eltwise, Embed, EuclideanLoss, Exp, Filter, Flatten, HDF5Data, HDF5Output, HingeLoss, Im2col, ImageData, InfogainLoss, InnerProduct, LRN, Log, MVN, MemoryData, MultinomialLogisticLoss, PReLU, Pooling, Power, ROIPooling, ReLU, Reduction, Reshape, SPP, Scale, Sigmoid, SigmoidCrossEntropyLoss, Silence, Slice, SmoothL1Loss, Softmax, SoftmaxWithLoss, Split, TanH, Threshold, Tile, WindowData)
*** Check failure stack trace: ***
Aborted (core dumped)

@pandabc
Copy link

pandabc commented Aug 28, 2017

When I run test_net.py on windows error occurred in .\lib\utils\nms.pyx. The problem was:
ValueError: Buffer dtype mismatch, expected 'int_t' but got 'long long'
I replaced 'int_t' in line 25 with intp_p, int32_t and int64_t, the error reported was always:
ValueError: Buffer dtype mismatch, expected 'int_t' but got 'long long'
Any one met the same problem?

@sn2234
Copy link

sn2234 commented Dec 31, 2017

I've change the corresponding line to cdef np.ndarray[np.int_t, ndim=1] order = scores.argsort()[::-1].astype('int32')

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

5 participants