-
Notifications
You must be signed in to change notification settings - Fork 333
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
Introduce random drop box 3D data augmentation. #1084
Conversation
2. Add wrap_angle_rad helper function.
2. Change rads -> radians 3. Good point. We could add X or Y rotation as future work. For this PR, let's check in Z rotation first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
Some minor comments
|
||
def __init__(self, label_index=None, max_drop_bounding_boxes=10, **kwargs): | ||
super().__init__(**kwargs) | ||
self.auto_vectorize = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe we should just make auto_vectorize by default False
for the moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
label_index: An optional int scalar sets the target object index. | ||
If label index is set, randomly drop bounding boxes, where box class == label_index. | ||
If label index is None, randomly drop bounding boxes, where box class > 0. | ||
max_drop_bounding_boxes: A int scalar sets the maximum number of dropped bounding boxes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a int non negative scalar
Also default what =0 means here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
||
""" | ||
|
||
def __init__(self, label_index=None, max_drop_bounding_boxes=10, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is 10 a good default number, or do we make this argument mandatory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change it to mandatory.
/gcbrun |
* Add base augmentation layer for 3D preception. * Fix format. * Add copyright. * Minor change. * revert the minor change in the test file. * 1. Add global_z_rotation data augmentation. 2. Add wrap_angle_rad helper function. * Auto format. * 1. Standardize POINT_CLOUDS and BOUNDING_BOXES 2. Change rads -> radians 3. Good point. We could add X or Y rotation as future work. For this PR, let's check in Z rotation first. * Format. * Delete base_augmentation_layer_3d.py * Delete base_augmentation_layer_3d_test.py * Standardize POINT_CLOUDS and BOUNDING_BOXES names. * Change GlobalZRotation to GlobalRandomZRotation * Support rotation along X, Y and Z axes. * format. * Change file name from global_rotation to global_random_rotation. * Add four more global data augmentations for 3d. * format. * Remove unused import. * Fix a typo in GlobalRandomFlippingY. * Support scaling x, y, and z. * Format. * update random scaling. * Modified based on comments. * follow up. * Fix a typo in random_scaling_test.py * Update. * Fix two typos. * Crop object. * Remove tf.print in test. * Fix typos. * test failed when using is_within_box3d + map function * update. * Rename to group_points_by_bounding_boxes. * Update. * Update. * Format. * Format. * Fix a typo. * Update. * fix a typo. * Introducing randomly pasting object data augmentation. * Update. * Update. * update. * Update. * Update. * Update. * Swap background data augmentation. * Update. * Update. * Clean up. * Update. * Update * Random drop box augmentation. * Update. * Update. Co-authored-by: Leng Zhaoqi <[email protected]>
What does this PR do?
Fixes # (issue)
Before submitting
Pull Request section?
to it if that's the case.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.