Code
I'm running a Python code which has the following statements:
# do NMS
dets = np.hstack((boxes, scores[:, np.newaxis])).astype(np.float32, copy=False)
keep = nms(dets, 0.3) # -> *** Error is thrown here :(
dets = dets[keep, :]
Data
The data shown by the debugger is:
Error
Eventually, the code throws this error:
AttributeError: module 'numpy' has no attribute 'int'.
At this line of code:
from .nms.cpu_nms import cpu_nms, cpu_soft_nms
def nms(dets, thresh):
"""Dispatch to either CPU or GPU NMS implementations."""
if dets.shape[0] == 0:
return []
return cpu_nms(dets, thresh) # -> *** Error is thrown here :(
Tried 1
I don't see any usage of np.int but I see that np.float32 is used as can be seen above. As suggested here, I replaced np.float32 with np.float32_. Then I get another error:
AttributeError: module 'numpy' has no attribute 'float32_'
Tried 2
I replaced np.float32 with np.float_, then this error is received:
File "nms/cpu_nms.pyx", line 17, in nms.cpu_nms.cpu_nms
ValueError: Buffer dtype mismatch, expected 'float32_t' but got 'double'
Question
What else I can try to resolve the error?


