DIAGNijmegen / pathology-hooknet-tls

MIT License
10 stars 2 forks source link

creating input files and output interpretation #12

Open Michael-Geuenich opened 1 month ago

Michael-Geuenich commented 1 month ago

Hi, thanks for creating this tool!

I have a few questions about how to create the input files and what the output represents:

  1. I understand I should convert TCGA .svs files to .tif using this script: https://github.com/DIAGNijmegen/pathology-whole-slide-data/blob/main/scripts/save_image_at_spacing.py and that the output tif should contain at least two levels with spacings of 0.5µm and 2.0µm. I've managed to run the script, however, it looks like I can only set one value for the spacing parameter at a time. I've managed to create two files one with a spacing of 0.5 and another with 2 - do these need to be combined manually?
  2. I managed to create a mask using the method hosted by grand challenges using the original .svs file. Is this the correct way to go about it or does the mask also need to be created with the converted tif file as well?

I've somehow managed to run hooknettls with one of the converted .tif files. I was wondering if a few more details on the outputs are available? E.g. what do the results in filtered post-processed and raw represent? Same question for the output .tif files.

Thank you!

martvanrijthoven commented 2 weeks ago

Dear Michael-Geuenich,

Thank you for your interest in Hooknet-TLS and sorry for my late response!

  1. You should use 0.5µm for the spacing parameter. The script will create a dense pyramid including 2.0µm
  2. Yes creating a mask from the original svs should work.

The model outputs intermediate results, but the files in post-processed are the final predictions.

Please let me know if you have any further questions

Best wishes, Mart

Michael-Geuenich commented 2 weeks ago

Thanks for the clarification @martvanrijthoven !

I've ran your model over a TCGA slide I know contains TLS, unfortunately the xml file in the post-processed folder comes up empty with no TLS detected. Could you share the slide ID of a TCGA sample that is positive for TLS that was also used during training for me to use as a positive control to ensure my setup is correct?

Thank you, Michael

Michael-Geuenich commented 2 weeks ago

Nevermind, I found the zenodo repository with annotations. I took the following slide TCGA-56-A62T-01Z-00-DX1.05B9E747-DF22-4FFB-A79A-C023AB667CA0.svs and uploaded as is to the grand challenges website to get the tif mask.

I then ran the following commands

python ../pathology-whole-slide-data/scripts/save_image_at_spacing.py -i 'data/svs/TCGA-56-A62T.svs' -s 0.5 -t 'output/tmp/' -o 'output/data/tif/'

and

python3 -m hooknettls hooknettls.default.image_path='output/data/tif/TCGA-56-A62T.tif' hooknettls.default.mask_path='data/masks/TCGA-56-A62T/3bbd3cd3-b027-475d-b93a-a7b038c0cddb.tif'

Unfortunately the output is also empty - any suggestion on how to proceed?

Thank you, Michael

martvanrijthoven commented 2 weeks ago

Dear Michael,

It sounds like you are doing everything correct. Could you please send me the input tif file and the input mask (to: mart.vanrijthoven@gmail.com). Then I will check what is going wrong.

Best wishes Mart