Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce a curried form of binarize #68

Open
johnnychen94 opened this issue Jun 22, 2020 · 0 comments
Open

introduce a curried form of binarize #68

johnnychen94 opened this issue Jun 22, 2020 · 0 comments

Comments

@johnnychen94
Copy link
Member

johnnychen94 commented Jun 22, 2020

It would be convenient to make binarize(alg) return a function so that

map(binarize(Yen()), imgs)

This is equivalent to binarize.(Ref(Yen()), imgs) but a function can be composed together with other functions using , or eventually the |> API similar to that in Augmentor:

pipeline = FlipX(0.5) |> Rotate([-5,-3,0,3,5]) |> CropSize(64,64) |> Zoom(1:0.1:1.2)

Cases that I know in Base are isequal, isapprox(in Julia 1.5), startwith(in Julia 1.5) and endswith(in Julia 1.5):

julia> map(isequal(2), 1:5)
5-element Array{Bool,1}:
 0
 1
 0
 0
 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant