I was wondering how can you implement transforms, that require both the input and target variable.
An example use for the case of binary segmentation task:
- If the target image contains positive pixels(pp)
- Do random crop around some random pp for both the input and target images
- The crop must include at least N pp in the target image
- If the crop does not fulfill the predicate than create another crop
The only way I imagine it right now is to use the preprocessor class. What are your thoughts?