Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question about “crop_img_patch_with_box” function #10

Open
buaazeus opened this issue Oct 26, 2022 · 5 comments
Open

question about “crop_img_patch_with_box” function #10

buaazeus opened this issue Oct 26, 2022 · 5 comments

Comments

@buaazeus
Copy link

Hello, Do you add “crop_img_patch_with_box” in /AutoAlignV2/tools/data_converter/create_gt_database.py?
Or is this function from mmdet3d?
Thank you.

@guangqianzhang
Copy link

i have the same question.it will show TypeError: list indices must be integers or slices, not tuple,right? there are actually a wrong, but do not know the solution. may i get your ways? thanks

@ZecCheng
Copy link

ZecCheng commented Jul 5, 2023

File "tools/create_data.py", line 237, in
max_sweeps=args.max_sweeps)
File "tools/create_data.py", line 84, in nuscenes_data_prep
with_bbox=True)
File "/opt/lcx/project/AutoAlignV2/tools/data_converter/create_gt_database.py", line 324, in create_groundtruth_database
object_img_patches = crop_img_patch_with_box_v2(gt_boxes, example['img'])
File "/opt/lcx/project/AutoAlignV2/tools/data_converter/create_gt_database.py", line 129, in crop_img_patch_with_box_v2
img_patch = org_img_list[num_img][y1:y1 + h, x1:x1 + w]
IndexError: list index out of range

i meet the question like this. it shows that the org_img_list input only contains one image while we choose 6 images of different views to crop it. so my question is, why only crop one image patches?

@zehuichen123
Copy link
Owner

Hi, we only choose one view to crop, the first view that has the object, following the order (FRONT, LEFT_FRONT, RIGHT_FRONT, LEFT_BACK, RIGHT_BACK, BACK, maybe). The reason that I crop one image patch is we simply want to reduce the size of GT database.

@ZecCheng
Copy link

ZecCheng commented Jul 5, 2023

thanks a lot for your prompt answer~ so in [crop_img_patch_with_box”] function, i may just filter other views like this?
if(num_img ==0) img_patch = org_img_list[0][y1:y1 + h, x1:x1 + w] img_patches.append(img_patch) where num_img varies from 0 to 5, which means 6 different views gt bboxes.

buaazeus opened this issue on Oct 26, 2022 · 3 co

Hi, we only choose one view to crop, the first view that has the object, following the order (FRONT, LEFT_FRONT, RIGHT_FRONT, LEFT_BACK, RIGHT_BACK, BACK, maybe). The reason that I crop one image patch is we simply want to reduce the size of GT database.

@zehuichen123
Copy link
Owner

zehuichen123 commented Jul 5, 2023

You may have a try. The code should not have this problem since I have used it to generate the database before... it's quite strange... Perhaps I changed it for waymo afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants