lucasb-eyer / pydensecrf

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

How to use gradient function in densecrf.pyx? #56

Open crurui opened 6 years ago

crurui commented 6 years ago

Hi, I tried to use the commented out gradient function in densecrf.pxd. Now I can call it in python but it fails and the python stops working. Is there any advice for me to continue or turn to other methods to implement it in a learning?Thank u very much

lucasb-eyer commented 6 years ago

Hi, I haven't tried this myself, and don't have the time to, so I'm afraid I can't give you guidance. Python stopping to work probably means you have made a mistake in the wrapping somewhere, you need to be careful with types etc. as it's all C code which will simply crash if something is wrong, instead of giving a nice error as we're used to from Python :smile:

If you do succeed, please let me know, or ideally open a PR.