KatherLab / HIA

Histopathology Image Analysis
90 stars 17 forks source link

Structure of BLOCKS directory #5

Open jacksonjacobs1 opened 2 years ago

jacksonjacobs1 commented 2 years ago

Hello, It's unclear to me based on the README how tiles should be stored inside the BLOCKS directory. My current directory structure is the following:

-data
     - BLOCKS
          - 00_(0,0).png
          - 00_(0,256).png
          - ...
          - 99_(3584,3584).png
     - data_CLINI.xlsx
     - data_SLIDE.csv

I am getting the following error. Is there something wrong with the way I've structured my data?



TORCH Detected: cuda

------------------------------

./EXPERIMENTS/SYNTH_CLAM_TRAINFULL_isCancer_1

LOAD THE DATASET FOR TRAINING...

LOADING DATA FROM /data/jjj72/projects/HIA/data/BLOCKS...

Remove the NaN values from the Target Label...

0 Patients didnt have the proper label for target label: isCancer

Data for 0 Patients from Clini Table is not found in Slide Table!

Data for 0 Patients from Slide Table is not found in Clini Table!

------------------------------
  0%|                                                                                       | 0/100 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "Main.py", line 35, in <module>
    Classic_Training(args)
  File "/home/jjj72/projects/HIA/Classic_Training.py", line 57, in Classic_Training
    patientsList, labelsList, args.csvFile = ConcatCohorts_Classic(imagesPath = args.datadir_train, 
  File "/home/jjj72/projects/HIA/utils/data_utils.py", line 326, in ConcatCohorts_Classic
    if not len(os.listdir(slideName)) <= minNumberOfTiles:
NotADirectoryError: [Errno 20] Not a directory: '/data/jjj72/projects/HIA/data/BLOCKS/00_(0,0).png'```
jacksonjacobs1 commented 2 years ago

I solved my problem by following the data protocol specified in the document linked below. @narminGhaffari would it be possible to link to that document directly in the HIA readme? I think that would have avoided some confusion on my part.

https://zenodo.org/record/3694994

wangxinghangcnn commented 1 year ago

我按照下面链接的文档中指定的数据协议解决了我的问题。是否可以直接在 HIA 自述文件中链接到该文档?我认为这样可以避免我的一些混乱。

https://zenodo.org/record/3694994

Hello, I have encountered a similar situation as you and have carefully reviewed your link, but still have not found a solution. Can you please show me your BLOCKS subdirectory, CLINI and SLIDE files? By the way, I am using the CAMELYON16 dataset. Do you have any advice for me? Thank you very much!