#291 · Primary category: Computer Vision
pydensecrf
Python wrapper to Philipp Krähenbühl's dense (fully connected) CRFs with gaussian edge potentials.
Project last updated:03/05/24
GitHub Stars
2.0K
Forks
428
Contributors
17
License
MIT
Why we included this project
Segmentation models often output noisy per-pixel probabilities, and a fully-connected CRF is the classic way to clean those up into labels that respect object boundaries. This library wraps Philipp Krähenbühl's efficient dense CRF implementation behind a Cython interface, so you can run that post-processing step directly from Python. You hand it a unary energy, typically the negative log softmax of your network's output, add Gaussian and bilateral pairwise potentials that enforce spatial and color consistency, and the compiled C++ code with Eigen stays fast enough for inference-time use; bundled helpers like unary_from_softmax handle the common conversions. It complements a neural network rather than replacing it, which is why it turns up in many image segmentation pipelines. Expect the compiled install to need some coaxing on Windows and in Colab kernels, so budget a little setup time.
Articles for this project
No articles for this project yet.
To suggest a topic or contribute an article, contact us.
Related projects in this category
opencv
Open Source Computer Vision Library
RuView
π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection — all without a single pixel of video.
PaddleOCR
Turn any PDF or image document into structured data for your AI. A powerful, lightweight OCR toolkit that bridges the gap between images/PDFs and LLMs. Supports 100+ languages.
MinerU
Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
tesseract
Tesseract Open Source OCR Engine (main repository)