-
Notifications
You must be signed in to change notification settings - Fork 136
Is there a worng understand in total variation? #27
Comments
maybe should be these?``
|
More seriously, it should be these code rather than above (Above code didn't consider the uppest/leftest dilated pixel minus operation)
|
Have you tried the code which you thought it should be? Have it brought any improvement to the result compared to the github author's ? |
Hi !
|
I would argue that, while not the same exact loss as the one proposed in the paper (L_tv), the Both
Since the ground truth image does not change with I_out, it means that all 1-pixel shifts outside of the mask will always result in the same total variation, outside of the masked region. Inside of the masked region (as well as around the 1-pixel dilation of the mask) the TV loss will instead depend on I_out. As such, the loss implemented here is L_tv + constant: the two functions thus share the same gradient. It also seems to me that the current implementation is slightly more efficient, as it does not require computing the dilated mask, nor mask the image. |
I find this does not conform to the original paper’s method, I think the sum of the abs value should be taken into the Loss(tv), and the tv loss is not the global difference of the whole picture, it just around the hole areas (P is the region of 1-pixel dilation of the hole region).
The text was updated successfully, but these errors were encountered: