-
Notifications
You must be signed in to change notification settings - Fork 48
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
Either
may not work properly with Pipeline
#36
Comments
Without any evidence, this issue might be related to the unrolling part of lazy operations in A workaround is to insert a |
yea. Rotate90 and NoOp only share the affine option for lazy. and there is likely some rounding error when rotating |
I could not reproduce on the current master. Is it possible that it has been fixed? julia> using Augmentor, TestImages
julia> img = TestImages.testimage("cameraman");
julia> a(img) = augment(img, Either(Rotate90()) |> FlipY())
a (generic function with 1 method)
julia> b(img) = augment(img, Rotate90() |> FlipY())
b (generic function with 1 method)
julia> c(img) = augment(augment(img, Either(Rotate90())), FlipY())
c (generic function with 1 method)
julia> unique!([size(a(img)) for i in 1:1000])
1-element Vector{Tuple{Int64, Int64}}:
(512, 512)
julia> unique!([size(b(img)) for i in 1:1000])
1-element Vector{Tuple{Int64, Int64}}:
(512, 512)
julia> unique!([size(c(img)) for i in 1:1000])
1-element Vector{Tuple{Int64, Int64}}:
(512, 512)
|
Great! I didn't notice this was fixed but it might be related to the discretization trick in ImageTransformations: JuliaImages/ImageTransformations.jl#107 and JuliaImages/ImageTransformations.jl#114 This might only happen when the affine method is called. Another similar issue is #77 An upcoming change in ImageTransformations@v0.9 is JuliaImages/ImageTransformations.jl#143 |
For the following three seeming "equivalent" operations, the first one randomly changes the image size...
For
img = testimage("cameraman")
:augment(img, Either(Rotate90()) |> FlipY())
returns image of size(512, 512)
or(513, 512)
augment(img, Rotate90() |> FlipY())
returns image of size(512, 512)
augment(augment(img, Either(Rotate90())), FlipY())
returns image of size(512, 512)
The text was updated successfully, but these errors were encountered: