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
Obtained Mismatching Reproducing Results #10
Comments
Hi Vivian, It seems that you directly resized the original images and labels to 384x384 for network training. The fundus data released by Fundus contains the center-cropped samples we used on the four datasets. Please try using these released datasets. Best, |
Hi Quande, Thank you for your reply. Yes, the data I used is downloaded from the DoFE repository provided, and the download link I used is in its "Usage" part, as is in the picture below. The provided link in DoFE refers to this. Besides, I did not find any other released dataset in DoFE. And I double checked that in domain 1 and 2 the images seem to be center-cropped (while they are not square-shape in resolution), but in domain 3 and 4 they don't. I would be grateful if you could provide with further suggestions. Thank you very much! Best, |
Hi, can you please share with me the code you use to organize your datasets? Thank you |
Hello Liang |
Dear Quande,
Thank you for your time, and I modified the data-preparation step as you explained in previous issue #8 . However, sorry to report that, I still could not obtain the approximate Dice scores as is reported in the paper.
I tried several times under different data pre-processing methods. Below is the description of my modifying.
At first, The only python files that I edited myself is the prepare_dataset.py.
I resized the input images and labels (except domain 2) to 384*384. After that, the image data was converted to numpy array. Their amplitudes were extracted using the provided extract_amp_spectrum function in prepare_dataset.py.
The label mask was split into 2 masks, Disc and Cup. Pixels with gray level 255 are set 0 as background, gray level 128 and 0 are set 1 in each Disc and Cup masks as foreground. After all the steps above, the final numpy file stored is organized as [image_np, disc_mask_np, cup_mask_np], with size [384, 384, 5]. The image data are kept the original 3 channels, and the 2 masks are binary arrays.
For Domain 2, at the beginning, I cropped each image from Domain 2 into 2 individual samples that share the same label mask. The label mask I used is cropped from the left half side of the raw mask. Therefore, numbers of samples of each domain become 101, 318, 400, 400, respectively.
To prove that I have correctly modified the prepare_dataset.py, here are some examples of Disc's and Cup's background and contour, that are extracted as the original code did.
Original:
Modified:
Original code:
Modified code:
To prove that all the modifying steps are correct, below reveals the raw and transformed images.
The Dice score of Discs after training for 100 epoches are reported in the following table. "1, 2, 3" refers to the modifying steps above, along with their corresponding combinations.
I only trained once for each situation, but obviously the performance I reproduced is much worse than that was reported in paper, about which I got quite confused. As the data preparation steps are absent in the provided code, I am sincerely seeking for your help in checking my preparation steps.
Another question is, I did not observe any difference in treating data from domain 2 comparing to other domains, from the code provided. If 2 views are generated from a single image in domain 2, as is explained in issue #8 , the aggregating weight should be depending on [101, 318, 400, 400], but in line 63 of train_ELCFS.py the number is still [101, 159, 400, 400]. If the 2 views are stored in a single .npy file, then bugs would be raised in code below, from line 37~45 in fundus_dataloader.py because of changes in numpy array size.
Thank you for your time. I was greatly inspired by your contribution, and I sincerely hope that a satisfactory result could be reproduced. I feel sorry if I have made any mistake, and please do not hesitate to point it out.
Thank you very much!
Best,
Vivian
The text was updated successfully, but these errors were encountered: