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

Support for GPU-accelerated affine transformations #48

Open
lorenzoh opened this issue Aug 11, 2021 · 3 comments
Open

Support for GPU-accelerated affine transformations #48

lorenzoh opened this issue Aug 11, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@lorenzoh
Copy link
Member

Affine transformations on CPU are already pretty fast, but GPU-accelerated transformations are useful in CPU-constrained environments like Google Colab where a GPU is available but only 2 mediocre CPUs which can lead to a bottleneck in the data pipeline.

Some open questions:

  • Would the existing transforms work out-of-the box on CuArrays (i.e. does ImageTransformations.warp[!] work on CuArrays) ? What about for masks, i.e. integer arrays? Otherwise, what would be necessary to implement that?
  • Performance-wise, do the transforms need to be applied to a whole batch at once or is it as fast to apply them to samples individually? Former would require first resizing images to the same size and wrapping in a Batch wrapper item.

Can someone who has experience with image transformations on GPU chime in?

@jsamaroo

@ToucheSir
Copy link
Member

ToucheSir commented Jun 10, 2022

Think you meant to tag @jpsamaroo? Also, JuliaImages/ImageTransformations.jl#156 looks promising here!

@lorenzoh
Copy link
Member Author

Think you meant to tag @jpsamaroo?

Yup 😅

@jpsamaroo
Copy link

Writing image transformations with KernelAbstractions.jl is probably the best approach, since you get CPU+CUDA+AMDGPU from just a single kernel (although you might want to write the CPU kernels differently for better performance). That sort of code should probably go in ImageTransformations.jl in some shape or form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants