jagjeet-singh / argoverse-forecasting

Official Repository for Argoverse Motion Forecasting Baselines
BSD 3-Clause Clear License
251 stars 70 forks source link

cannot visualize trajectory #8

Open ZijianHan opened 4 years ago

ZijianHan commented 4 years ago

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

ZSL98 commented 4 years ago

Hi, have you solved this error?

zyz111 commented 4 years ago

@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 commented 4 years ago

@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!

ZijianHan commented 4 years ago

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

zyz111 notifications@github.com 于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 .

jagjeet-singh commented 4 years ago

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

zyz111 commented 4 years ago

Hi, sorry I dont have a solution for it, as I haven't been working on this project for some time. Zijian Han zyz111 notifications@github.com 于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 notifications@github.com 于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 notifications@github.com 于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 commented 4 years ago

@ZijianHan Thank you !

zyz111 commented 4 years ago

@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!

abojja9 commented 4 years ago

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)
TimHo0331 commented 3 years ago

@abojja9 Thank you!

Sanjeeev-K commented 3 years ago

@abojja9 Super helpful! thanks mate!