dthuerck / mapmap_cpu

A high-performance general-purpose MRF MAP solver, heavily exploiting SIMD instructions.
BSD 3-Clause "New" or "Revised" License
102 stars 51 forks source link

How can I change the weight of unary costs and pairwise costs? #12

Closed linmqing closed 5 years ago

linmqing commented 5 years ago

Sorry, it is my mistake. I Failed to add edge to mapsolver, so the pairwise didn't work.

================================================================ Hi,

I want to have a more continuous labels' result, so I think I should increase the weight of pairwise costs (smooth term in energy function) to weaken the impact of unary costs (data term in energy function).

However, I tried to change parameter of 'PairwisePotts' or the costs set to unaries, but both them didn't work.

Even I set the pairwise to be 0, the results were binary same. Does the pairwise really work?

I wonder how can I adjust the weights.

dthuerck commented 5 years ago

Glad you found a solution!

One more hint: when adding edges to the graph, you can include edge weights - these weights are then applied to the pairwise costs. That might come in handy for classes of costs that do not support weights out-of-the-box.

linmqing commented 5 years ago

Oh, it's great! Thank you very much.