alfredgu001324 / MapUncertaintyPrediction

[CVPR 2024 Award Candidate] Producing and Leveraging Online Map Uncertainty in Trajectory Prediction
https://arxiv.org/abs/2403.16439
Apache License 2.0
145 stars 11 forks source link

Sample_Idx is not being genertated #25

Open sharmasushil opened 3 days ago

sharmasushil commented 3 days ago

Hi there,

When we try to run the command:

python adaptor_vis.py --data_path ../trj_data/maptr

we encounter an error indicating that there are no sample_idx keys.

Find the below code:

if args.map_model == "MapTR":
            #sample_token = map_data[i].get('pts_bbox', {}).get('sample_idx', None)
            sample_token = map_data[i]['pts_bbox']['sample_idx']
        elif args.map_model == "StreamMapNet":
            sample_token = map_data[i]['token']
        print(sample_token,'hhfahfashfjskhfsdfhkjh')
        try:
            idx = sample_to_idx[sample_token]
        except:
            continue
        print(map_data.key())

Please let me know how to solve this issue.

Thanks a million

alfredgu001324 commented 3 days ago

Uhmmm you mean that in the mapping_results.pickle there is no such key named 'sample_idx'?

sharmasushil commented 3 days ago

Yes, there is no such key named sample_idx

and give me an Traceback (most recent call last): File "adaptor.py", line 430, in <module> main(args) File "adaptor.py", line 246, in main sample_token = map_data[i]['pts_bbox']['sample_idx'] KeyError: 'sample_idx'

and another also occurs predicted map is not found.

Please advice me.

Thanks

alfredgu001324 commented 2 days ago

If this is not found, then probably the evaluation is not done correctly. You can refer to this reply: https://github.com/alfredgu001324/MapUncertaintyPrediction/issues/24#issuecomment-2400057112