-
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
random failure OffsetArray tests for Scale and Zoom #38
Comments
This issue might not be so easy to fix, as far as I can identify at present, the accuracy issue is due to different center generated by julia> using Augmentor: toaffinemap
julia> op = Scale(1.5);
julia> img = rand(Gray{N0f8}, 64, 64);
julia> img2 = OffsetArray(img, -1, -1);
julia> toaffinemap(op, img, (1.5, 1.5))
AffineMap([1.5 0.0; 0.0 1.5], [-16.25, -16.25])
julia> toaffinemap(op, img2, (1.5, 1.5))
AffineMap([1.5 0.0; 0.0 1.5], [-15.75, -15.75]) |
well but numerical inaccuracy should be expected though, right? The basic idea was to always apply the affine operation around the origin, if I remember correctly. |
I guess so, but since I'm not the Augmentor expert :P, I wish I could make the test pass without relaxing them. I'm actually thinking of a workaround to this inaccuracy, that striping the offsets, applying affine operation, and adding back offsets. But that would be tricky and there might be a performance issue as well. |
OffsetArray might hit accuracy issue for affine Some affine operations (e.g., scale and zoom) might hit accuracy issues when images are upsampled This is a temporarily workaround to issue #38 (by disabling the tests)
OffsetArray might hit accuracy issue for affine Some affine operations (e.g., scale and zoom) might hit accuracy issues when images are upsampled This is a temporarily workaround to issue #38 (by disabling the tests)
#43 does not fix this issue; it only relaxes the accuracy requirement for those identified failed test cases. Hence I'll still keep this issue open. |
Well, since general machine learning tasks don't really need such accuracy, I'll just close this issue... |
This bug is identified during the upgrade of Augmentor #31 Since that PR is growing bigger and becoming hard to review, it's better to open an issue here and fix it separately.
This bug might be related to upstream packages: Interpolation and ImageTransformation.jl
Update: downscale (e.g.,
Scale(0.2)
) is not affected.The text was updated successfully, but these errors were encountered: