12 cv mil_models_for_grids
-
Upload
zukun -
Category
Technology
-
view
331 -
download
0
description
Transcript of 12 cv mil_models_for_grids
![Page 1: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/1.jpg)
Computer vision: models, learning and inference
Chapter 10 Graphical Models
Please send errata to [email protected]
![Page 2: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/2.jpg)
2
Models for grids
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
• Consider models where one unknown world state at each pixel in the image – takes the form of a grid.
• Loops in the graphical model so cannot use dynamic programming or belief propagation
• Define probability distributions that favour certain configurations of world states – Called Markov random fields– Inference using a set of techniques called graph cuts
![Page 3: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/3.jpg)
3Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Binary Denoising
Before AfterImage represented as binary discrete variables. Some proportion of pixels
randomly changed polarity.
![Page 4: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/4.jpg)
4Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Multi-label Denoising
Before AfterImage represented as discrete variables representing intensity. Some
proportion of pixels randomly changed according to a uniform distribution.
![Page 5: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/5.jpg)
5Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Denoising Goal
Observed Data Uncorrupted Image
![Page 6: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/6.jpg)
6
• Most of the pixels stay the same• Observed image is not as smooth as original
Now consider pdf over binary images that encourages smoothness – Markov random field
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Denoising Goal
Observed Data Uncorrupted Image
![Page 7: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/7.jpg)
7Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Markov random fields
This is just the typical property of an undirected model.We’ll continue the discussion in terms of undirected models
![Page 8: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/8.jpg)
8Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Markov random fields
Normalizing constant(partition function) Potential function
Returns positive number
Subset of variables(clique)
![Page 9: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/9.jpg)
9Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Markov random fields
Normalizing constant(partition function)
Cost functionReturns any number
Subset of variables(clique)Relationship
![Page 10: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/10.jpg)
10Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Smoothing example
![Page 11: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/11.jpg)
11Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Smoothing Example
Smooth solutions (e.g. 0000,1111) have high probabilityZ was computed by summing the 16 un-normalized probabilities
![Page 12: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/12.jpg)
12Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Smoothing Example
Samples from larger grid -- mostly smooth Cannot compute partition function Z here - intractable
![Page 13: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/13.jpg)
13Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Denoising Goal
Observed Data Uncorrupted Image
![Page 14: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/14.jpg)
14Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Denoising overviewBayes’ rule:
Likelihoods:
Prior: Markov random field (smoothness)
MAP Inference: Graph cuts
Probability of flipping polarity
![Page 15: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/15.jpg)
15Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Denoising with MRFs
Observed image, x
Original image, w
MRF Prior (pairwise cliques)
Inference :
Likelihoods
![Page 16: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/16.jpg)
16
MAP Inference
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Unary terms (compatability of data with label y)
Pairwise terms (compatability of neighboring labels)
![Page 17: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/17.jpg)
17Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Graph Cuts Overview
Unary terms (compatability of data with label y)
Pairwise terms (compatability of neighboring labels)
Graph cuts used to optimise this cost function:
Three main cases:
![Page 18: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/18.jpg)
18Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Graph Cuts Overview
Unary terms (compatability of data with label y)
Pairwise terms (compatability of neighboring labels)
Graph cuts used to optimise this cost function:
Approach:
Convert minimization into the form of a standard CS problem,
MAXIMUM FLOW or MINIMUM CUT ON A GRAPH
Polynomial-time methods for solving this problem are known
![Page 19: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/19.jpg)
19Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Max-Flow Problem
Goal:
To push as much ‘flow’ as possible through the directed graph from the source to the sink.
Cannot exceed the (non-negative) capacities cij associated with each edge.
![Page 20: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/20.jpg)
20Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Saturated Edges
When we are pushing the maximum amount of flow:
• There must be at least one saturated edge on any path from source to sink(otherwise we could push more flow)
• The set of saturated edges hence separate the source and sink
![Page 21: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/21.jpg)
21Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Augmenting Paths
Two numbers represent: current flow / total capacity
![Page 22: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/22.jpg)
22
Choose any route from source to sink with spare capacity and push as much flow as you can. One edge (here 6-t) will saturate.
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Augmenting Paths
![Page 23: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/23.jpg)
23Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Augmenting Paths
Choose another route, respecting remaining capacity. This time edge 5-6 saturates.
![Page 24: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/24.jpg)
24Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Augmenting Paths
A third route. Edge 1-4 saturates
![Page 25: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/25.jpg)
25Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Augmenting Paths
A fourth route. Edge 2-5 saturates
![Page 26: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/26.jpg)
26Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Augmenting Paths
A fifth route. Edge 2-4 saturates
![Page 27: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/27.jpg)
27There is now no further route from source to sink – there is a saturated edge along every possible route (highlighted arrows)
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Augmenting Paths
![Page 28: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/28.jpg)
28
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Augmenting Paths
The saturated edges separate the source from the sink and form the min-cut solution. Nodes either connect to the source or connect to the sink.
![Page 29: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/29.jpg)
Graph Cuts: Binary MRF
Unary terms (compatability of data with label w)
Pairwise terms (compatability of neighboring labels)
Graph cuts used to optimise this cost function:
First work with binary case (i.e. True label w is 0 or 1)
Constrain pairwise costs so that they are “zero-diagonal”
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
29
![Page 30: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/30.jpg)
Graph Construction• One node per pixel (here a 3x3 image)• Edge from source to every pixel node• Edge from every pixel node to sink• Reciprocal edges between neighbours
Note that in the minimum cut EITHER the edge connecting to the source will be cut, OR the edge connecting to the sink, but NOT BOTH (unnecessary).
Which determines whether we give that pixel label 1 or label 0.
Now a 1 to 1 mapping between possible labelling and possible minimum cuts
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
30
![Page 31: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/31.jpg)
Graph ConstructionNow add capacities so that minimum cut, minimizes our cost function
Unary costs U(0), U(1) attached to links to source and sink.
• Either one or the other is paid.
Pairwise costs between pixel nodes as shown.
• Why? Easiest to understand with some worked examples.
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
31
![Page 32: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/32.jpg)
Example 1
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
32
![Page 33: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/33.jpg)
Example 2
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
33
![Page 34: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/34.jpg)
Example 3
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
34
![Page 35: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/35.jpg)
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 35
![Page 36: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/36.jpg)
Graph Cuts: Binary MRF
Unary terms (compatability of data with label w)
Pairwise terms (compatability of neighboring labels)
Graph cuts used to optimise this cost function:
Summary of approach
• Associate each possible solution with a minimum cut on a graph• Set capacities on graph, so cost of cut matches the cost function• Use augmenting paths to find minimum cut• This minimizes the cost function and finds the MAP solution
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
36
![Page 37: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/37.jpg)
General Pairwise costs
Modify graph to
• Add P(0,0) to edge s-b• Implies that solutions 0,0 and
1,0 also pay this cost• Subtract P(0,0) from edge b-a
• Solution 1,0 has this cost removed again
Similar approach for P(1,1)
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
37
![Page 38: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/38.jpg)
Reparameterization
The max-flow / min-cut algorithms require that all of the capacities are non-negative.
However, because we have a subtraction on edge a-b we cannot guarantee that this will be the case, even if all the original unary and pairwise costs were positive.
The solution to this problem is reparamaterization: find new graph where costs (capacities) are different but choice of minimum solution is the same (usually just by adding a constant to each solution)
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
38
![Page 39: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/39.jpg)
Reparameterization 1
The minimum cut chooses the same links in these two graphsComputer vision: models, learning and inference. ©2011 Simon J.D. Prince
![Page 40: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/40.jpg)
Reparameterization 2
The minimum cut chooses the same links in these two graphsComputer vision: models, learning and inference. ©2011 Simon J.D. Prince
40
![Page 41: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/41.jpg)
Submodularity
Adding together implies
Subtract constant b
Add constant, b
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
41
![Page 42: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/42.jpg)
Submodularity
If this condition is obeyed, it is said that the problem is “submodular” and it can be solved in polynomial time.
If it is not obeyed then the problem is NP hard.
Usually it is not a problem as we tend to favour smooth solutions.
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
42
![Page 43: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/43.jpg)
Denoising Results
Original Pairwise costs increasing
Pairwise costs increasingComputer vision: models, learning and inference. ©2011 Simon J.D. Prince
43
![Page 44: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/44.jpg)
Plan of Talk
• Denoising problem• Markov random fields (MRFs)• Max-flow / min-cut• Binary MRFs – submodular (exact solution)• Multi-label MRFs – submodular (exact solution)• Multi-label MRFs - non-submodular (approximate)
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
44
![Page 45: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/45.jpg)
Construction for two pixels (a and b) and four labels (1,2,3,4)
There are 5 nodes for each pixel and 4 edges between them have unary costs for the 4 labels.
One of these edges must be cut in the min-cut solution and the choice will determine which label we assign.
Multiple Labels
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
45
![Page 46: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/46.jpg)
Constraint Edges
The edges with infinite capacity pointing upwards are called constraint edges.
They prevent solutions that cut the chain of edges associated with a pixel more than once (and hence given an ambiguous labelling)
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
46
![Page 47: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/47.jpg)
Multiple Labels
Inter-pixel edges have costs defined as:
Superfluous terms :
For all i,j where K is number of labelsComputer vision: models, learning and inference. ©2011 Simon J.D. Prince
47
![Page 48: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/48.jpg)
Example Cuts
Must cut links from before cut on pixel a to after cut on pixel b. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
48
![Page 49: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/49.jpg)
Pairwise Costs
If pixel a takes label I and pixel b takes label J
Must cut links from before cut on pixel a to after cut on pixel b.
Costs were carefully chosen so that sum of these links gives appropriate pairwise term.
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
49
![Page 50: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/50.jpg)
Reparameterization
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
50
![Page 51: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/51.jpg)
SubmodularityWe require the remaining inter-pixel links to be positive so that
or
By mathematical induction we can get the more general result
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
51
![Page 52: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/52.jpg)
Submodularity
If not submodular then the problem is NP hard.Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
52
![Page 53: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/53.jpg)
Convex vs. non-convex costs
Quadratic • Convex• Submodular
Truncated Quadratic• Not Convex• Not Submodular
Potts Model • Not Convex• Not Submodular
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
53
![Page 54: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/54.jpg)
What is wrong with convex costs?
• Pay lower price for many small changes than one large one• Result: blurring at large changes in intensity
Observed noisy image Denoised result
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
54
![Page 55: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/55.jpg)
Plan of Talk
• Denoising problem• Markov random fields (MRFs)• Max-flow / min-cut• Binary MRFs - submodular (exact solution)• Multi-label MRFs – submodular (exact solution)• Multi-label MRFs - non-submodular (approximate)
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
55
![Page 56: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/56.jpg)
Alpha Expansion Algorithm• break multilabel problem into a series of binary problems• at each iteration, pick label a and expand (retain original or change to a)
Initial labelling
Iteration 1 (orange)
Iteration 3 (red)
Iteration 2 (yellow)
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
56
![Page 57: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/57.jpg)
Alpha Expansion Ideas• For every iteration– For every label– Expand label using optimal graph cut solution
Co-ordinate descent in label space.Each step optimal, but overall global maximum not guaranteedProved to be within a factor of 2 of global optimum. Requires that pairwise costs form a metric:
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
57
![Page 58: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/58.jpg)
Alpha Expansion Construction
Binary graph cut – either cut link to source (assigned to a) or to sink (retain current label)
Unary costs attached to links between source, sink and pixel nodes appropriately.Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
58
![Page 59: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/59.jpg)
Alpha Expansion Construction
Graph is dynamic. Structure of inter-pixel links depends on a and the choice of labels.
There are four cases.
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
59
![Page 60: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/60.jpg)
Alpha Expansion Construction
Case 1:
Adjacent pixels both have label a already.Pairwise cost is zero – no need for extra edges.
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
60
![Page 61: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/61.jpg)
Alpha Expansion Construction
Case 2: Adjacent pixels are ,a b. Result either
• ,a a (no cost and no new edge).• ,a b (P( ,a b), add new edge).
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
61
![Page 62: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/62.jpg)
Alpha Expansion Construction
Case 3: Adjacent pixels are ,b b. Result either • ,b b (no cost and no new edge).• ,a b (P( ,a b), add new edge).• ,b a (P( ,b a), add new edge).
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
62
![Page 63: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/63.jpg)
Alpha Expansion Construction
Case 4: Adjacent pixels are ,b g. Result either • ,b g (P( ,b g), add new edge).• ,a g (P( ,a g), add new edge).• ,b a (P( ,b a), add new edge).• ,a a (no cost and no new edge).Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
63
![Page 64: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/64.jpg)
Example Cut 1
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
64
![Page 65: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/65.jpg)
Example Cut 1Important!
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
65
![Page 66: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/66.jpg)
Example Cut 2
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
66
![Page 67: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/67.jpg)
Example Cut 3
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
67
![Page 68: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/68.jpg)
Denoising Results
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
68
![Page 69: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/69.jpg)
69Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Conditional Random Fields
![Page 70: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/70.jpg)
70Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Directed model for grids
Cannot use graph cuts as three-wise term. Easy to draw samples.
![Page 71: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/71.jpg)
71Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
• Background subtraction
Applications
![Page 72: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/72.jpg)
72Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
• Grab cut
Applications
![Page 73: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/73.jpg)
73Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
• Stereo vision
Applications
![Page 74: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/74.jpg)
74Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
• Shift-map image editing
Applications
![Page 75: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/75.jpg)
75Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
![Page 76: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/76.jpg)
76Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
• Shift-map image editing
Applications
![Page 77: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/77.jpg)
77Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
• Super-resolution
Applications
![Page 78: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/78.jpg)
78Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
• Texture synthesis
Applications
![Page 79: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/79.jpg)
79Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
Image Quilting
![Page 80: 12 cv mil_models_for_grids](https://reader037.fdocuments.in/reader037/viewer/2022110115/54beb4b34a795902278b46a2/html5/thumbnails/80.jpg)
80Computer vision: models, learning and inference. ©2011 Simon J.D. Prince
• Synthesizing faces
Applications