MONAI
MONAI copied to clipboard
LoadImage and SaveImage using network source (S3 or Google Cloud Storage)
It would be very useful to load/save images directly from/to network storage (like S3 or Google Cloud Storage) using pure monai transforms. I have a pretty simple idea how to implement such a feature adding single extra argument to LoadImage and SaveImage transforms.
We could treat input and output paths as pointing to the network sources instead of local files, because classic storage services like S3 use filesystem-like chierarcical structure of object keys. LoadImage transform could accept a Callable, which download object from network storage and save to temporary files, which is then used by readers and any other regular LoadImage transform logic. Similarly SaveImage writer could optionally save data to temporary file, which is then uploaded to network storage.
I've prepared PR presenting this idea. It works as it is already used in my own project.
Is it still open? @karwojan
#4136 is the PR.
It would be nice to support NGC dataset as well: https://docs.ngc.nvidia.com/cli/cmd_dataset.html https://docs.ngc.nvidia.com/api/
Having Amazon HealthLake support would be great too. And it is already supported in ITK: https://gist.github.com/thewtex/434c482a4998a3a61ce4f91fa7c5b44c
maybe out of scope for monai core.