metadata is None?

metadata is None?  

  By: JasonMendoza2008 on April 2, 2024, 2:37 p.m.

I tried to upload the template docker and I have this error:

2024-04-02T14:34:31.236000+00:00 Traceback (most recent call last):
2024-04-02T14:34:31.236000+00:00   File "/opt/app/inference.py", line 97, in <module>
2024-04-02T14:34:31.236000+00:00     raise SystemExit(run())
2024-04-02T14:34:31.236000+00:00   File "/opt/app/inference.py", line 49, in run
2024-04-02T14:34:31.236000+00:00     description = xmltodict.parse(metadata)
2024-04-02T14:34:31.236000+00:00   File "/home/user/.local/lib/python3.10/site-packages/xmltodict.py", line 378, in parse
2024-04-02T14:34:31.236000+00:00     parser.Parse(xml_input, True)
2024-04-02T14:34:31.236000+00:00 TypeError: a bytes-like object is required, not 'NoneType'

It seems that: image_input, metadata = read_image( join(transmitted_light_path, input_file_name) )

returns a None object for metadata.

I would assume the template provided works, so maybe there is something wrong with the example image on the website? Is this normal? I ran it on Input 1 084 (.tiff)

 Last edited by: JasonMendoza2008 on April 2, 2024, 2:39 p.m., edited 2 times in total.

Re: metadata is None?  

  By: dorian_kauffmann on April 2, 2024, 3:59 p.m.

Hi,

All the images have their associated metadata (I've checked again just before replying - with BioFile and tifffile/xmltodict).

Have you only this logs ? What is Input 1 084 (.tiff) ? I've tried to understand your 'error' and it doesn't seem to be on our side.

Did you change something in the read_image function (below the run() ) ?

Re: metadata is None?  

  By: JasonMendoza2008 on April 2, 2024, 5:59 p.m.

I went to "Try-out Algorithm" (did not change anything from your submission Template, I'm just trying out the submission process).

I selected "Select an existing image".

I selected this image: https://i.imgur.com/OvbohL0.png

Then submit.

And I don't get anything else in the stderr.

In the stdout I have, there is: 2024-04-02T14:50:30.850000+00:00 --> Predict b3efb182-4f33-4766-b8a9-e0070a119e6c.tiff

EDIT: Weirdly enough when I don't use one of the images of the website but one that I downloaded through the studies you provided to us, it works.

 Last edited by: JasonMendoza2008 on April 2, 2024, 6:15 p.m., edited 4 times in total.

Re: metadata is None?  

  By: dorian_kauffmann on April 2, 2024, 6:53 p.m.

I think I understand what's happened as it works locally.

The image on the website you chose is not part of our Phase 1 test dataset.
Indeed, when you go to "Try-out-Algorithm", you can choose any public image on Grand Challenge (or an image to which you have access), and you can also load a local image for "Try-out" (then load one of your validation set for example).
But, this is not a submission on the Light My Cells phase 1 dataset. To test on this dataset, you must submit your algorithm.

In other words, as Grand Challenge organizes different challenges, the image you've chosen appears to have no metadata. So, as our images have and need metadata, this leads to an error.

And just to clarify, a submission is taken in account only when it succeeds.

Let me know how it goes,
Best,
Dorian

Re: metadata is None?  

  By: JasonMendoza2008 on April 3, 2024, 6:28 a.m.

Oh I thought the images pre loaded on the website were yours, it makes sense now. Again thanks for the quick responses.