jamestang1998 / CasCalib

7 stars 0 forks source link

Question about Prerequisites #1

Open hunminkim98 opened 1 month ago

hunminkim98 commented 1 month ago

Dear @jamestang1998 Fiist of all thank you for your awesome and great work!! This is really useful :)

I hope use this project for my case, and I got stuck when I tested it. Here is my question.

I realized that above question was dumb. But, I have a new question! I faced error when I ran bundle adjustment function.

The error message was :

Traceback (most recent call last): File "/content/CasCalib/run_multiview.py", line 320, in matched_points = bundle_adjustment.match_3d_plotly_input2d_farthest_point(pre_bundle_cal_array, single_view_cal_array, pose_2d_array_comb, k = 20) File "/content/CasCalib/bundle_adjustment.py", line 841, in match_3d_plotly_input2d_farthest_point index_dict[i1].append(torch.tensor(list(poses_array_ref[ref_ind].values())[:-1])) AttributeError: 'numpy.float64' object has no attribute 'values'

Could you advice me what can I do for solve it ?

I think I'm missing something, and I'd appreciate an answer.

Best regards, HunMin Kim

jamestang1998 commented 1 month ago

Hi HunMin Kim,

Sorry for the late reply. For the first few questions about xml files, those ground truth files were only used for evaluation of the pipeline. If you are running it on a completely new sequence, you do not need to have those xml files. For the error you are getting with 'numpy.float64' object has no attribute 'values', poses_array_ref should be a dictionary. Maybe take a look at the example data detections in order to see how the input keypoints need to be formated.

Thank You, James

hunminkim98 commented 1 month ago

Hello, James

Thank you for your reply. I'm a little confused, I got an error when running the your demo data, what should I do before running 'run_multiview.py'? Or do I need to run a different script than 'run_multiview.py' to run the entire pipeline? Looking at the code, it looks like run_multiview.py includes everything, so I've been running it.

Thank you for your valuable response. HunMin Kim

jamestang1998 commented 1 month ago

Hello, James

Thank you for your reply. I'm a little confused, I got an error when running the your demo data, what should I do before running 'run_multiview.py'? Or do I need to run a different script than 'run_multiview.py' to run the entire pipeline? Looking at the code, it looks like run_multiview.py includes everything, so I've been running it.

Thank you for your valuable response. HunMin Kim

what error are you getting?

hunminkim98 commented 1 month ago

Hello, here is information.

error: Traceback (most recent call last): File "c:/Users/5W555A/Desktop/CasCalib/run_multiview.py", line 324, in matched_points = bundle_adjustment.match_3d_plotly_input2d_farthest_point(pre_bundle_cal_array, single_view_cal_array, pose_2d_array_comb, k = 20) File "c:\Users\5W555A\Desktop\CasCalib\bundle_adjustment.py", line 841, in match_3d_plotly_input2d_farthest_point index_dict[i1].append(torch.tensor(list(poses_array_ref[ref_ind].values())[:-1])) AttributeError: 'numpy.float64' object has no attribute 'values'

Occurred from: Line in the run_mutiview.py: matched_points = bundle_adjustment.match_3d_plotly_input2d_farthest_point(pre_bundle_cal_array, single_view_cal_array, pose_2d_array_comb, k = 20)

Line in the bundle_adjustment.py: index_dict[i1].append(torch.tensor(list(poses_array_ref[ref_ind].values())[:-1]))

jamestang1998 commented 3 weeks ago

Did you check this file, https://github.com/jamestang1998/CasCalib/blob/main/example_data/detections/result_terrace1-c0_.json, to see how the data is formated?

hunminkim98 commented 1 week ago

Sorry for the late reply.

I appreciate the advice, but it's unfortunate that I don't have time to go into this much detail right now - I'll have to come back to this later!