-
Notifications
You must be signed in to change notification settings - Fork 15
Questions about smooth upsample and weighted downsample #9
Comments
About question 1, I used [2x2, 2x2, 4x4] for upsampling, and get a good result. But I found another question: The most value of calculated result A and b is binary, i.e. 0 (or lower than 0) or 1 (or larger than 1), I think it might have been caused by weighted_downsample because the result of ldl_decompositoin and matrix inversion and matrix multiply are same. Have you ever encountered this problem and how did you solove it? My weighted_downsample code as this:
where c is the confidence map and x is the input image. I perfromed it by pytorch. I compared downsampled weighted_downsample image and bilinear_downsample image. It is hard to get the difference with the eyes. |
|
I tested on an image which has tree, building and sky. The resulotion is 3648*2736. In my reproducing, there only 3.15% of pixels which values are in (-1, 1) in calculated A. In b, the number is 5.67%. However, in the traditional guided filter that I reproduced, the number is 41.92% and 22.35%. I save calculated A and b as images which clipped to (0, 255). They look like binary images.
Just look like bilinear downsample
Yes, I am sure they are element-wise operator.
Do you mean using upsampling first and then applying the weighted guided filter? |
Yes |
@lisc199 have you managed to implement the wighted_guided_filter? |
@yggs1401 No. I didn't reproduce the results of the paper. But if you use Boxfilter instead of weighted_downsample, you can get a result which is almost the same. |
@lisc199 Can you provide your code and results? |
Hi! Please see this code submission for the guided filter: 8a35938 |
I am trying to reproduce the paper. And I have some questions:
How to perform smooth upsample when s=16?
For a dowmsampling factor s=64, I can use 4x4 triangle kernel three times. But for s=16, should I use 4x4 twice or use [4x4, 2x2, 2x2] or somethind else?
How can I perform modified guided filter after model inference?
In my opinion, the model output is already a low-resolution map. How to apply weighted downsample in this case? How to use confidence map which is gotten by formula (1) and (2) if I don't use weight downsample? I guess that the model's output will be down-sampled to 64x, is that right? But this process increases the computational workload.
The text was updated successfully, but these errors were encountered: