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.04k stars 346 forks source link

"--patch" in create_patches.py and create_patch_fp.py #151

Closed luojing1030 closed 1 year ago

luojing1030 commented 1 year ago

Thank you for your great work. when I use the parameters "--patch" in running create_patches.py or create_patches_fp.py, (i want to save the patches),there emerging the error: the error is about the wholeSlideImage.py, for create_patch_fp.py, "line 374, n_contours = len(self.contours_tissue, TypeError:object of type "NoneType has no len()" ; for create_patch.py, "line 243,contour_holes = self.holes_tissue, AttributeError:'WholeSlideImage' object has no attribute 'holes_tissue', and another error, "line 248, for idx. cont in enumerate(contours): TypeError:'NoneType' object is not iterable. could you tell me how to solve it.

MohammedHAlali commented 1 year ago

Maybe the path to the svs files contains no files. So the in create_pathces_fp.py is reading nothing, hence giving an error of: NoneType

siemdejong commented 9 months ago

How did you solve this issue? I experience the same. The provided directory path does contain files in my case.

siemdejong commented 9 months ago

Never mind. The preset used didn't work for me, resulting in no contours. I had to provide my own preset for patching.