mahmoodlab / CLAM

Data-efficient and weakly supervised computational pathology on whole slide images - Nature Biomedical Engineering
http://clam.mahmoodlab.org
GNU General Public License v3.0
1.1k stars 360 forks source link

Patch levels #278

Open suminwei opened 9 hours ago

suminwei commented 9 hours ago

Hi, I just wanted to double check how to properly set patch_level and seg_level when running create_patches_fp.py. If I have an svs file with the following pyramid levels: Base (40x), level 1 (10x; 4x downsample), level 2 (1.5x; 16x downsample). What does seg_level=-1 mean in this case for image segmentation? What other possible values could seg_level take on for this file? I understand patch_level=0 means patch extraction will be performed at the highest resolution, in this case 40x. What other values could patch_level take on for this file? Would they be 1and 2 for levels 1 and 2? Thank you!

fedshyvana commented 9 hours ago

Seg level can usually be safely left at -1 yes (it will choose one of the downsampled levels to speed up processing and should not affect the result of patching much). For patch_level, you are right that 0,1,2,3... will each correspond to a pyramid level in your file, with 0 being the highest, 1 being the second highest, etc.

suminwei commented 8 hours ago

Thank you!!