MarcoForte / FBA_Matting

Official repository for the paper F, B, Alpha Matting
MIT License
467 stars 95 forks source link

about the exclusion loss #13

Closed Liupengshuaige closed 4 years ago

Liupengshuaige commented 4 years ago

Hi, I have read your paper about the exclusion loss, does the exclusion loss can be written like this in pytorch:

(grad() is a function getting the H grad or V grad) foreground_grad = torch.abs(grad(foreground)) background_grad = torch.abs(grad(background)) elemental_mul = foreground_grad.mul(background_grad) loss = sum(elemental_mul)

Looking forward to your reply.

MarcoForte commented 4 years ago

Hi sorry for the delay, that looks good to me.

kartikwar commented 3 years ago

hey @Liupengshuaige can you please share the code to compute grad()