-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Transforms with nested tensor #7761
Comments
Hello @agunapal this is quite interesting! This will be a part of transforms right? |
If this is possible, yes.. this would need to be supported by transforms to handle pre-processing bottleneck in inference |
Hi @agunapal , thanks for the feature request. I understand that in general, processing input in batches makes the transforms faster. And I also acknowledge that passing batches of images to Resize is pretty much impossible as-is, because.. well, we can't batch images of different sizes. So that's where NestedTensor comes in, as it provides a nice UX to manipulate tensors of different sizes. But unfortunately, I'm afraid NestedTensor won't help regarding perf. There aren't a lot of Regarding the UX: I tried to see if our V2 transforms could natively support NestedTensor. It's pretty much the same story as for TensorDict (#7763): NestedTensor don't integrate too well with (Thinking about all this made me open #7774, which is partially related to what you want to do. But I still don't fix it will be a silver bullet, sorry :/ ) |
🚀 The feature
For batched inference on images of different sizes, we need to do the following
It would be nice to do the following instead
Motivation, pitch
This would result in improved performance for image pre-processing
Alternatives
Additional context
No response
The text was updated successfully, but these errors were encountered: