meng-tang / rloss

Regularized Losses (rloss) for Weakly-supervised CNN Segmentation
MIT License
208 stars 46 forks source link

What is the "AS" variable in the bilateralfilter.cpp #6

Closed yzou2 closed 5 years ago

yzou2 commented 5 years ago

Thanks for sharing this code. Great job.

Would you kindly tell me what the "AS" variable means in your bilateralfilter.cpp

https://github.com/meng-tang/rloss/blob/d9b16fb9f433badec844ebdf93353e470a92883f/pytorch/pytorch-deeplab_v3_plus/DenseCRFLoss.py#L32

meng-tang commented 5 years ago

AS means the affinity matrix A (HW x HW) times the segmentation S (HW x C) with C classes. So AS is of dimension HW x C. It is essentially bilateral filtering if A is a matrix with Gaussian kernel. This computation is accelerated by fast bilateral filtering for dense Gaussian.

yzou2 commented 5 years ago

Thanks! I get what you mean. And in the code, I think the AS is the vectorized one.