dali_backend icon indicating copy to clipboard operation
dali_backend copied to clipboard

multi-ROI cropping on a single image

Open xiazi-yu opened this issue 1 year ago • 2 comments

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 avatar Oct 24 '24 02:10 xiazi-yu

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.

mzient avatar Oct 24 '24 07:10 mzient

@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?

xiazi-yu avatar Oct 24 '24 10:10 xiazi-yu