-
Notifications
You must be signed in to change notification settings - Fork 46
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
Resize does not seem to work with augmentbatch! #56
Comments
The problem does not seem to be with batches. For example, this works: using Augmentor
img = testpattern()
batch = cat(img, img, dims=3)
augmentbatch!(similar(batch, 500,600,2), batch, Resize(500, 600)) Whereas, this does not work: augment!(zeros(6,6,3), rand(4,4,3), Resize(6,6))
@johnnychen94, is this possibly an issue in general? Allowing only |
Ah, never occured to me to try images as the Array -> RGB -> Array seemed like an unnecssary hassle. Thanks a bunch for pointing it out as it is far less of a hassle than the other workarounds I did. Is this the intended API for The docstring says it does multi-dimensional arrays (and it indeed does if they are 3D, i.e no channel dim) which is what threw me off. |
Both of these works: augmentbatch!(zeros(RGB,6,6,2), fill(RGB(1,1,1), 4,4,2), Resize(6,6))
augmentbatch!(zeros(6,6,3,2), fill(RGB(1,1,1), 4,4,2), Resize(6,6)|>SplitChannels()) Augmentor.jl builds on top of JuliaImages and for more generic support to any image format (not just RGB), it's deliberately required to use julia> augment(rand(RGB, 4, 4, 4), Resize(6, 6, 6))
6×6×6 Array{RGB{Float64},3} with eltype RGB{Float64}:
... The stacktrace you got when trying to call |
We are currently working on improving the documentation. Please, see this example that explains some of the questions raised here. |
Sorry for extremely long responsen time. Explanation above and the excellent docs makes it perfectly clear. |
Maybe I just don't understand how to use it...
Makes most sense for me as a user to only specify heigh and width:
This is more consistent with
Crop
, but what should happen if dimension 3 is resized?This does not make sense at all, but I tried it just in case:
The text was updated successfully, but these errors were encountered: