Open domef opened 1 year ago
I see in the albumentations tests that lambda x: x
is passed to read_fn
but I think that it is not very clear, also reference_images
could contain any object as long read_fn
returns a np.array
.
Maybe only the documentation and type hinting should be updated.
🐛 Bug
Some augmentations from
domain_adaptation
(i.e.HistogramMatching
,FDA
andPixelDistributionAdaptation
) crash when a list of numpy array is passed toreference_images
.To Reproduce
The same error is raised with
A.FDA
andA.PixelDistributionAdaptation
.Expected behavior
Since the doc says
reference_images (List[str] or List(np.ndarray)): List of file paths for reference images or list of reference images.
and also the type hinting isreference_images: List[Union[str, np.ndarray]]
it shouldn't crash when a numpy array is passedEnvironment