# lucasb-eyer/pydensecrf

Python wrapper to Philipp Krähenbühl's dense (fully connected) CRFs with gaussian edge potentials.

Repository: https://github.com/lucasb-eyer/pydensecrf
Canonical: https://ross.abutalabs.com/products/pydensecrf
Language: C++
License: MIT
License Family: permissive
Topics: computer-vision, machine-learning, crf, pairwise-potentials, unary-potentials, cython, eigen
Last push: 2024-03-05T08:38:53+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3946, "days_push": 911, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2022, forks 428 (observed 2026-08-28T04:06:06.434788+00:00)

## What it is
PyDenseCRF is a Cython-based Python wrapper around Philipp Krähenbühl's fully-connected (dense) conditional random field implementation with Gaussian edge potentials. It lets Python users add CRF-based post-processing to per-pixel classification tasks such as semantic segmentation.

## Use cases
- refine semantic segmentation masks with a dense CRF
- apply fully connected CRF post-processing to image labeling outputs
- smooth noisy per-pixel probability maps in computer vision pipelines
- run efficient CRF inference with Gaussian edge potentials from Python
- combine CNN segmentation outputs with CRF refinement

## When to choose
- you need dense/fully-connected CRF inference in a Python computer-vision project
- you want to post-process segmentation or labeling probabilities for sharper boundaries
- you need the classic NIPS 2011 densecrf algorithm with a pip-installable wrapper

## When to avoid
- you need a pure-Python solution without C++ compilation
- you need actively developed features or modern deep-learning integration
- you are on Windows and want a frictionless install without conda or build tooling

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, computer-vision, image-processing
- domain: computer-vision, machine-learning, image-processing
- platform: python, cross-platform
- tags: crf, conditional-random-fields, cython, semantic-segmentation, densecrf, image-labeling

## Member repositories
- lucasb-eyer/pydensecrf (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:06.434788+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:00:06.762368+00:00, confidence not recorded.
  - readme: https://github.com/lucasb-eyer/pydensecrf (fetched 2026-08-28T04:06:06.434788+00:00, sha 61b237a7e8a1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
