Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PREPROCESSING OF CAMELYON16 DATASET USING CLAM #21

Closed
routsourav1729 opened this issue Apr 19, 2024 · 4 comments
Closed

PREPROCESSING OF CAMELYON16 DATASET USING CLAM #21

routsourav1729 opened this issue Apr 19, 2024 · 4 comments

Comments

@routsourav1729
Copy link

Hi, i was trying to reproduce the results u have shown with CAMELYON 16 dataset. i have used the configuration u have provided in 0-extract_patches to run with create_pathes_fp.py

seg_level,sthresh,mthresh,close,use_otsu,a_t,a_h,max_n_holes,vis_level,line_thickness,white_thresh,black_thresh,use_padding,contour_fn,keep_ids,exclude_ids
-1,8,7,4,TRUE,25,4,8,-1,100,5,50,TRUE,four_pt,none,none

but i am getting around 1200 patches at level 1 compared to 5771 reported in the paper. and similarly for level 2 i got 400 images compared to 1528 as mentioned in paper. am i doing something wrong? do i need to change he config file?

also i think the CLAM repo is modified so i am getting some error while using convert_h5_to_jpg.py with CLAM. can u look into that and help me?

@routsourav1729
Copy link
Author

routsourav1729 commented Apr 19, 2024

is this the correct command to get patch level 1(20x) .h5 coordinates?:
python create_patches_fp.py --source /home/thomas/mil4wsi/dataset/CAMELYON16/images --save_dir /home/thomas/mil4wsi/dataset/CAM16_PREPROCESS --patch_size 256 --patch_level 1 --preset camelyon.csv --seg --patch --stitch

similarly i am just using patch level 2 and 3. and at patch level 3 each iamge has just 113 patches

@Bontempogianpaolo1
Copy link
Collaborator

I see... I might have used the combination 0,1,2 instead of 1,2,3. To resolve this doubt, we can visually compare the patches I have with those you have. The cell nucleus (the black dots so to speak) are typically all the same size (30-50 nm). So just compare whether the space they occupy is similar or not.

Slide 001 ( not tumor)
x5
0_x_42368_y_94720

x10
0__x_40320_y_93696

x20
0__x_40832_y_93696

@routsourav1729
Copy link
Author

yes the patches seems to be of similar scale but my initial patch are different from these. there might be some other issue. One more thing to note that i think CLAM repo is updated with a slightly different dataset_h5.py code. so i have used the new code to extract h5 cordinates but an older repo which matches your code for convert_h5_to_jpg.py ro convert .h5 coordinates into jpg. they have changed the code for Whole_Slide_Bag_FP class in dataset_h5.py. can u look into it.

@Bontempogianpaolo1
Copy link
Collaborator

Hin @routsourav1729,
I see. If your resolution is identical to mine with fewer patches, the signal could be more evident, and you could also obtain better results. So I wouldn't worry about that; check CLAM-generated segmentation masks to preprocess WSIs efficiently.

I have checked the current implementation of CLAM, but nothing unusual is happening. Could you tell me the commit of CLAM where it worked? In that case, I would refer to it in the readme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants