Evizero / Augmentor.jl

A fast image augmentation library in Julia for machine learning.
https://evizero.github.io/Augmentor.jl/
Other
138 stars 47 forks source link

support functor API #33

Open johnnychen94 opened 4 years ago

johnnychen94 commented 4 years ago

A simple use case:

pl = ElasticDistortion(6, scale=0.3, border=true) |>
            Rotate([10, -5, -3, 0, 3, 5, 10]) |>
            ShearX(-10:10) * ShearY(-10:10) |>
            CropSize(28, 28) |>
            Zoom(0.9:0.1:1.2)

pl(img) # instead of augment(img, pl)

I find this syntax easier to memorize and use, so I plan to do this when this package got updated.

Evizero commented 4 years ago

I considered this before, but given that in reality one mostly uses augment! or augmentbatch! it felt a little inconsistent