core-bioimage-io-python icon indicating copy to clipboard operation
core-bioimage-io-python copied to clipboard

Better documentation for prediction functions

Open Buglakova opened this issue 2 years ago • 0 comments

Hello.

It is hard to understand from code, what is the difference between predict_with_tiling and predict_with_padding and what parameters mean.

From searching the repo, trying things and talking to Constantine I figured that predict_with_tiling takes as the description of tiling a dictionary with two parameters "halo" and "tile" like this:

{"tile": {"x": 512, "y": 512, "z": 16},
"halo": {"x": 16, "y": 16, "z": 2}}

where keys in the dictionary should correspond to named axes of the input xarray. Prediction is done on the tile size and then cropped by halo:

ttttttttttttttttttttttttttttttttttttttttttttt
hhhh-------------------------------------hhhh

If there are several tiles, overlap is halo * 2 along given axis:

tttttttttttttt
----------hhhh
       ssssssssssss
       hhhh----------

Would be good to have something like this in documentation for both prediction functions.

Buglakova avatar Sep 13 '22 13:09 Buglakova