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

Keeping aspect ratio with CropAndResize Plugin #4271

Open
MaximeDebarbat opened this issue Dec 5, 2024 · 3 comments
Open

Keeping aspect ratio with CropAndResize Plugin #4271

MaximeDebarbat opened this issue Dec 5, 2024 · 3 comments
Assignees
Labels
Plugins Issues when using TensorRT plugins triaged Issue has been triaged by maintainers

Comments

@MaximeDebarbat
Copy link

Hi,

I'm looking for a way to keep the aspect ration with the plugin CropAndResize (yolo style):
https://github.com/NVIDIA/TensorRT/blob/release/10.6/plugin/cropAndResizePlugin/cropAndResizePlugin.cpp

I tried to create a custom torch model which would do this padding but it's unsuccessful for now.
Any help would be greatly appreciated!

Cheers

@lix19937
Copy link

lix19937 commented Dec 6, 2024

You can ref tf.image.crop_and_resize.

@asfiyab-nvidia
Copy link
Collaborator

cc @venkywonka for additional comment

@asfiyab-nvidia asfiyab-nvidia added Plugins Issues when using TensorRT plugins triaged Issue has been triaged by maintainers labels Dec 16, 2024
@venkywonka
Copy link
Collaborator

venkywonka commented Dec 17, 2024

Hi @MaximeDebarbat , thank you for taking the time to create the github issue. Could you provide more details on which specific part of the plugin you're facing problem with?
Is the plugin now working as expected in your setup?

I tried to create a custom torch model which would do this padding but it's unsuccessful for now.

I'm afraid I don't understand how this might be related to the plugin. You mean the above was the alternative you tried?
Thank you @lix19937 for help. @MaximeDebarbat have you tried @lix19937 's suggestion?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Plugins Issues when using TensorRT plugins triaged Issue has been triaged by maintainers
Projects
None yet
Development

No branches or pull requests

4 participants