ybarancan/STSU

Issue running validator_tr.py on Nuscenes

Closed this issue · 6 comments

Hi,
Thanks for this amazing work!
I am trying to run validator_tr.py on the Nuscenes data and running into this issues

ERROR:root:ORIENT too many indices for array: array is 2-dimensional, but 3 were indexed

On debugging this further I found that make_nuscenes_labels.py is losing data when it saves and loads the Object array loc_dict
for example for token 885472e412f4499cacf2f4796c309276
shapes of the array before (2002, 2, 2) and after loading the saved pickle file (119, 9)

So, I am wondering if there is a version mismatch in my environment or if I am missing something else entirely.
Can you please let me know how to solve this issue?
and can you also share your requirements.txt file?

Hi,
About the ''shapes of the array before (2002, 2, 2) and after loading the saved pickle file (119, 9)'', how did you check the shape of the array before loading? Is it before saving the dictionary as .npy in make_nuscenes_labels.py?

yes, that is right.

to elaborate more,
we computed the shape right before saving the file as .npy
as shown in the below screenshot, right before saving, at line 269 we are printing the shape
and again at lines 274 and 275 we are immediately loading and printing the shape of the same token.

image

any suggestions on resolving this?

I realised my mistake.
I was giving wrong paths to the dictionary overwriting the loc_dict
Thanks for taking a look, I will close this issue for now!

The obj_dict is fine and should be 9 dimensional. The error message 'ERROR:root:ORIENT too many indices for array: array is 2-dimensional, but 3 were indexed' is coming from get_line_orientation function which doesn't have anything to do with objects. Can you verify if you receive this error for a few samples or for all the samples? This error occurs for a few samples where there are problems in the dataset itself regarding the incoming and outgoing centerlines. In the code, these cases are simply ignored.

correct. I was passing obj_dict to the function instead of loc_dict because of incorrect paths.
I believe we are not seeing this error again.