Closed fanweiya closed 2 years ago
Hey, thanks for reporting.
Numba is quite itchy with data types:
Can only insert double* at [4] in {i8*, i8*, i64, i64, double*, [2 x i64], [2 x i64]}: got float*
at the 5th line means that you gave bounding boxes as an array of float32 (I assume), while the tree is typed to support float64.
.astype(np.float64)
should do the trick (?) Keep me posted.
I will add safe checks to ensure this raises a clearer error, or enlarge data types compatibility.
Hey, thanks for reporting. Numba is quite itchy with data types:
Can only insert double* at [4] in {i8*, i8*, i64, i64, double*, [2 x i64], [2 x i64]}: got float*
at the 5th line means that you gave bounding boxes as an array of float32 (I assume), while the tree is typed to support float64.
.astype(np.float64)
should do the trick (?) Keep me posted. I will add safe checks to ensure this raises a clearer error, or enlarge data types compatibility.
thanks,my data is actually float32 datatype, I switched to float64 and never made a mistake again.
I use lsnms postprocess my boxes, it run fail. my vesion: Requirement already satisfied: lsnms==0.1.2 in f:\anaconda\envs\tf2\lib\site-packages (0.1.2) Requirement already satisfied: numba==0.54.1 in f:\anaconda\envs\tf2\lib\site-packages (from lsnms==0.1.2) (0.54.1) Requirement already satisfied: numpy==1.19.5 in f:\anaconda\envs\tf2\lib\site-packages (from lsnms==0.1.2) (1.19.5) Requirement already satisfied: setuptools in f:\anaconda\envs\tf2\lib\site-packages (from numba==0.54.1->lsnms==0.1.2) (58.1.0) Requirement already satisfied: llvmlite<0.38,>=0.37.0rc1 in f:\anaconda\envs\tf2\lib\site-packages (from numba==0.54.1->lsnms==0.1.2) (0.37.0)