DeepLab-V1-PyTorch icon indicating copy to clipboard operation
DeepLab-V1-PyTorch copied to clipboard

How to calculate the parameters of Pairwise potentials

Open JasonmorrowGuo opened this issue 6 years ago • 1 comments

Thank you for sharing your code! Your work is really brilliant!

But here I'm puzzled about how to set the parameters of Pairwise potentials with other datasets. I noticed that your parameters were set with im.shape == (513,513,3) :

post_processor = crf.DenseCRF( iter_max=10, # 10 pos_xy_std=3, # 3 pos_w=3, # 3 bi_xy_std=140, # 121, 140 bi_rgb_std=5, # 5, 5 bi_w=5, # 4, 5 )

I learned that the default parameters are set as below when im.shape == (640,480,3):

d.addPairwiseGaussian(sxy=3, compat=3) d.addPairwiseBilateral(sxy=80, srgb=13, rgbim=im, compat=10)

Generally, do I need to do mathematical derivation or I can just set the parameters according to some simple rules. Waiting for your opinion if you are free, thank you~

JasonmorrowGuo avatar Dec 05 '19 02:12 JasonmorrowGuo

Thank you for sharing your code! Your work is really brilliant!

But here I'm puzzled about how to set the parameters of Pairwise potentials with other datasets. I noticed that your parameters were set with im.shape == (513,513,3) :

post_processor = crf.DenseCRF( iter_max=10, # 10 pos_xy_std=3, # 3 pos_w=3, # 3 bi_xy_std=140, # 121, 140 bi_rgb_std=5, # 5, 5 bi_w=5, # 4, 5 )

I learned that the default parameters are set as below when im.shape == (640,480,3):

d.addPairwiseGaussian(sxy=3, compat=3) d.addPairwiseBilateral(sxy=80, srgb=13, rgbim=im, compat=10)

Generally, do I need to do mathematical derivation or I can just set the parameters according to some simple rules. Waiting for your opinion if you are free, thank you~

You can reply grid_search method. The idea is very simple。For example,you can random some test dataset, and turn the parameters from a start value to an end value, like bi_xy_std from 70 to 150, 70、80、90、100、...、150。 The code you can refer deeplab-v2

wangleihitcs avatar Apr 07 '20 14:04 wangleihitcs