fepegar / torchio

Medical imaging toolkit for deep learning
https://torchio.org
Apache License 2.0
2.08k stars 239 forks source link

Consider using tensordict as underlying structure for subjects #1216

Open fzimmermann89 opened 1 month ago

fzimmermann89 commented 1 month ago

Hi,

as a long-term goal, it might be worthwhile to consider changing Subject to inherit from tensordict instead of dict. This would allow batching of subjects and might solve some of the issues observed in #1179

The downside is, that to make use tensorsdicts functionality, some work is needed and compatibility to existing code might suffer.

Cheers, Felix

fepegar commented 1 month ago

Hi, @fzimmermann89. This sounds interesting.

This would allow batching of subjects

Can you please elaborate?

fepegar commented 1 month ago

FYI I tried implementing Subject and Image as TensorDicts, but that didn't solve the collating issue.

romainVala commented 1 month ago

too bad it looked promising