Check volume difference metric

Check volume difference metric  

  By: 89douner on Aug. 16, 2022, 2:18 a.m.


I'd like to notice you that there is code you should check.

But, I found some error code. I think it should change from "truth_vol = np.sum(prediction)" to "truth_vol=np.sum(truth)".

def volume_difference(truth, prediction, batchwise=False): ''' Computes the total volume difference between the prediction and ground truth. ---------- prediction : np.array Array containing the prediction. truth : np.array Array containing the ground truth. batchwise : bool Optional. Indicate whether the computation should be done batchwise, assuming that the first dimension of the data is the batch. Default: False. Returns ------- float or tuple ''' if(not batchwise): pred_vol = np.sum(prediction) truth_vol = np.sum(prediction) return np.abs(pred_vol - truth_vol) else:

It may be not problem (because the score is shown on leaderboard). But, The host should check this.

 Last edited by: 89douner on Aug. 15, 2023, 12:57 p.m., edited 8 times in total.

Re: Check volume difference metric  

  By: ahutton on Aug. 16, 2022, 6:22 a.m.

Thanks for the report; it's been fixed. That bit of code doesn't get executed with our settings (batchwise is always True), so it didn't affect the scoring.