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

Implementation of a Square Padding Preprocessor for Object Detector Inputs #2130

Closed
f4str opened this issue May 2, 2023 · 0 comments · Fixed by #2138
Closed

Implementation of a Square Padding Preprocessor for Object Detector Inputs #2130

f4str opened this issue May 2, 2023 · 0 comments · Fixed by #2138
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@f4str
Copy link
Collaborator

f4str commented May 2, 2023

Is your feature request related to a problem? Please describe.
Follow-up on #2082 where the YOLOv3 and YOLOv5 estimators supported in PyTorch require images to be shaped accordingly in an appropriate size (e.g., 416x416). Prior to resizing the images and bounding boxes, they also need to be padded to a square shape in order to preserve the aspect ratio. Therefore, in addition to the resizing preprocessor, a square padding preprocessor will also be created. This will work for both classification and object detection classes where the bounding boxes are adjusted accordingly.

Describe the solution you'd like
In the new module art.preprocessor.image will, this square padding preprocessor will be implemented. This preprocessor object will be instantiated to pad all images to a square shape based on the current height and width and shift the bounding boxes by the padding. This preprocessor will be compatible with both classification and object detection with the only difference being that it will adjust bounding boxes if they are provided.

Describe alternatives you've considered
Similar to the in-progress resizing preprocessor, this square padding preprocessor can be implemented directly under art.preprocessing, but creating the image submodule will help future-proof for any additional non-EOT preproccesord that will be implemented.

Additional context
This issue will also be worked on in conjunction with #2082

@beat-buesser beat-buesser added the enhancement New feature or request label May 3, 2023
@beat-buesser beat-buesser added this to the ART 1.15.0 milestone May 3, 2023
@beat-buesser beat-buesser linked a pull request May 8, 2023 that will close this issue
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants