SlideShare a Scribd company logo
Probabilistic Models for Images
Markov Random Fields
Applications in Image Segmentation and Texture Modeling
Ying Nian Wu
UCLA Department of Statistics
IPAM July 22, 2013
Outline
•Basic concepts, properties, examples
•Markov chain Monte Carlo sampling
•Modeling textures and objects
•Application in image segmentation
Markov Chains
Pr(future|present, past) = Pr(future|present)
future past | present
Markov property: conditional independence
limited dependence
Makes modeling and learning possible
Markov Chains(higher order)
Temporal: a natural ordering
Spatial: 2D image, no natural ordering
Markov Random Fields
all the other pixels
Nearest neighborhood, first order neighborhood
Markov Property
From Slides by S. Seitz - University of Washington
Markov Random Fields
Second order neighborhood
Markov Random Fields
Can be generalized to any undirected graphs (nodes, edges)
Neighborhood system: each node is connected to its neighbors
neighbors are reciprocal
Markov property: each node only depends on its neighbors
Note: the black lines on the left graph are illustrating the 2D grid for the image pixels
they are not edges in the graph as the blue lines on the right
Markov Random Fields
What is
Cliques for this neighborhood
Hammersley-Clifford Theorem
normalizing constant, partition function
potential functions of cliques
From Slides by S. Seitz - University of Washington
Cliques for this neighborhood
Hammersley-Clifford Theorem
a clique: a set of pixels, each member is the neighbor of any other member
From Slides by S. Seitz - University of Washington
Gibbs distribution
Cliques for this neighborhood
Hammersley-Clifford Theorem
a clique: a set of pixels, each member is the neighbor of any other member
……etc, note: the black lines are for illustrating 2D grids, they are not edges in the graph
Gibbs distribution
Cliques for this neighborhood
Ising model
From Slides by S. Seitz - University of Washington
Ising model
Challenge: auto logistic regression
pair potential
Gaussian MRF model
continuous
Challenge: auto regression
pair potential
Sampling from MRF Models
Markov Chain Monte Carlo (MCMC)
• Gibbs sampler (Geman & Geman 84)
• Metropolis algorithm (Metropolis et al. 53)
• Swedeson & Wang (87)
• Hybrid (Hamiltonian) Monte Carlo
Gibbs Sampler
Simple one-dimension distribution
Repeat:
• Randomly pick a pixel
• Sample given the current values of
Gibbs sampler for Ising model
Challenge: sample from Ising model
Metropolis Algorithm
Repeat:
• Proposal: Perturb I to J by sample from K(I, J) = K(J, I)
• If change I to J
otherwise change I to J with prob
energy function
Metropolis for Ising model
Challenge: sample from Ising model
Ising model: proposal --- randomly pick a pixel and flip it
Modeling Images by MRF
Ising model
Exponential family model, log-linear model
maximum entropy model
unknown parameters
features (may also need to be learned)
reference distribution
Hidden variables, layers, RBM
Modeling Images by MRF
Given
How to estimate
• Maximum likelihood
• Pseudo-likelihood (Besag 1973)
• Contrastive divergence (Hinton)
Maximum likelihood
Given
Challenge: prove it
Stochastic Gradient
Given
Generate
Analysis by synthesis
Texture Modeling
Modeling image pixel labels as MRF (Ising)
( , )
i i
x y

( , )
i j
x x

1
real image
label image
Slides by R. Huang – Rutgers University
MRF for Image Segmentation
Bayesian posterior
Model joint probability
label
image
label-label
compatibility
Function
enforcing
Smoothness
constraint
neighboring
label nodes
local
Observations
image-label
compatibility
Function
enforcing
Data
Constraint
( , )
1
( , ) ( , ) ( , )
i j i i
i j i
P x x x y
Z
 
  
x y
* *
( , )
( , ) argmax ( , | )
P

 

x
x x y
region
labels
image
pixels
model
param.
Slides by R. Huang – Rutgers University
*
1
( , ) ( , )
2
2
2
2 2
arg max ( | )
1
arg max ( , ) ( | ) ( , ) / ( ) ( , )
1
arg max ( , ) ( , ) ( , ) ( , ) ( , )
( , ) ( ; , )
( , ) exp( ( ) / )
[ , , ]
i i
i i
i i i j i i i j
i i j i i j
i i i x x
i j i j
x x
P
P P P P P
Z
x y x x P x y x x
Z
x y G y
x x x x
   
  
  
   

  
 

 

   
x
x
x
x x y
x y x y x y y x y
x y
( , )
i i
x y

( , )
i j
x x

Slides by R. Huang – Rutgers University
MRF for Image Segmentation
Inference in MRFs
– Classical
• Gibbs sampling, simulated annealing
• Iterated conditional modes
– State of the Art
• Graph cuts
• Belief propagation
• Linear Programming
• Tree-reweighted message passing
Slides by R. Huang – Rutgers University
Summary
•MRF, Gibbs distribution
•Gibbs sampler, Metropolis algorithm
•Exponential family model

More Related Content

Similar to 8141891.pptx

TAME: Trainable Attention Mechanism for Explanations
TAME: Trainable Attention Mechanism for ExplanationsTAME: Trainable Attention Mechanism for Explanations
TAME: Trainable Attention Mechanism for Explanations
VasileiosMezaris
 
Learning visual explanations for DCNN-based image classifiers using an attent...
Learning visual explanations for DCNN-based image classifiers using an attent...Learning visual explanations for DCNN-based image classifiers using an attent...
Learning visual explanations for DCNN-based image classifiers using an attent...
VasileiosMezaris
 
ICASSP19
ICASSP19ICASSP19
Review : Prototype Mixture Models for Few-shot Semantic Segmentation
Review : Prototype Mixture Models for Few-shot Semantic SegmentationReview : Prototype Mixture Models for Few-shot Semantic Segmentation
Review : Prototype Mixture Models for Few-shot Semantic Segmentation
Dongmin Choi
 
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Ukraine
 
Irrera gold2010
Irrera gold2010Irrera gold2010
Irrera gold2010grssieee
 
A Novel Feature Extraction Scheme for Medical X-Ray Images
A Novel Feature Extraction Scheme for Medical X-Ray ImagesA Novel Feature Extraction Scheme for Medical X-Ray Images
A Novel Feature Extraction Scheme for Medical X-Ray Images
IJERA Editor
 
Presentation for korea multimedia(in english)
Presentation for korea multimedia(in english)Presentation for korea multimedia(in english)
Presentation for korea multimedia(in english)
abyssecho
 
Lecture 1- Introduction.pptx
Lecture 1- Introduction.pptxLecture 1- Introduction.pptx
Lecture 1- Introduction.pptx
ManjulGupta10
 
Feature extraction based retrieval of
Feature extraction based retrieval ofFeature extraction based retrieval of
Feature extraction based retrieval of
ijcsity
 
NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
taeseon ryu
 
Large Scale Image Retrieval 2022.pdf
Large Scale Image Retrieval 2022.pdfLarge Scale Image Retrieval 2022.pdf
Large Scale Image Retrieval 2022.pdf
SamuCerezo
 
Pami meanshift
Pami meanshiftPami meanshift
Pami meanshiftirisshicat
 
Corisco - 2015
Corisco - 2015Corisco - 2015
Corisco - 2015
Nicolau Werneck
 
Line Detection using Hough transform .pptx
Line Detection using Hough transform .pptxLine Detection using Hough transform .pptx
Line Detection using Hough transform .pptx
shubham loni
 
R package bayesImageS: Scalable Inference for Intractable Likelihoods
R package bayesImageS: Scalable Inference for Intractable LikelihoodsR package bayesImageS: Scalable Inference for Intractable Likelihoods
R package bayesImageS: Scalable Inference for Intractable Likelihoods
Matt Moores
 
On mesh
On meshOn mesh
Gaussian Process Latent Variable Models & applications in single-cell genomics
Gaussian Process Latent Variable Models & applications in single-cell genomicsGaussian Process Latent Variable Models & applications in single-cell genomics
Gaussian Process Latent Variable Models & applications in single-cell genomics
Kieran Campbell
 

Similar to 8141891.pptx (20)

TAME: Trainable Attention Mechanism for Explanations
TAME: Trainable Attention Mechanism for ExplanationsTAME: Trainable Attention Mechanism for Explanations
TAME: Trainable Attention Mechanism for Explanations
 
Learning visual explanations for DCNN-based image classifiers using an attent...
Learning visual explanations for DCNN-based image classifiers using an attent...Learning visual explanations for DCNN-based image classifiers using an attent...
Learning visual explanations for DCNN-based image classifiers using an attent...
 
ICASSP19
ICASSP19ICASSP19
ICASSP19
 
Review : Prototype Mixture Models for Few-shot Semantic Segmentation
Review : Prototype Mixture Models for Few-shot Semantic SegmentationReview : Prototype Mixture Models for Few-shot Semantic Segmentation
Review : Prototype Mixture Models for Few-shot Semantic Segmentation
 
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
GlobalLogic Machine Learning Webinar “Advanced Statistical Methods for Linear...
 
Ai32237241
Ai32237241Ai32237241
Ai32237241
 
Irrera gold2010
Irrera gold2010Irrera gold2010
Irrera gold2010
 
RBF2.ppt
RBF2.pptRBF2.ppt
RBF2.ppt
 
A Novel Feature Extraction Scheme for Medical X-Ray Images
A Novel Feature Extraction Scheme for Medical X-Ray ImagesA Novel Feature Extraction Scheme for Medical X-Ray Images
A Novel Feature Extraction Scheme for Medical X-Ray Images
 
Presentation for korea multimedia(in english)
Presentation for korea multimedia(in english)Presentation for korea multimedia(in english)
Presentation for korea multimedia(in english)
 
Lecture 1- Introduction.pptx
Lecture 1- Introduction.pptxLecture 1- Introduction.pptx
Lecture 1- Introduction.pptx
 
Feature extraction based retrieval of
Feature extraction based retrieval ofFeature extraction based retrieval of
Feature extraction based retrieval of
 
NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
 
Large Scale Image Retrieval 2022.pdf
Large Scale Image Retrieval 2022.pdfLarge Scale Image Retrieval 2022.pdf
Large Scale Image Retrieval 2022.pdf
 
Pami meanshift
Pami meanshiftPami meanshift
Pami meanshift
 
Corisco - 2015
Corisco - 2015Corisco - 2015
Corisco - 2015
 
Line Detection using Hough transform .pptx
Line Detection using Hough transform .pptxLine Detection using Hough transform .pptx
Line Detection using Hough transform .pptx
 
R package bayesImageS: Scalable Inference for Intractable Likelihoods
R package bayesImageS: Scalable Inference for Intractable LikelihoodsR package bayesImageS: Scalable Inference for Intractable Likelihoods
R package bayesImageS: Scalable Inference for Intractable Likelihoods
 
On mesh
On meshOn mesh
On mesh
 
Gaussian Process Latent Variable Models & applications in single-cell genomics
Gaussian Process Latent Variable Models & applications in single-cell genomicsGaussian Process Latent Variable Models & applications in single-cell genomics
Gaussian Process Latent Variable Models & applications in single-cell genomics
 

Recently uploaded

Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
The Role of Electrical and Electronics Engineers in IOT Technology.pdf
The Role of Electrical and Electronics Engineers in IOT Technology.pdfThe Role of Electrical and Electronics Engineers in IOT Technology.pdf
The Role of Electrical and Electronics Engineers in IOT Technology.pdf
Nettur Technical Training Foundation
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
manasideore6
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 
Steel & Timber Design according to British Standard
Steel & Timber Design according to British StandardSteel & Timber Design according to British Standard
Steel & Timber Design according to British Standard
AkolbilaEmmanuel1
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
Kamal Acharya
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
veerababupersonal22
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Soumen Santra
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
anoopmanoharan2
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
ssuser7dcef0
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 

Recently uploaded (20)

Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
The Role of Electrical and Electronics Engineers in IOT Technology.pdf
The Role of Electrical and Electronics Engineers in IOT Technology.pdfThe Role of Electrical and Electronics Engineers in IOT Technology.pdf
The Role of Electrical and Electronics Engineers in IOT Technology.pdf
 
Fundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptxFundamentals of Induction Motor Drives.pptx
Fundamentals of Induction Motor Drives.pptx
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 
Steel & Timber Design according to British Standard
Steel & Timber Design according to British StandardSteel & Timber Design according to British Standard
Steel & Timber Design according to British Standard
 
Water billing management system project report.pdf
Water billing management system project report.pdfWater billing management system project report.pdf
Water billing management system project report.pdf
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
 
PPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testingPPT on GRP pipes manufacturing and testing
PPT on GRP pipes manufacturing and testing
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 

8141891.pptx

  • 1. Probabilistic Models for Images Markov Random Fields Applications in Image Segmentation and Texture Modeling Ying Nian Wu UCLA Department of Statistics IPAM July 22, 2013
  • 2. Outline •Basic concepts, properties, examples •Markov chain Monte Carlo sampling •Modeling textures and objects •Application in image segmentation
  • 3. Markov Chains Pr(future|present, past) = Pr(future|present) future past | present Markov property: conditional independence limited dependence Makes modeling and learning possible
  • 4. Markov Chains(higher order) Temporal: a natural ordering Spatial: 2D image, no natural ordering
  • 5. Markov Random Fields all the other pixels Nearest neighborhood, first order neighborhood Markov Property From Slides by S. Seitz - University of Washington
  • 6. Markov Random Fields Second order neighborhood
  • 7. Markov Random Fields Can be generalized to any undirected graphs (nodes, edges) Neighborhood system: each node is connected to its neighbors neighbors are reciprocal Markov property: each node only depends on its neighbors Note: the black lines on the left graph are illustrating the 2D grid for the image pixels they are not edges in the graph as the blue lines on the right
  • 9. Cliques for this neighborhood Hammersley-Clifford Theorem normalizing constant, partition function potential functions of cliques From Slides by S. Seitz - University of Washington
  • 10. Cliques for this neighborhood Hammersley-Clifford Theorem a clique: a set of pixels, each member is the neighbor of any other member From Slides by S. Seitz - University of Washington Gibbs distribution
  • 11. Cliques for this neighborhood Hammersley-Clifford Theorem a clique: a set of pixels, each member is the neighbor of any other member ……etc, note: the black lines are for illustrating 2D grids, they are not edges in the graph Gibbs distribution
  • 12. Cliques for this neighborhood Ising model From Slides by S. Seitz - University of Washington
  • 13. Ising model Challenge: auto logistic regression pair potential
  • 14. Gaussian MRF model continuous Challenge: auto regression pair potential
  • 15. Sampling from MRF Models Markov Chain Monte Carlo (MCMC) • Gibbs sampler (Geman & Geman 84) • Metropolis algorithm (Metropolis et al. 53) • Swedeson & Wang (87) • Hybrid (Hamiltonian) Monte Carlo
  • 16.
  • 17. Gibbs Sampler Simple one-dimension distribution Repeat: • Randomly pick a pixel • Sample given the current values of
  • 18. Gibbs sampler for Ising model Challenge: sample from Ising model
  • 19. Metropolis Algorithm Repeat: • Proposal: Perturb I to J by sample from K(I, J) = K(J, I) • If change I to J otherwise change I to J with prob energy function
  • 20. Metropolis for Ising model Challenge: sample from Ising model Ising model: proposal --- randomly pick a pixel and flip it
  • 21. Modeling Images by MRF Ising model Exponential family model, log-linear model maximum entropy model unknown parameters features (may also need to be learned) reference distribution Hidden variables, layers, RBM
  • 22. Modeling Images by MRF Given How to estimate • Maximum likelihood • Pseudo-likelihood (Besag 1973) • Contrastive divergence (Hinton)
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38. Modeling image pixel labels as MRF (Ising) ( , ) i i x y  ( , ) i j x x  1 real image label image Slides by R. Huang – Rutgers University MRF for Image Segmentation Bayesian posterior
  • 39. Model joint probability label image label-label compatibility Function enforcing Smoothness constraint neighboring label nodes local Observations image-label compatibility Function enforcing Data Constraint ( , ) 1 ( , ) ( , ) ( , ) i j i i i j i P x x x y Z      x y * * ( , ) ( , ) argmax ( , | ) P     x x x y region labels image pixels model param. Slides by R. Huang – Rutgers University
  • 40. * 1 ( , ) ( , ) 2 2 2 2 2 arg max ( | ) 1 arg max ( , ) ( | ) ( , ) / ( ) ( , ) 1 arg max ( , ) ( , ) ( , ) ( , ) ( , ) ( , ) ( ; , ) ( , ) exp( ( ) / ) [ , , ] i i i i i i i j i i i j i i j i i j i i i x x i j i j x x P P P P P P Z x y x x P x y x x Z x y G y x x x x                             x x x x x y x y x y x y y x y x y ( , ) i i x y  ( , ) i j x x  Slides by R. Huang – Rutgers University MRF for Image Segmentation
  • 41. Inference in MRFs – Classical • Gibbs sampling, simulated annealing • Iterated conditional modes – State of the Art • Graph cuts • Belief propagation • Linear Programming • Tree-reweighted message passing Slides by R. Huang – Rutgers University
  • 42. Summary •MRF, Gibbs distribution •Gibbs sampler, Metropolis algorithm •Exponential family model