Skip to content

mt.ResampleToMatch in prediction #5

@maxshatskiy

Description

@maxshatskiy

https://github.com/ClinicalDataScience/datacentric-challenge/blob/main/predict.py
There is a output = mt.ResampleToMatch()(prediction[0], reference[None, ...], mode="nearest") line.
The shapes of the prediction and reference image:
shape of prediction.shape torch.Size([1, 1, 400, 400, 588])
shape of reference[None, ...] torch.Size([1, 400, 400, 588])
shape of output (prediction[0]) torch.Size([1, 400, 400, 588])
shape of gt torch.Size([400, 400, 588])

reference.meta['pixdim'][1:4] [2.03642 2.03642 3. ]

If I do not use this resampling, since I think there is nothing to resample, :
output = prediction[0]
then I get the following results:
{'dice_score': 0.614188644477715, 'fp_volume': 9.318324703216552, 'fn_volume': 0.6469330902099609}
without_resample

If I use resampling as specified:
output = mt.ResampleToMatch()(prediction[0], reference[None, ...], mode="nearest")
results is the following:
{'dice_score': 0.0, 'fp_volume': 7.37752543258667, 'fn_volume': 125.01981968307494}
with_resample

Is this something that expected/normal?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions