DGM is a C++ library implementing various tasks in probabilistic graphical models with pairwise dependencies. The library aims to be used for the Markov and Conditional Random Fields (MRF / CRF), Markov Chains, Bayesian Networks, etc. Specifically, it includes a variety of methods for the following tasks:
- Learning: Training of unary and pairwise potentials
- Inference / Decoding: Computing the conditional probabilities and the most likely configuration
- Parameter Estimation: Computing maximum likelihood (or MAP) estimates of the parameters
- Evaluation / Visualization: Evaluation and visualization of the classification results
- Data Analysis: Extraction, analysis and visualization of valuable knowledge from training data
- Feature Extraction: Extraction of various descriptors from images, which are useful for classification
These tasks are optimized for speed, i.e. high-efficient calculations. The code is written in optimized C++11, compiled with Microsoft Visual Studio and can take advantage of multi-core processing. DGM is released under a BSD license and hence it is free for both academic and commercial use.
First example compares 3 different classificators, based on Bayesian network, MRF and CRF respectively. The input here is a color-infra-red image with resolution of 800×800 pixels. Its ground-truth is given by manually labelled map of the same resolution. The corresponding graphical model consists of 160×160 nodes, thus each node corresponds to a small image patch with size of 5×5 pixels. 3 resulting label maps were compared with the ground-truth and the overall classification accuracies (OA) are reported:
The labeling of Environmental Microorganisms which help decomposing pollutants, plays a fundamental role for establishing sustainable ecosystem. We propose an environmental microorganism classification engine that can automatically analyze microscopic images using Sparse Coding (SC) and Conditional Random Fields (CRF). First, to effectively represent scarce training images, SC is used to convert each of raw image patches into a higher-level local feature by reconstructing it with a linear combination of pixel patterns (bases), which are mined from a huge number of image patches. Finally, our CRF model localizes and classifies EMs by considering the spatial relations among features.
In this example we apply MRF to the stereo correspondence problem. The disparity map between left and right images of a stereo pair is estimated in form of a class map, where every class represents a small range of disparity values. The following result was achieved by applying approximate tree reweighted inference algorithm and simple Potts smoothness term, thus, no training was needed.
Please refer to Demo Stereo for the source code and more details (appear first in DGM v.1.5.1).
This example demonstrates the application to the segmentation problem. The input here is an RGB-color image of a human eye. The DGM-based classifier has been trained using 22 similar images, segmented manually. First, the segmentation was performed using Random Forest (RF) approach only, after that it was supported with the CRF technique:
Four different colors represent skin (yellow), sclera (red), iris (blue) and pupil (gray).
If you have applied the DGM library in your work and achieved some interesting results, please send them to me via email@example.com, so I could allocate them at this web-page. This will help us to spread and improve the library. We thank you in advance for your support.
DGM in Publication
Selected main publications:
- A Two-Layer Conditional Random Field for the Classification of Partially Occluded Objects
Cornell University Library, arXiv:1307.3043, 2013
- Sequential Gaussian Mixture Models for Two-Level Conditional Random Fields
in proc. of the 35th German Conference on Pattern Recognition (GCPR’13)
See also more publications, where the DGM library was used:
- Unsupervised Change Detection in High Spatial Resolution Remote Sensing Images Based on A Conditional Random Field Model
in European Journal of Remote Sensing, 2016
- Land Use Classification using CRFs for the Verification of Geospatial Databases
in ISPRS Annals of Photogrammetry, Remote Sensing and Spatial Information Sciences, 2014
- A Two-Layer CRF Model for Simultaneous Classification of Land Cover and Land Use
the Int. Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, 2014
- The Application of a Car Confidence Feature for the Classification of Cross-Roads Using CRFs
in ISPRS Annals of Photogrammetry, Remote Sensing and Spatial Information Sciences, 2013
- 3D Classification of Crossroads from Multiple Aerial Images Using Conditional Random Fields
in IAPR Workshop on Pattern Recognition in Remote Sensing (PRRS’12)
- 3D Classification of Crossroads from Multiple Aerial Images Using Markov Random Fields
in proc. of the 22nd ISPRS congress (ISPRS’12)
To reference DGM in a publication, please include the library name and a link to this website [BibTeX]. You may also want to include the library version, since we currently update the software.
If you use this software in a publication, please cite the work using the following information:
Sergey Kosov. Direct graphical models C++ library. http://research.project-10.de/dgm/, 2013.
or using the BibTeX file.