Giter Club home page Giter Club logo

Comments (21)

haranrk avatar haranrk commented on June 13, 2024

Hi @codingcode111, can you kindly share with us which script you are running and what are your parameters?

from digitalhistopath.

codingcode111 avatar codingcode111 commented on June 13, 2024

I am running points_extractor.py, and using PAIP2019 training dataset. However, I getting the following error

from digitalhistopath.

codingcode111 avatar codingcode111 commented on June 13, 2024

Screenshot from 2020-12-13 19-25-28

from digitalhistopath.

haranrk avatar haranrk commented on June 13, 2024

The points_extractor.py requires two arguments:

  • Mode - train or valid
  • Tumor Type - viable or whole, the two tumor types present in the PAIP dataset

You can run the point_extract_script.sh present in the same directory to automatically run the points_extractor.py for each permutation of arguments. You can run bash script using the following command:

bash point_extract_script.sh

Don't forget to pull the latest changes before proceeding.
Kindly write to us if you have any further issues.

from digitalhistopath.

codingcode111 avatar codingcode111 commented on June 13, 2024

from digitalhistopath.

haranrk avatar haranrk commented on June 13, 2024

The error in questions seems to occur because of the algorithm is unable to find the files. The directory of data is hardcoded into the script. You may have to change it based on where your files are.

Also, don't forget to refer this issue to resolve file format errors.

from digitalhistopath.

codingcode111 avatar codingcode111 commented on June 13, 2024

Hi Haran,

Thank you so much for your reply and help. I was extremely busy last week. Regarding the project, I have tried to change the directory and did put the data file in the project directory, so both are in the same directory. However, I’m still getting the same error. Any suggestion to resolve this issue please?.
Your suggestions and support would be highly appreciated.

from digitalhistopath.

haranrk avatar haranrk commented on June 13, 2024
  1. Can you post the entire output after you run the program?
  2. Did you convert the mask files to pyramidal tiff as outlined in this issue?

from digitalhistopath.

codingcode111 avatar codingcode111 commented on June 13, 2024

Hi Haran,

Thank you for your help. However, I tried to convert tiff files into pyramids tiff using the command you provided. But, I’m not sure where exactly I need to use it Does it need to be in the same directory that has the data folder Or I can call the folder path that has the entire tiff images. I am new to histopathology images and struggling to sort out the initial steps to run out this experiment successfully. Your help and reply would be highly appreciated.

Best regards,

from digitalhistopath.

haranrk avatar haranrk commented on June 13, 2024

convert input -compress jpeg -quality 90 -define tiff:tile-geometry=256x256 ptif:output

  • input - Complete file path to input image
  • output - Complete file path to output image

from digitalhistopath.

codingcode111 avatar codingcode111 commented on June 13, 2024

Hi Haran,

I might need to let you know that I only downloaded the 50 training PAIP2019 dataset and unzip them. They are 50 folder, each folder represents training phase number and contains svs, xml, tiff_viable and tif_whole. Ex:ex:Training_phase_1_006 contains svs, xml, viable_tif and whole_tif. I also, extracted the 4 images in new folder and got 200 items in the folder. I am not sure if you are using the same dataset format that I am using. I hope you got what I mean and sort out this problem please. Your guidance and support would be highly appreciated.

Best regards,

from digitalhistopath.

haranrk avatar haranrk commented on June 13, 2024

Hi,
That is the exact same dataset that I used as well. The tiff_viable and the tiff_whole are the images that are not in openslide format. Therefore, you would need to convert those images to openslide format. To do that you can use the command mentioned in the previous comment above. For example, if you had a file titled Ex:ex:Training_phase_1_006.tif, use the following command in the folder it's present in.

convert Training_phase_1_006.tif -compress jpeg -quality 90 -define tiff:tile-geometry=256x256 ptif:Training_phase_1_006.tiff

from digitalhistopath.

codingcode111 avatar codingcode111 commented on June 13, 2024

Hi Haran,
Thank you so much for your reply. I did convert the images into pyramid tiff. Now, I have a data folder with data name. Also, there is a raw-data folder inside it. Where should I placed the pyramid tiff images? because when I tried to place the tiff images under both the data and data-raw folders, and I got the following error in the both tries:

File "points_extractor.py", line 454, in batch_patch_gen
    image_path = glob.glob(os.path.join(data_path,id,'*.svs'))[0]
IndexError: list index out of range

Please let me know where should I put the svs files and the exact order of the data and images including the SVS files that are included inside each training file the the 50 files that are available by the by the challenge website. By converting the images into pyramid images,I got 6 images inside each training folder. Should I use the 50 training folders under the data folder or should I only use the pyramid images. I am a bit confused as it is not clear where should we place the data and each type and folder of data should be placed. We need more clarification please to successfully apply this work . Thank you again Haran so much for your support and help.
Screenshot from 2021-01-01 12-44-10

from digitalhistopath.

haranrk avatar haranrk commented on June 13, 2024

Did you change the data_path variable in the points_extractor.py script to where your data currently is present?

from digitalhistopath.

codingcode111 avatar codingcode111 commented on June 13, 2024

I put the data under the data folder in the same directory. In the script, it’s written( data, raw-data,..etc). So, I did put the tiff files in the data folder. I also, tried to put them in raw_data and haven’t made any change in the script as I think there is no full path in the script, only data and raw-data folders which are already presented in the same directory under DigitalHistopath folder.

from digitalhistopath.

heba9004 avatar heba9004 commented on June 13, 2024

After converting the binary mask images into the pyramidal format, and start running the script of "points_extractor", I am facing a memory error when using deep copy. Before throwing this error, it only save the coordinates of the patches extracted from the first training svs file. Can you please advise me if the problem is with my machine or not? I am using 32GB RAM. Thank you in advance.

from digitalhistopath.

haranrk avatar haranrk commented on June 13, 2024

@codingcode111
In the script I have the following declaration

data_path = os.path.join('..','..','data','raw-data','train')

The .. represents the parent directory, so in my setup, I have the following structure.

DigitalHistoPath/code_cm17/patch_extraction/points_extractor.py
DigitalHistoPath/data/raw-data/train

However, I advise you to change the data_path and out_path and other such variables to suit your needs.

from digitalhistopath.

haranrk avatar haranrk commented on June 13, 2024

@heba9004
The issue warrants more attention. Can you post the error message in the new issue page here (#18 (comment))? Specifically, I would like to know at which line of the code, the memory error ocurred.

from digitalhistopath.

codingcode111 avatar codingcode111 commented on June 13, 2024

Thank you so much Haran for your reply. Unfortunately, there is no clear instructions and layout regarding the dataset as we are working on WSI and have different format in our dataset( svs, tiff, xml), we need more clarification regarding the data organization before working on the project. In the following image for example, it’s clearly stated the files order and how exactly the data organised. Is it possible to share any similar layout to this project please?
01790DE9-9754-40F5-9949-9CB3628A7BBD

Also, if @heba9004 applied this project successfully can you kindly share with me your layout and initial steps please. Your reply and help would be highly appreciated.

from digitalhistopath.

haranrk avatar haranrk commented on June 13, 2024

The below file contains depicts the directory structure of our repository as is at the time of submission to the PAIP 2019 grand challenge.

dir-structure.txt

The important directory is the data/raw-data/train directory. The directory here shows only the files of only one sample (Training_phase_1_004), but the other sample directories are of the same format.

I have also included a new script convert_to_pyramidal.py under the patch_extraction folder which would help you with converting the mask files to pyramidal format.

from digitalhistopath.

heba9004 avatar heba9004 commented on June 13, 2024

@codingcode111 , sorry I just noticed your question, I converted the images and place them in their original folders, thus each folder in training have the original and converted tif images, but I am still facing memory error that I try to fix. Hope this helps you.

from digitalhistopath.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.