Size mismatch error while submissions

Size mismatch error while submissions  

  By: shirshak.acharya on July 17, 2024, 1:43 p.m.

Hello! I didn't know earlier, we had to download images manually for testing and then run the docker container. What I thought was, the image would be added automatically and we only had to provide our container and not images.... Well, I have resolved that error. by first downloading inference images: 101.mha, 102.mha, 107.mha, then finally fit them in path and RUN test.sh code and finally made the docker image file. But Now, From this code from this link:

https://github.com/YzzLiu/PENGWIN-example-algorithm/blob/main/PENGWIN-challenge-packages/preliminary-development-phase-ct/inference.py

In line number 59

result = SimpleITK.ReadImage(input_files[0])

We just see that only first image is given. When we compute the segmentation for first image, it will match shape with the 1st image.... But, since we are only passing the 1st image, when algorithm tries to compute segmentation for 2nd and 3rd image, the size of segmentation and image will differ as the segmentation we get will be from first image : as we just provided 1st input as : input_files[0] So, because of that only first image size is matched, and remaining 2 image size is mismatched.... Since, we are just saving our file as output.mha, even though I run loop, and try to cover all three images, the final output of first two images will be overridden by third image. How to resolve? Any ideas?

Re: Size mismatch error while submissions  

  By: YSang on July 18, 2024, 1:31 a.m.

Hi,

  1. Participants should not include the images, whether training or testing cases, into their containers. The images will be loaded automatically through docker volumes. This is done in test_run.sh line 44 when you try to run your container locally. The similar thing will be done when your container is run on the GC platform by their scripts. Volumes are a mechanism for storing data outside containers. To know more about how volumes work, please check https://docs.docker.com/storage/volumes/

  2. Your container will be run multiple (3 for task 1 development phase) times independently, each time on a single case. Each time it will read the ONLY mha file in the dedicated folder (through a docker volume). So the input_files[0] will give you the correct file path. And you can then make sure the spacing and size of your output segmentation mha is the same as the input.

Best,

Yudi

 Last edited by: YSang on July 18, 2024, 1:39 a.m., edited 1 time in total.

Re: Size mismatch error while submissions  

  By: shirshak.acharya on July 19, 2024, 12:09 p.m.

Thank you! I finally understand what you meant! I could successfully submit my predictions, but now i think my model needs more refining....