Sliding windows with tile overlap

Sliding windows with tile overlap  

  By: nicole.bussola on May 3, 2022, 1:12 p.m.

Dear Organizers,

we are having problems using wholeslidedata to write the tiff masks for L1; in particular, it appears that the size of the tiles must be a multiple of 16, which is not optimal for our pipeline. To overcome this issue, we were wondering if it is possible to create tiles using sliding windows with overlap using the create_batch_iterator function?

Best Snowcats

Re: Sliding windows with tile overlap  

  By: mart.vanrijthoven on May 4, 2022, 8:47 a.m.

Dear Snowcats,

I made a notebook to show you how to use a sliding window approach with overlap using the wholeslidedata package. In this example, I used a sliding window of 256x256 and a patch size of 512x512 so that the overlap would be 256x256. I also added comments in the config file. I hope this helps to understand better what is going on. In any case, this is one of the more complex features of wholeslidedata. So please let me know if anything is unclear.

The example will show how to create a batch iterator that produces tiles in a sliding windows fashion with overlap. However, please note that the ASAP software requires the restriction of tiles having to be a multiple of 16. So even with this sliding window approach, your tiles should be a multiple of 16. Furthermore, you can only write at multiples of the tile size, i.e., if your tile size is 256x256 and you would write to 257,257, it will clip to 256x256.

Best wishes, Mart

Re: Sliding windows with tile overlap  

  By: nicole.bussola on May 6, 2022, 8:25 a.m.

Dear Mart,

thank you very much for your notebook, it was very helpful and it solved our issue.

Best

Snowcats