Design Pre-Processing Pipeline to be Finalize
I'm progressing a design doc for the preprocessing pipeline in the wiki. Things have been hectic this week but we should book a meeting slot for Monday afternoon to have a discussion and for others to contribute their ideas. We could aim for 9am Pacific Time, 5pm UK time if everyone is free.
(use case of loading/padding/cropping windows: https://github.com/MIC-DKFZ/batchgenerators/blob/master/batchgenerators/examples/brats2017/brats2017_dataloader_2D.py)
Conclusions of meeting:
- All transforms should be implemented as vanilla python functions
- A Compose function will be implemented that composes functions assuming a single argument and single return value (both of which can be dictionaries)
- A generic wrapper will be implemented that wraps vanilla transforms so that they can be Composed. The wrapper takes a dictionary and mappings between the dictionary entries and the functions. This will be added to a WIP PR on a branch created for this purpose
- We will find challenging use cases that test the genericity of the wrapper with the goal that the wrapper remains completely generic
- We will write an alternative to compose that allows users to create non-linear combinations of transforms and avoid the use of wrappers. The goal is to allow torchvision style compose but prefer the avoidance of compose
Following a successful discussion, the following issues for implementing specific parts of this work have been split up into individual work items that can be independently PR-ed and closed
- #58 for the adaptor functionality / docs
- #59 for the Compose functionality / docs
- #61 for the wiki updates
Everyone to import transforms to this and stress test the adapt capabilities.