lucasb-eyer / pydensecrf

Python wrapper to Philipp Krähenbühl's dense (fully connected) CRFs with gaussian edge potentials.
MIT License
1.94k stars 416 forks source link

Labels looked weird after densecrf #38

Closed raymondchua closed 7 years ago

raymondchua commented 7 years ago

Hi, Before I apply dense crf, my labels were looking fine. http://imgur.com/fZtEboL However, after pydensecrf, I have this weird pixels across my image. http://imgur.com/54vUQfa Has anyone faced the same issue?

lucasb-eyer commented 7 years ago

You closed the issue, so I assume you fixed it? In that case, could you write down what the problem was so others who might have the same error can know? I'm guessing w/h mixup.

raymondchua commented 7 years ago

Hi Lucas, sure. It was because I have NaN and inf values in my probabilities due to the division by zero. Easy fix is to add 1e-3.

lucasb-eyer commented 7 years ago

Thank you for having clarified, it might help others in the future!