argoverse-forecasting icon indicating copy to clipboard operation
argoverse-forecasting copied to clipboard

cannot visualize trajectory

Open ZijianHan opened this issue 4 years ago • 11 comments

Hi, when I run the viz python script I got the error:

File "argoverse-api/argoverse/utils/manhattan_search.py", line 90, in find_all_polygon_bboxes_overlapping_query_bbox overlaps_left = (query_min_x <= bboxes_x2) & (bboxes_x2 <= query_max_x) ValueError: operands could not be broadcast together with shapes (2,) (4952,)

Is this some error in argoverse api or am I using the wrong commnd by : python eval_forecasting_helper.py --viz --gt trajectory_predict/const_vel_traj_predict.pkl --forecast trajectory_predict/lstm_social_traj.pkl --horizon 30 --obs_len 20 --features features_pre/forecasting_features_test.pkl

ZijianHan avatar Mar 09 '20 08:03 ZijianHan

Hi, have you solved this error?

ZSL98 avatar May 30 '20 03:05 ZSL98

@ZijianHan Hi, when I run the viz python script I got the same error.Could you please tell me your solution of solveing the problem. Thank you very much!

zyz111 avatar Aug 22 '20 05:08 zyz111

@ZijianHan @ZSL98 File "argoverse-api/argoverse/utils/manhattan_search.py", line 90, in find_all_polygon_bboxes_overlapping_query_bbox overlaps_left = (query_min_x <= bboxes_x2) & (bboxes_x2 <= query_max_x) ValueError: operands could not be broadcast together with shapes (2,) (4952,)

Hi, when I run the viz python script I got the same error.Could you please tell me your solution of solveing the problem, and I have the urgent need for the solution. Thank you very much!

zyz111 avatar Aug 22 '20 10:08 zyz111

Hi, sorry I dont have a solution for it, as I haven't been working on this project for some time. Zijian Han

zyz111 [email protected] 于2020年8月22日周六 下午12:19写道:

@ZijianHan https://github.com/ZijianHan @ZSL98 https://github.com/ZSL98 File "argoverse-api/argoverse/utils/manhattan_search.py", line 90, in find_all_polygon_bboxes_overlapping_query_bbox overlaps_left = (query_min_x <= bboxes_x2) & (bboxes_x2 <= query_max_x) ValueError: operands could not be broadcast together with shapes (2,) (4952,)

Hi, when I run the viz python script I got the same error.Could you please tell me your solution of solveing the problem, and I have the urgent need for the solution. Thank you very much!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jagjeet-singh/argoverse-forecasting/issues/8#issuecomment-678623079, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG5HW2LABZ56CLPJZ5R7ICTSB6LUJANCNFSM4LEDRPNA .

ZijianHan avatar Aug 22 '20 15:08 ZijianHan

Hi, I'm not able to reproduce this error. Could you please explain what are you passing into the gt argument?

jagjeet-singh avatar Aug 22 '20 19:08 jagjeet-singh

Hi, sorry I dont have a solution for it, as I haven't been working on this project for some time. Zijian Han zyz111 [email protected] 于2020年8月22日周六 下午12:19写道: @ZijianHan https://github.com/ZijianHan @ZSL98 https://github.com/ZSL98 File "argoverse-api/argoverse/utils/manhattan_search.py", line 90, in find_all_polygon_bboxes_overlapping_query_bbox overlaps_left = (query_min_x <= bboxes_x2) & (bboxes_x2 <= query_max_x) ValueError: operands could not be broadcast together with shapes (2,) (4952,) Hi, when I run the viz python script I got the same error.Could you please tell me your solution of solveing the problem, and I have the urgent need for the solution. Thank you very much! — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#8 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG5HW2LABZ56CLPJZ5R7ICTSB6LUJANCNFSM4LEDRPNA .

Hi, sorry I dont have a solution for it, as I haven't been working on this project for some time. Zijian Han zyz111 [email protected] 于2020年8月22日周六 下午12:19写道: @ZijianHan https://github.com/ZijianHan @ZSL98 https://github.com/ZSL98 File "argoverse-api/argoverse/utils/manhattan_search.py", line 90, in find_all_polygon_bboxes_overlapping_query_bbox overlaps_left = (query_min_x <= bboxes_x2) & (bboxes_x2 <= query_max_x) ValueError: operands could not be broadcast together with shapes (2,) (4952,) Hi, when I run the viz python script I got the same error.Could you please tell me your solution of solveing the problem, and I have the urgent need for the solution. Thank you very much! — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#8 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG5HW2LABZ56CLPJZ5R7ICTSB6LUJANCNFSM4LEDRPNA .

Hi, sorry I dont have a solution for it, as I haven't been working on this project for some time. Zijian Han zyz111 [email protected] 于2020年8月22日周六 下午12:19写道: @ZijianHan https://github.com/ZijianHan @ZSL98 https://github.com/ZSL98 File "argoverse-api/argoverse/utils/manhattan_search.py", line 90, in find_all_polygon_bboxes_overlapping_query_bbox overlaps_left = (query_min_x <= bboxes_x2) & (bboxes_x2 <= query_max_x) ValueError: operands could not be broadcast together with shapes (2,) (4952,) Hi, when I run the viz python script I got the same error.Could you please tell me your solution of solveing the problem, and I have the urgent need for the solution. Thank you very much! — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#8 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG5HW2LABZ56CLPJZ5R7ICTSB6LUJANCNFSM4LEDRPNA .

Thank you!

zyz111 avatar Aug 23 '20 04:08 zyz111

@ZijianHan Thank you !

zyz111 avatar Aug 23 '20 05:08 zyz111

@jagjeet-singh hi, because the downloaded data set is a .cvs file and the gt data required .pkl file, and I don’t know how to convert between them. So, the generated lstm_social_traj.pkl file is regarded as a gt file.

python eval_forecasting_helper.py --viz --gt trajectory_predict/lstm_social_traj.pkl --forecast trajectory_predict/lstm_map_traj.pkl --horizon 30 --obs_len 20 --features features_pre/forecasting_features_test.pkl

Could you please tell me your method or the gt argument, thank you very much!

zyz111 avatar Aug 23 '20 05:08 zyz111

You can use something as below to generate the ground_truth pkl file from the generated features.

import pandas as pd
import os
import pickle

df = pd.read_pickle("./forecasting_features/forecasting_features_val.pkl")
save_path = "./ground_truth_data"
if not os.path.exists(save_path):
    os.makedirs(save_path)
    
val_gt = {}
for i in range(len(df)):
    seq_id = df.iloc[i]['SEQUENCE']
    curr_arr = df.iloc[i]['FEATURES'][20:][:, 3:5]
    val_gt[seq_id] = curr_arr

with open(save_path + '/ground_truth_val.pkl', 'wb') as f:
    pickle.dump(val_gt, f)

abojja9 avatar Aug 24 '20 23:08 abojja9

@abojja9 Thank you!

TimHo0331 avatar Dec 27 '20 06:12 TimHo0331

@abojja9 Super helpful! thanks mate!

Sanjeeev-K avatar May 01 '21 06:05 Sanjeeev-K