Contextual Classification by Melanie Ganz Lecture 6, Medical Image Analysis 2008.

Slides:



Advertisements
Similar presentations
Review Of Statistical Mechanics
Advertisements

Molecular Dynamics at Constant Temperature and Pressure Section 6.7 in M.M.
Introduction to Markov Random Fields and Graph Cuts Simon Prince
Markov random field Institute of Electronics, NCTU
Chapter 8-3 Markov Random Fields 1. Topics 1. Introduction 1. Undirected Graphical Models 2. Terminology 2. Conditional Independence 3. Factorization.
Visual Recognition Tutorial
Optimal solution of binary problems Much material taken from :  Olga Veksler, University of Western Ontario
MAE 552 – Heuristic Optimization Lecture 6 February 6, 2002.
2010/5/171 Overview of graph cuts. 2010/5/172 Outline Introduction S-t Graph cuts Extension to multi-label problems Compare simulated annealing and alpha-
1 Markov random field: A brief introduction Tzu-Cheng Jen Institute of Electronics, NCTU
Conditional Random Fields
Announcements Readings for today:
Simulated Annealing 10/7/2005.
Simulated Annealing Van Laarhoven, Aarts Version 1, October 2000.
Monte Carlo Simulation of Ising Model and Phase Transition Studies
Visual Recognition Tutorial
Computer vision: models, learning and inference
CPSC 422, Lecture 18Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 18 Feb, 25, 2015 Slide Sources Raymond J. Mooney University of.
D Nagesh Kumar, IIScOptimization Methods: M1L4 1 Introduction and Basic Concepts Classical and Advanced Techniques for Optimization.
Introduction to Simulated Annealing 22c:145 Simulated Annealing  Motivated by the physical annealing process  Material is heated and slowly cooled.
Robin McDougall, Ed Waller and Scott Nokleby Faculties of Engineering & Applied Science and Energy Systems & Nuclear Science 1.
Image Analysis and Markov Random Fields (MRFs) Quanren Xiong.
Monte Carlo Simulation of Ising Model and Phase Transition Studies By Gelman Evgenii.
1 IE 607 Heuristic Optimization Simulated Annealing.
CS774. Markov Random Field : Theory and Application Lecture 13 Kyomin Jung KAIST Oct
Simulated Annealing.
The Ising Model Mathematical Biology Lecture 5 James A. Glazier (Partially Based on Koonin and Meredith, Computational Physics, Chapter 8)
Markov Random Fields Probabilistic Models for Images
Markov Chain Monte Carlo and Gibbs Sampling Vasileios Hatzivassiloglou University of Texas at Dallas.
Xu Huaping, Wang Wei, Liu Xianghua Beihang University, China.
1 Markov Random Fields with Efficient Approximations Yuri Boykov, Olga Veksler, Ramin Zabih Computer Science Department CORNELL UNIVERSITY.
Iterative Improvement Algorithm 2012/03/20. Outline Local Search Algorithms Hill-Climbing Search Simulated Annealing Search Local Beam Search Genetic.
1 Markov random field: A brief introduction (2) Tzu-Cheng Jen Institute of Electronics, NCTU
Molecular Modelling - Lecture 2 Techniques for Conformational Sampling Uses CHARMM force field Written in C++
CS 361 – Chapter 16 Final thoughts on minimum spanning trees and similar problems Flow networks Commitment: –Decide on presentation order.
ChE 452 Lecture 17 Review Of Statistical Mechanics 1.
Austin Howard & Chris Wohlgamuth April 28, 2009 This presentation is available at
MCMC (Part II) By Marc Sobel. Monte Carlo Exploration  Suppose we want to optimize a complicated distribution f(*). We assume ‘f’ is known up to a multiplicative.
Lecture #9: Introduction to Markov Chain Monte Carlo, part 3
Exact Inference in Bayes Nets. Notation U: set of nodes in a graph X i : random variable associated with node i π i : parents of node i Joint probability:
Motion Estimation using Markov Random Fields Hrvoje Bogunović Image Processing Group Faculty of Electrical Engineering and Computing University of Zagreb.
A global approach Finding correspondence between a pair of epipolar lines for all pixels simultaneously Local method: no guarantee we will have one to.
Efficient Belief Propagation for Image Restoration Qi Zhao Mar.22,2006.
Graph Algorithms for Vision Amy Gale November 5, 2002.
Lecture 5: Statistical Methods for Classification CAP 5415: Computer Vision Fall 2006.
Lecture 18, CS5671 Multidimensional space “The Last Frontier” Optimization Expectation Exhaustive search Random sampling “Probabilistic random” sampling.
1 Multi Scale Markov Random Field Image Segmentation Taha hamedani.
CSC321: Introduction to Neural Networks and Machine Learning Lecture 17: Boltzmann Machines as Probabilistic Models Geoffrey Hinton.
Markov Random Fields in Vision
Ch 6. Markov Random Fields 6.1 ~ 6.3 Adaptive Cooperative Systems, Martin Beckerman, Summarized by H.-W. Lim Biointelligence Laboratory, Seoul National.
Computational Physics (Lecture 10) PHY4370. Simulation Details To simulate Ising models First step is to choose a lattice. For example, we can us SC,
Bayesian Neural Networks
Computational Physics (Lecture 10)
Statistical-Mechanical Approach to Probabilistic Image Processing -- Loopy Belief Propagation and Advanced Mean-Field Method -- Kazuyuki Tanaka and Noriko.
Van Laarhoven, Aarts Version 1, October 2000
CSC321: Neural Networks Lecture 19: Boltzmann Machines as Probabilistic Models Geoffrey Hinton.
Markov Random Fields with Efficient Approximations
STEREO MATCHING USING POPULATION-BASED MCMC
Binarization of Low Quality Text Using a Markov Random Field Model
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 18
Haim Kaplan and Uri Zwick
Heuristic search INT 404.
Yield Optimization: Divide and Conquer Method
Regulation Analysis using Restricted Boltzmann Machines
Expectation-Maximization & Belief Propagation
Xin-She Yang, Nature-Inspired Optimization Algorithms, Elsevier, 2014
More on HW 2 (due Jan 26) Again, it must be in Python 2.7.
Markov Networks.
Simulated Annealing & Boltzmann Machines
Outline Texture modeling - continued Markov Random Field models
Presentation transcript:

Contextual Classification by Melanie Ganz Lecture 6, Medical Image Analysis 2008

Data Labels Predicted labelsOverlap Motivation

The KNN pixel classifier we use in the CVD project does not use contextual information. But what kind of methods are there that take advantage of contextual information? Before we get into that, we need to take a look at what context means and learn about the mathematical way of describing structures. To do this we return to physics..... But we have enough sample data to try to acquire contextual information (e.g. joint probability distribution) from it!

Spins s i with +1 or -1 Net Magnetisation Ising-Model A magnet can be thought of as a a grid, on which at every grid point we have a small arrow, which represents the spin of the atom sitting there. The magnetisation of the complete magnet can then be described as the difference between up and down spins.

Ising-Model on Images We can think of an image as being the same thing: The gridpoints are our pixels and the intensities can be divided into e.g. two classes (in this example case red and yellow equals +/- 1). Just as we can calculate the net magnetisation in a magnet, we can calculate a similar, global entity for an image.

Ising-Model on Images Instead of calculating the magnetisation we calculate the energy state of our image (we could have done the same thing for the magnet). There are many different formulations to calculate the energy. Let us stick to our example before and borrow the energy formulation for a magnet: Sigma and H are only constants and s are the spins with value +/- 1.

This way we can calculate an energy value E for every configuration of our 5 by 5 grid. Some configurations will end up having the same energy value, what should one do about that? We need to know how probable the energy value we calculate for an image is! Ising-Model on Images

We convert our energy into a probability by using an analogy from physics (we assume that particles are Boltzmann distributed). This way we get: Z is a normalizing factor (the partition function), E is the energy we calculate and T is the temparature that the system/image is in. Ising-Model on Images

Knowing the energy value of a configuration and the probability of the configuration we can tackle the question: What colour should our green pixel be? The most probable state of the whole image will be the one with minimal energy. Therefore we decide to minimize the global energy function by choosing our pixel to be either red or yellow. Ising-Model on Images

Different methods There are many different methods to minimize the global energy function of a system. I will try to briefly explain three of them: Markov Chain Monte Carlo Methods Simulated Annealing (Geman,Geman,”Stochastic Relaxation, Gibbs Distributions, and the Bayesian Restoration of Images”, 1984) Graph Cuts ( To understand those methods it is important to have some knowledge of Markov Chains (MC) and Markov Random Fields (MRF) (Li, “Markov Random Field Modelling in Image Analysis”, 2001, p ).

Markov Chains Markov Chains are time series (i.e. there is a clear ordering of observations), where : This means that the probability of the outcome of the next step depends only on the step directly before. It doesn’t involve steps that are ”older”.

Markov Random Fields Sites are the basic entity, e.g. pixels, and can be regular or irregular. Labels are the ‘values’ these sites can take, e.g. pixel values or classes. A neigborhood N, given a set of sites S, is given by N = {N i } for all i in S.

Markov Random Fields Random Fields are... In an MRF, the sites in S are related to one another via a neighborhood system, which is defined as N = {N i, i in S}. Here N i is the set of sites neighbouring i, for i not equal to N i and i in N j as well as j in N i. A random field X is said to be an MRF on S with respect to a neighbourhood system N if and only if

Questions? Everything clear? What have we talked about? What are the basic concepts? What do you need now?

A Break

Different methods Markov Chain Monte Carlo Methods Simulated Annealing Graph Cuts

Markov Chain Monte Carlo Methods There are different examples of Markov Monte Carlo Methods: Random walk algorithms Metropolis Hastings algorithm: This is an algorithm that creates a Markov chain that can reproduce samples that stem from a probability distribution that can not be sampled directly. Then from the samples the distribution can be approximated. ( Gibbs sampling: special case of the above algorithm. and more... Avoiding random walks There are also other algorithms that avoid to use a random walk, but rather direct their steps.

Simulated Annealing Simulated annealing: probabilistic algorithm for global optimization problems. It aims at locating a good approximation to the global minimum of a given function. The name and inspiration come from a technique called annealing in metallurgy. This technique involves heating and controlled cooling of a material. The heat causes the atoms to oscillate and wander randomly through states of higher energy. The following slow cooling gives them more chances of finding configurations with lower energy than the initial one.

Simulated Annealing The idea is that we first perturb (=”kick”) the parameters of the sytem and therefore ”heat” it up. Then we ”cool” it down again and let is assume a hopefully energetically more advantegous state. By doing this a couple times we can reach the global energy minimum.

Graph Cuts s t a cut s t We look at the image as if it would be a MRF. Then we try to find the cut through the graph with the minimal cost, which can be found with the Ford-Fulkerson algorithm. sink source

The Ford-Fulkerson Algorithm This is a directed graph.

The Ford-Fulkerson Algorithm We find a path through the graph.

The Ford-Fulkerson Algorithm We push as much flow as possible through it.

The Ford-Fulkerson Algorithm We find a new path through the graph.

The Ford-Fulkerson Algorithm Again we push as much flow as possible through it.

The Ford-Fulkerson Algorithm We find yet another path through the graph.

The Ford-Fulkerson Algorithm And push flow through the graph.

The Ford-Fulkerson Algorithm Now the graph has no paths left; no more flow can be pushed through it. The maximal flow we achieved is 23.

Maximum Flow & Minimum Cut The maximum flow is the flow that can maximally be pushed through a graph. A minimum cut is a cut of the graph with minimal cost. The minimum cut is found at saturated edges (edges where the flow has been exhausted). Without neighbor interactions With neighbor interactions

Questions? More Questions? Exercises...

Exercises % This script gives a small introduction into graph cuts and how to use % them. % % Melanie Ganz, April 2008 % clear all close all disp('Running') nNodes=4; %Node,source,sink TerminalWeights=[ 1,16,0; 2,13,0; 3,0,20; 4,0,4] %From,To,Capacity,Rev_Capacity EdgeWeights=[ 1,2,10,4; 1,3,12,0; 2,3,0,9; 2,4,14,0; 3,4,0,7 ] mex GraphCutMex.cpp MaxFlow.cpp graph.cpp [Cut,Flow]=GraphCutMex(nNodes,TerminalWeights,EdgeWeights) disp (' ')