-
Notifications
You must be signed in to change notification settings - Fork 19.6k
[Bounding Boxes] Add Support for Bounding Box Transformations during Image Resizing #20368
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
442b63f
bounding box utils base
sineeli 0052cd0
add missing args and correct api call
sineeli 58b60aa
add support for diff formats
sineeli ded742f
function name correction
sineeli a67f39c
use common methods
sineeli be3ebe5
add missing args for existing bounding box transformation methods
sineeli c5457af
use `get_random_transformation` for input height and width.
sineeli 3332d01
Correct single bounding box transform input and output format
sineeli ee349f4
handle when pad_to_aspect_ratio is False
sineeli 329f562
use clip for bounding box transformation and correct the dtype while …
sineeli 77093cf
corrrect key for labels
sineeli cc1ae80
correct the stacking of boxes
sineeli a05d0ca
nit
sineeli 07a5367
correct box transformations
sineeli cb89803
handle without aspect ratio
sineeli 01df3a0
only pad to aspect ratio is handled as of now
sineeli 48f8e16
handle crop to aspect ratio flag for bboxes transformation
sineeli 47a1097
Add test cases where and simplify the bbox transform function
sineeli fcd13c2
fix test cases for torch channels first
sineeli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
keras/api/_tf_keras/keras/utils/bounding_boxes/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"""DO NOT EDIT. | ||
|
||
This file was autogenerated. Do not edit it by hand, | ||
since your modifications would be overwritten. | ||
""" | ||
|
||
from keras.src.layers.preprocessing.image_preprocessing.bounding_boxes.converters_new import ( | ||
affine, | ||
) | ||
from keras.src.layers.preprocessing.image_preprocessing.bounding_boxes.converters_new import ( | ||
clip_to_images, | ||
sineeli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
) | ||
from keras.src.layers.preprocessing.image_preprocessing.bounding_boxes.converters_new import ( | ||
convert_format, | ||
) | ||
from keras.src.layers.preprocessing.image_preprocessing.bounding_boxes.converters_new import ( | ||
crop, | ||
) | ||
from keras.src.layers.preprocessing.image_preprocessing.bounding_boxes.converters_new import ( | ||
pad, | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"""DO NOT EDIT. | ||
|
||
This file was autogenerated. Do not edit it by hand, | ||
since your modifications would be overwritten. | ||
""" | ||
|
||
from keras.src.layers.preprocessing.image_preprocessing.bounding_boxes.converters_new import ( | ||
affine, | ||
) | ||
from keras.src.layers.preprocessing.image_preprocessing.bounding_boxes.converters_new import ( | ||
clip_to_images, | ||
) | ||
from keras.src.layers.preprocessing.image_preprocessing.bounding_boxes.converters_new import ( | ||
convert_format, | ||
) | ||
from keras.src.layers.preprocessing.image_preprocessing.bounding_boxes.converters_new import ( | ||
crop, | ||
) | ||
from keras.src.layers.preprocessing.image_preprocessing.bounding_boxes.converters_new import ( | ||
pad, | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.