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

Implement separable convolution in DIP dialect for handling rank 1 kernels #26

Open
meshtag opened this issue Apr 14, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@meshtag
Copy link
Member

meshtag commented Apr 14, 2022

Is your feature request related to a problem? Please describe.
A 2D rank 1 kernel can be divided in to two 1D kernels. Using the mathematical equation of convolution, we can conclude that two 1D convolutions with separated kernels is equivalent to one 2D convolution with original kernel for the same image. Theoretically, separable convolution might provide better performance boost for the rank 1 kernel case of 2D convolution.

Describe the solution you'd like
DIP dialect should have support for separable convolution. This can be provided in two ways :

  1. A separate API for separable convolution is created wherein the user provides both 1D kernels (Ref : sepFilter2D()).
  2. DIP dialect can detect whether a 2D kernel is rank 1 and then obtain separable kernels using Gaussian elimination. Separable convolution will then be applied with obtained separable kernels. Note : This method will have an overhead associated with Gaussian elimination.

Additional context
I have mentioned 2 possible ways of implementing the said feature, novel methods are encouraged and we are open for discussion.

@meshtag meshtag added the enhancement New feature or request label Apr 14, 2022
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

1 participant