Closed rsomani95 closed 3 years ago
@lgvaz and I had discussed this on call. This is indeed expected behavior and not technically a bug, as the tfms.A.Adapter
goes over every component in the record and calls setup_transform
on it. This fails in the above case because ImageRecordComponent
is None
for some of the records
What would be really nice is to have a functional form where you can just pass in the record and specify which parts of it you'd like to transform. A feature for a later date perhaps.
The albumentations adapter seems to try to grab from images that aren't
record.img
. I'm not sure what causes this, but here's a reproducible example:This gives the following error:
Error Trace
```python --------------------------------------------------------------------------- TypeError Traceback (most recent call last)However, if you comment out the
ImageRecordComponent(task=Task("color_saturation"))
line, the error isn't caused anymore.The use case for having multiple
ImageRecordComponent
s is when you'd like to have multiple transforms of the same image and feed them to different parts of the model - multi task training and contrastive learning come to mind.