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

multi-ROI cropping on a single image #257

Open
xiazi-yu opened this issue Oct 24, 2024 · 2 comments
Open

multi-ROI cropping on a single image #257

xiazi-yu opened this issue Oct 24, 2024 · 2 comments
Assignees

Comments

@xiazi-yu
Copy link

xiazi-yu commented Oct 24, 2024

I want to use DALI to implement multi-ROI cropping on a single image, while also performing padding to maintain the aspect ratio for subsequent use with YOLOv8. How should I proceed, ensuring that the operation can be completed in one go?

@xiazi-yu xiazi-yu changed the title I want to use DALI to implement multi-ROI cropping on a single image, while also performing padding to maintain the aspect ratio for subsequent use with YOLOv8. How should I proceed, ensuring that the operation can be completed in one go? multi-ROI cropping on a single image Oct 24, 2024
@mzient
Copy link
Collaborator

mzient commented Oct 24, 2024

Hello @xiazi-yu

The possibilities in DALI are rather limited, but some workarounds exist assuming, that you can live with:
a) crops with different position, but same size
b) crops are subsequently resized to a common size.
See this DALI issue which explores the similar problem and possible solutions. Unfortunately, not all of them are usable in Triton.

As a side-note, I think this issue is more suited to the DALI project itself than Triton's dali_backend.

@xiazi-yu
Copy link
Author

@mzient
Thank you for your response. I've seen that example, but it only outputs fixed sizes, and the targets get distorted. YOLOv8's image input requires padding operations to maintain the aspect ratio. Do you have any better solutions, such as using DALI plugins or Triton's C++ backend?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants