How does tf.keras.metrics.IoU calculate mean for 3D?

Hi!

I have a question about the tf.keras.metrics.IoU function…

How does it calculate the mean IoU when using a 3D volume as input? Does it do a mean of each individual slice (2D image) and then the mean for the whole 3D volume from those, or does it change the whole volume to one big 1D array and outputs a mean of this 1D array?

Hi @iredena

You can use the MeanIOU metric for the 3D segmentation task. This involves calculating the IoU score for each class and averaging the individual scores.

Please refer to the given link for more detail on the metric. Thank you.

1 Like