Error in Eval Execution

Error in Eval Execution  

  By: omkar on May 30, 2023, 4:13 p.m.

After submitting zip file containing both predictions(0_human_instance_seg_pred.h5 and 1_rat_instance_seg_pred.h5) I am getting error ,

Failed Exception: Could not read human matching output file: /opt/evaluation/human_out/human/matching_metrics.csv

Can you please help me in it ASAP.

Re: Error in Eval Execution  

  By: natbutter on Nov. 19, 2023, 9:50 a.m.

I am getting the same error. I assume the format of my submission file(s) is incorrect?

I am taking a stack of tiff masks and making two h5 files (for Rat and Human) and zipping them together. Am I missing something in the post processing? Here is the code I use to go from tiff to h5 (for rat, human is similar but different size array):

import os
import h5py
import numpy as np
import tifffile as tiff

# Folder of binary tiff masks, im0500_pred.tif, im0501_pred.tif, ..., im0999_pred.tif
tiff_dir = "./EM30-R/PREDICTIONS/"

# Output filename
h5file_name = '1_rat_instance_seg_pred.h5'

# Gather all the tiff masks
tiff_files = [f for f in os.listdir(tiff_dir) if f.endswith(".tif")]
tiff_files.sort()

# Initialize a numpy array to store the data
volume = np.zeros((500, 4096, 4096), dtype=np.uint8)

# Iterate through TIFF files and populate the np array
for i, tiff_file in enumerate(tiff_files):
    tiff_data = tiff.imread(os.path.join(tiff_dir, tiff_file))
    volume[i, :, :] = tiff_data

# Downsmaple volume
volume = volume[:,::2,::2]

# Create the HDF5 file (using LZF compression to save space)
h5f = h5py.File(h5file_name, 'w')
h5f.create_dataset('dataset_1', data=volume, compression="lzf")
h5f.close()

Any guidance would be much appreciated, thanks!

 Last edited by: natbutter on Nov. 19, 2023, 9:52 a.m., edited 2 times in total.

Re: Error in Eval Execution  

  By: danifranco on Nov. 23, 2023, 10:25 a.m.

Hello!

Sorry for the delay, omkar: just realised that you had problems in your submission. The error in your case is a bit strange so, if you don't mind, you can send me your input compressed to the following direction so we can test it offline: daniel.franco@dipc.org .

In your last submission, natbutter, there is mismatch between your input and the GT. I'm talking about the submission id: "46aa42f8-da4a-4094-bc7d-391ce495dc7e". The error is exactly this:

ValueError: Warning: size mismatch. gt: [ 500 4096 4096], pred: (500, 2048, 2048)

The input data needs to be 500x4096x4096 in (z,y,x), as stated in the Evaluation page.

Best,

Dani

Re: Error in Eval Execution  

  By: natbutter on Nov. 29, 2023, 4:51 a.m.

Great, thanks for the clarification. Managed to submit successfully! I was intentionally down-sampling the data and was missing labeling the individual segmentation with:

pred_stack, nr_objects = ndimage.label(volume)

Now I just need to work on my score >_< Thanks!

 Last edited by: natbutter on Nov. 29, 2023, 4:52 a.m., edited 1 time in total.

Re: Error in Eval Execution  

  By: lr5e-5 on Oct. 9, 2024, 8 a.m.

Hi @danifranco,

could you please check what's the problem with my submission from October 8? I get Exception: Could not read rat matching output file: /opt/evaluation/rat_out/rat/matching_metrics.csv

I double checked the shape (500x4096x4096). Dtype is Uint16.

Thank's a lot in advance!

 Last edited by: lr5e-5 on Oct. 9, 2024, 8:01 a.m., edited 1 time in total.