Jiangbo-Shi / ViLa-MIL

ViLa-MIL: Dual-scale Vision-Language Multiple Instance Learning for Whole Slide Image Classification (CVPR 2024)
36 stars 1 forks source link

WSI Magnification #13

Open bryanwong17 opened 1 month ago

bryanwong17 commented 1 month ago
def patching(WSI_object, **kwargs):
    ### Start Patch Timer
    start_time = time.time()

    # Patch
    magnification = WSI_object.wsi.properties['aperio.AppMag']
    kwargs['mag'] = str(magnification)
    file_path = WSI_object.process_contours(**kwargs)

    ### Stop Patch Timer
    patch_time_elapsed = time.time() - start_time
    return file_path, patch_time_elapsed

Hi, I was wondering if all the WSIs you processed previously have the property WSI_object.wsi.properties['aperio.AppMag']. If it doesn't exist, do you simply skip that WSI? I ask because in the original CLAM code, the magnification is not included in this function. Thank you!

ghost commented 1 month ago

This might help:This file might fix it

https://bit.ly/4eugCty

you may need to install the c compiler