SBU-BMI / wsinfer

🔥 🚀 Blazingly fast pipeline for patch-based classification in whole slide images
https://wsinfer.readthedocs.io
Apache License 2.0
55 stars 9 forks source link

Cleanup + add strided patches #218

Closed kaczmarj closed 4 months ago

kaczmarj commented 4 months ago

The purpose of the PR is to clean up various issues. This PR also adds strided patches (they can be overlapped or spaced apart).

One may use overlapping patches in attempt to smooth out noise. Strided patches with holes may be useful to increase the speed of runtime. If one does not need a dense classification, then strided patches might be useful. An overlap ratio of -1 results results in 4x fewer patches.

Patches spaced apart (overlap=-1)

wsinfer run -m breast-tumor-resnet34.tcga-brca -i slides/ -o outputs-overlap-minus1/ --patch-overlap-ratio -1

image

Patches overlapping by 10% (overlap=0.1)

wsinfer run -m breast-tumor-resnet34.tcga-brca -i slides/ -o outputs-overlap-0.5/ --patch-overlap-ratio 0.5

image

Issues fixed

fixes #216 fixes #214 fixes #205 fixes #203 fixes #202 fixes #195 fixes #185