Closed surajpaib closed 11 months ago
I'm not sure if we can make sure that decollate will work in all cases. Also, would we collate them into a batch after decollated postprocessing? It could bring more issues if the applied postprocessing prevents the examples from collating (e.g., different shape). On the other hand, if we don't collate it after postprocessing, then that's a problem for the criterion, possibly for the metrics too - in the best case, it would hurt only the time it takes because you'd have to loop over individual examples in the batch. Also, we would have to rewrite how loggers and writers handle data (e.g. https://github.com/project-lighter/lighter/blob/e64694230e74f5dd6e7e29fbdc532346401219d6/lighter/callbacks/utils.py#L18).
Nvm mind actually, I realized that this only makes sense for certain things.
I'm adding a transform myself to decollate and collate.
🚀 Feature Request
Currently, the
postpostprocessing
applies to the entire batch with [N,C,D,H,W] being passed as input. Because of thatpostprocessing
won't support MONAI postprocessing transforms.I suggest making it work individually on batch items so it can use monai's [C,D,H,W] supported transforms directly. I do not see any benefit in operating over a whole batch.