Git Product home page Git Product logo

farhad-dalirani / disparity-map-reconstruction-pgm Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 14.48 MB

Probabilistic Graphical Models for Stereo Disparity Map Reconstruction by Factor Graph and Belief Propagation Maximum A Posteriori

License: MIT License

Python 100.00%
belief-propagation computer-vision disparity-map maximum-a-posteriori-estimation probabilistic-graphical-models python stereo-disparity

disparity-map-reconstruction-pgm's Introduction

Depth/Stereo Map Reconstruction with Factor Graph and Loopy Belief Propagation Maximum A Priori Estimation

Model Architecture

This repository focuses on enhancing disparity maps generated by algorithms such as block matching methods through the utilization of prior knowledge about the nature of disparity maps. By incorporating graphical probabilistic models (PGMs) like Factor Graphs, we improve the accuracy of disparity estimations.

The code within this repository creates a Factor Graph resembling the provided diagram. It models each pixel's disparity as a random variable with integer values ranging from 0 to the maximum disparity value. These variables are linked through four factors corresponding to their 4-connected neighbors, promoting smoothness among adjacent pixels.

Factors are designed with the scene in mind, accounting for expected gradual disparity changes within objects and sharper changes at object edges. Unary factors align the variable's value with the input disparity map, enhancing consistency.

The factors_depth_reconstruction.py file contains a class for initializing the Factor Graph and employing Maximum A Priori Estimation through Loopy Belief Propagation Maximum A Posteriori.

After refinement, the quality of disparity maps significantly improves, minimizing artifacts. The initial disparity maps are generated by this repository: Siamese CNN for Block Matching in Stereo Images Depth Mapping.

Graphical Probabilistic Models (PGMs) Architecture

Please see the run.py file for usage of this algorithm, it contains an example involving FactorGraphDepthReconstruction class and the loopy_belief_propagation_maximum_a_posteriori method.

disparity-map-reconstruction-pgm's People

Contributors

farhad-dalirani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.