Skip to content

Fully differentiable and trainable Joint Bilateral Filter (TJBF) layer #5867

@faebstn96

Description

@faebstn96

Is your feature request related to a problem? Please describe.
The joint bilateral filter (JBF) is similar to the bilateral filter but calculates its intensity range kernel on a second input image -- a so-called guidance image. This allows to integrate more information into the filter process and has slightly different applications than the usual bilateral filter (because you need a second guidance image for the filtering). MONAI currently does not contain a regular or differentiable JBF.

Describe the solution you'd like
I implemented a fully differentiable and trainable version of the JBF based on an analytical filter gradient (C++/CUDA). You can find the code here. We additionally published a paper (Scientific Reports) presenting and using that trainable joint bilateral filter for CT denoising.
The structure of the code is very similar to #1840 but contains the JBF algorithm with gradients with respect to its input, its guidance image, and its filter parameters. My GitHub also contains a gradcheck script to compare the analytical gradient to a numerical gradient based on torch.autograd.gradcheck.

I am happy to create a pull request similar to #5757 and include the trainable JBF as an additional filter layer. Please let me know what you think and add any questions or comments!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions