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

Hint: NNlib now contains code for nearest and bilinear upsampling #113

Open
maxfreu opened this issue Feb 15, 2021 · 0 comments
Open

Hint: NNlib now contains code for nearest and bilinear upsampling #113

maxfreu opened this issue Feb 15, 2021 · 0 comments

Comments

@maxfreu
Copy link

maxfreu commented Feb 15, 2021

Hi everybody!

This is just to let you know that recently we added code for nearest neighbour and bilinear upsampling to NNlib here in these PRs 1, 2. The code uses WHCN memory layout (and works on the first two dimensions). The nearest version is single threaded for CPU and works out of the box for GPU. The bilinear version is multi-threaded for CPU and has a GPU implementation here. Note that bilinear upsampling aligns the corners, so I think it's a bit different from what you are doing, but I intend to make the behaviour optional to be able to match your implementation. Both versions are "super fast" but I haven't benchmarked against ImageTransformation.jl. RGB data is currently not supported out of the box, but writing a wrapper should be simple.

See also JuliaMath/Interpolations.jl#396 - would be cool to recycle code where possible, perhaps some day in the future :)

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