DIAGNijmegen / pathology-hooknet

MIT License
51 stars 10 forks source link

Question about the inference step #12

Closed Dylan-H-Wang closed 2 years ago

Dylan-H-Wang commented 2 years ago

Hi,

Thank you for this awesome work and open sourced code!

I have a question about the inference step which is not mentioned in the original paper (I guess?). Since the HookNet requires two different resolution images as inputs where the target patch is the center part of the context patch, how do you deal with this edge case such that the target patch is located at the "boarder" of the WSI (so that parts of the context patch contains nothing)? So the pixel outside of the WSI will just be 0s?

Thank you for the help and time!

martvanrijthoven commented 2 years ago

Dear Hao Wang (Dylan),

Thank you for your kind words!

Indeed this was not discussed in the paper. I always use 'tissue masks' and often the tissue is not at the border, hence border patches will be skipped in the inference. Still, the context patch can go out of bounds (when using a low magnification (e.g., 8.0um/px). Openslide and ASAP software will just return black pixels in these cases. I have not experienced problems with this approach, however, you might want to consider training with context patches that go out of bounds.

Best wishes, Mart

Dylan-H-Wang commented 2 years ago

Thank you for the quick reply, I really appreciate it! I will try your mentioned methods!