-
Notifications
You must be signed in to change notification settings - Fork 97
[torchlib] Migrate torchvision implementations #2569
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
Conversation
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2569 +/- ##
==========================================
+ Coverage 70.11% 70.18% +0.07%
==========================================
Files 228 228
Lines 27396 27421 +25
Branches 2785 2786 +1
==========================================
+ Hits 19208 19245 +37
+ Misses 7228 7217 -11
+ Partials 960 959 -1 ☔ View full report in Codecov by Sentry. |
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.
Pull Request Overview
This PR migrates torchvision implementations by adding support for roi_align and roi_pool operations to the torch_lib vision module. The changes enable ONNX export compatibility for these computer vision operations commonly used in object detection models.
- Adds
torchvision::roi_alignimplementation with proper coordinate transformation and sampling ratio handling - Adds
torchvision::roi_poolimplementation using ONNX MaxRoiPool operator - Updates existing
torchvision::nmsoperation to be trace-only
|
Where do we migrate this from? Was there a test we can move to here as well? |
|
Adapted from https://github.com/pytorch/vision/blob/main/torchvision/ops/_register_onnx_ops.py. There are some tests we can move over too |
Adapted from https://github.com/pytorch/vision/blob/main/torchvision/ops/_register_onnx_ops.py. Also migrated tests.