kornia icon indicating copy to clipboard operation
kornia copied to clipboard

Filtering Operators tutorial

Open lappemic opened this issue 2 years ago • 6 comments

📚 Documentation

53 Hugging space demo and embedded app

lappemic avatar Sep 09 '22 06:09 lappemic

The HF space is now available and running here. Many thanks to @NimaBoscarino for the starter guide and support! Please let me know, if i can improve the space and add more features since this was one of my first contributions and especially the first gradio app! 🍾 😄

lappemic avatar Sep 09 '22 09:09 lappemic

Yay thank you for doing this! I took a look at your space, and there's a small bug to fix: https://kornia.readthedocs.io/en/latest/filters.html#kornia.filters.blur_pool2d actually downsamples images, so it looks like all the images going through your space are being downsampled regardless of whether a user wants to use blur_pool2d or not 🤔

NimaBoscarino avatar Sep 09 '22 19:09 NimaBoscarino

Thanks Nima for this hint. I was not really aware of it. After digging a bit more in the kornia docs i realized, that also max_blur_pool2d is downsampling. This is why i decided to go for another approach in the space and now have deployed a single tab per filter option. Would be happy to hear your thoughts about this. Thanks again for the feedback!

lappemic avatar Sep 10 '22 00:09 lappemic

the tabs widget looks really nice, feel free to add to ours docs similar to https://github.com/kornia/kornia/pull/1876/files

edgarriba avatar Sep 12 '22 08:09 edgarriba

Hey @edgarriba i would like to add the widget to your docs as well. Honestly i do not see at the moment how to proceed to achieve this. Would you have some guidance on this?

lappemic avatar Sep 13 '22 13:09 lappemic

@lappemic The easiest way to do it is to basically do it like this PR: https://github.com/kornia/kornia/pull/1871/files

That is:

  1. Create a file at docs/source/gradio/filtering_operators.html that has the <script> and <gradio> snippets.
  2. Embed it in the "Blurring" section of the docs

NimaBoscarino avatar Sep 13 '22 15:09 NimaBoscarino