FluxML / DataAugmentation.jl

Flexible data augmentation library for machine and deep learning
https://fluxml.ai/DataAugmentation.jl/dev/
MIT License
41 stars 17 forks source link

Make `ImageToTensor` compatible with Flux's `WHC` format #90

Closed adrhill closed 5 months ago

adrhill commented 5 months ago

As discussed in https://github.com/FluxML/DataAugmentation.jl/pull/89#issuecomment-1986872309, this PR modifies ImageToTensor to return WHC arrays instead of HWC by default, making it out-of-the box compatible with Flux and Metalhead.jl.

@darsnack's previous suggestion was:

For now, why don't we throw a deprecation warning in ImageToTensor with instructions how to get HWC in the future using (fixed) ImageToTensor + PermuteDims?

However, a release including this PR could be considered breaking since it might break users' existing data preprocessing pipelines.


Related issues:

CarloLucibello commented 5 months ago

Can you update the version in Project.toml to 0.3?

adrhill commented 5 months ago

I also took the liberty of updating the outdated CHANGELOG.