YoloDotNet Tiling and Async

Hello everybody,
I want to use VL.YoloDotNet for segmentation with a camera input that has a really wide format. To achieve a high resolution for the segmentation masks the idea would be to run the segmentation model multiple times on several tiles cropped from the input image. This works as expected, when running everything on the main loop (but slow of course). But when I use the async version of YoloSegmentation I have the problem that the different Yolo instances are constantly switching between the different image tiles.
So that for example if I feed in the right and the left half of an image inside a for each loop they keep swapping sides.
A bit hard to explain, but I attached a patch, that should demonstrate it.

Can anybody maybe point me into the right direction if this is rather a Skia problem with copying and cropping the input image or if I would have to manage the internal Yolo task differently to run it multiple times in parallel.

SegmentationTiling.zip (389.9 KB)

Hello Maxs,
I’m not sure I understand what you mean, but you’re offsetting tiles by 250 pixels, and the tile size is 512 pixels, so they are overlapping.

When you draw segmentation, you draw the mask on an image that has the same size as the uncropped image.

You can check every tile with decons:

But working on tiles doesn’t give you any performance improvement. YoloAsync nodes are there only to decouple the main loop from the detection task, and performance is proportional to the amount of pixels that you want analyze. YoloDotNet objects use GPU acceleration (when available) and parallelization.

DS