Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to calculate the parameters of Pairwise potentials #1

Open
JasonmorrowGuo opened this issue Dec 5, 2019 · 1 comment
Open

How to calculate the parameters of Pairwise potentials #1

JasonmorrowGuo opened this issue Dec 5, 2019 · 1 comment

Comments

@JasonmorrowGuo
Copy link

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~

@wangleihitcs
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants