tensorflow-bilateral-permutohedral icon indicating copy to clipboard operation
tensorflow-bilateral-permutohedral copied to clipboard

Modify to 3D filter

Open yunishi3 opened this issue 7 years ago • 1 comments

I'd like to modify this code to 3D bilateral filter. So could you tell me where I should modify.

yunishi3 avatar Jun 27 '17 22:06 yunishi3

It currently supports 3D bilateral filter if you reshape your array to NCHWZ or NCZHW, where the last 3 dimensions are (height, width, spatial-depth) or (spatial-depth, height, width). The code initializes a 3D spatial grid for the last 3 dimensions (see here) in addition to the color dimensions.

However for now it will use the same filter width for the 3 spatial dimensions. If you want to have different filter widths for the 3 spatial dimensions, you would need to modify the arguments to the functions from just the 2 "stdv_color" and "stdv_space" and add another "stdv_Z" for the 3rd dimension.

jasonbunk avatar Jul 11 '17 06:07 jasonbunk