Monte Carlo Methods:

Similar documents
Monte Carlo Integration II & Sampling from PDFs

STOCHASTIC & DETERMINISTIC SOLVERS

Monte Carlo Radiation Transfer I

High-Order Similarity Relations in Radiative Transfer: Supplementary Document

Monte Carlo Integration. Computer Graphics CMU /15-662, Fall 2016

MCRT: L4 A Monte Carlo Scattering Code

Detectors in Nuclear Physics: Monte Carlo Methods. Dr. Andrea Mairani. Lectures I-II

Enrico Fermi and the FERMIAC. Mechanical device that plots 2D random walks of slow and fast neutrons in fissile material

Analysis of Scattering of Radiation in a Plane-Parallel Atmosphere. Stephanie M. Carney ES 299r May 23, 2007

Weighting Functions and Atmospheric Soundings: Part I

Monte Carlo Radiation Transport Kenny Wood

MCRT L10: Scattering and clarification of astronomy/medical terminology

Chapter V: Cavity theories

Multiple-source optical diffusion approximation for a multilayer scattering medium

ULTRAFAST LASER PULSE TRAIN RADIATION TRANSFER IN A SCATTERING-ABSORBING 3D MEDIUM WITH AN INHOMOGENEITY

Scientific Computing: Monte Carlo

Monte Carlo Radiation Transport Kenny Wood

Statistics 100A Homework 1 Solutions

Radiative Transfer Multiple scattering: two stream approach 2

I ν. di ν. = α ν. = (ndads) σ ν da α ν. = nσ ν = ρκ ν

2 The Radiative Transfer Equation

Fundametals of Rendering - Radiometry / Photometry

Lichtausbreitung in streuenden Medien: Prinzip und Anwendungsbeispiele

Influence of the grain shape on the albedo and light extinction in snow

Neutron Interactions Part I. Rebecca M. Howell, Ph.D. Radiation Physics Y2.5321

Lecture 4* Inherent optical properties, IOP Theory. Loss due to absorption. IOP Theory 12/2/2008

CMPSCI 240: Reasoning about Uncertainty

Classical and Improved Diffusion Theory for Subsurface Scattering

Statistical Methods in Particle Physics. Lecture 2

MCSHAPE: A MONTE CARLO CODE FOR SIMULATION OF POLARIZED PHOTON TRANSPORT

Fast simulation of finite-beam optical coherence tomography of inhomogeneous turbid media

Random variables. DS GA 1002 Probability and Statistics for Data Science.

Modern Methods of Data Analysis - WS 07/08

The mathematics of scattering and absorption and emission

Physics for Scientists & Engineers 2

MAT 271E Probability and Statistics

Math 105 Course Outline

6. MC data analysis. Doing experiments or complex simulations can be quite time-consuming, expensive, or both.

Waves & Oscillations

1: PROBABILITY REVIEW

1. The most important aspects of the quantum theory.

Electricity & Optics

6. MC data analysis. [Numerical Recipes 15.6, own derivation] Basics of Monte Carlo simulations, Kai Nordlund

16 : Markov Chain Monte Carlo (MCMC)

1.225J J (ESD 205) Transportation Flow Systems

CHARGED PARTICLE INTERACTIONS

Midterm Exam 1 Solution

Lecture 2: From Classical to Quantum Model of Computation

DISCRETE RANDOM VARIABLES: PMF s & CDF s [DEVORE 3.2]

Random Processes. DS GA 1002 Probability and Statistics for Data Science.

Probability Theory Review

Tutorial 1 : Probabilities

Math 151. Rumbos Fall Solutions to Review Problems for Exam 2. Pr(X = 1) = ) = Pr(X = 2) = Pr(X = 3) = p X. (k) =

Numerical Methods I Monte Carlo Methods

Robert Collins CSE586, PSU Intro to Sampling Methods

Frequency domain photon migration in the -P 1 approximation: Analysis of ballistic, transport, and diffuse regimes

E X A M. Probability Theory and Stochastic Processes Date: December 13, 2016 Duration: 4 hours. Number of pages incl.

Particle Interactions in Detectors

Brandon C. Kelly (Harvard Smithsonian Center for Astrophysics)

Lecture 2 Solutions to the Transport Equation

Lecture 26. Regional radiative effects due to anthropogenic aerosols. Part 2. Haze and visibility.

Lecture 3. Discrete Random Variables

IEOR 3106: Introduction to Operations Research: Stochastic Models. Professor Whitt. SOLUTIONS to Homework Assignment 1

Statistics: Learning models from data

= nm. = nm. = nm

Robert Collins CSE586, PSU Intro to Sampling Methods

Properties of Continuous Probability Distributions The graph of a continuous probability distribution is a curve. Probability is represented by area

The atom cont. +Investigating EM radiation

Course: ESO-209 Home Work: 1 Instructor: Debasis Kundu

Electromagnetic spectra

MODERN OPTICS. P47 Optics: Unit 9

IGD-TP Exchange Forum n 5 WG1 Safety Case: Handling of uncertainties October th 2014, Kalmar, Sweden

The Radiative Transfer Equation

noise = function whose amplitude is is derived from a random or a stochastic process (i.e., not deterministic)

MAT 271E Probability and Statistics

Northwestern University Department of Electrical Engineering and Computer Science

ik () uk () Today s menu Last lecture Some definitions Repeatability of sensing elements

Super-exponential extinction of radiation in a negatively-correlated random medium

Diffuse Optical Spectroscopy: Analysis of BiophotonicsSignals Short Course in Computational Biophotonics Albert Cerussi Day 4/Lecture #2

Robert Collins CSE586, PSU Intro to Sampling Methods

Parametric Models. Dr. Shuang LIANG. School of Software Engineering TongJi University Fall, 2012

Physics 2D Lecture Slides Week of May 11,2009. Sunil Sinha UCSD Physics

The Interaction of Light and Matter: α and n

Lecture 2: Repetition of probability theory and statistics

Brief Introduction to: Transport Theory/Monte Carlo Techniques/MCNP

ME 476 Solar Energy UNIT TWO THERMAL RADIATION

Name: Firas Rassoul-Agha

Monte Carlo Methods in High Energy Physics I

Statistical Methods for Particle Physics Lecture 1: parameter estimation, statistical tests

University of Cyprus. Reflectance and Diffuse Spectroscopy

1. Waves and Particles 2. Interference of Waves 3. Wave Nature of Light

22.54 Neutron Interactions and Applications (Spring 2004) Chapter 1 (2/3/04) Overview -- Interactions, Distributions, Cross Sections, Applications

Modeling Uncertainty in the Earth Sciences Jef Caers Stanford University

Lecture 2. October 21, Department of Biostatistics Johns Hopkins Bloomberg School of Public Health Johns Hopkins University.

Module 5 : Plane Waves at Media Interface. Lecture 36 : Reflection & Refraction from Dielectric Interface (Contd.) Objectives

Probability measures A probability measure, P, is a real valued function from the collection of possible events so that the following

Optics.

Recursive Estimation

Deep Learning for Computer Vision

MAT 271E Probability and Statistics

Transcription:

Short Course on Computational Monte Carlo Methods: Fundamentals Shuang Zhao Assistant Professor Computer Science Department University of California, Irvine Shuang Zhao 1

Teaching Objective Introducing Monte Carlo integration As a stochastic quadrature method Advantages/disadvantages Introducing the stochastics model of light transport in tissue Show how these simple ideas can be extended to the simulation of light transport VP Short Course 2017 Shuang Zhao 2

Outline 1. Monte Carlo integration A powerful numerical tool for estimating complex integrals 2. Radiative transfer The physical framework governing light propagation in translucent materials (including human tissue) 3. Monte Carlo solution to the radiative transfer equation Basically, 1 + 2 Shuang Zhao 3

Shuang Zhao 4

Monte Carlo Integration VP Short Course 2017 Shuang Zhao 5

Why Monte Carlo? A powerful tool for numerically estimating complex integrals The gold standard approach to simulate light transport in tissue Advantages: Provides estimates with quantifiable uncertainty Adaptable to systems with complex geometries Shuang Zhao 6

Monte Carlo Integration A powerful framework for computing integrals Numerical Nondeterministic (i.e., using randomness) Scalable to high-dimensional problems Shuang Zhao 7

Random Variables (Discrete) random variable X Possible outcomes: x 1, x 2,, x n with probability masses p 1, p 2,, p n such that E.g., fair coin Outcomes: x 1 = head, x 2 = tail Probabilities: p 1 = p 2 = ½ Shuang Zhao 8

Random Variables (Continuous) random variable X Possible outcomes: with probability density function (PDF) p(x) satisfying Shuang Zhao 9

Strong Law of Large Numbers Let x 1, x 2,, x n be n independent observations (aka. samples) of X Sample mean Actual mean Shuang Zhao 10

Example: Evaluating π Unit circle S Let X be a point uniformly distributed in the square Let, then Circle area = π Square area = 4 Shuang Zhao 11

Example: Evaluating π Unit circle S Simple solution for computing π: Generate n samples x 1,, x n independently Circle area = π Square area = 4 Compute Live demo Shuang Zhao 12

Example: Evaluating π Shuang Zhao 13

Integral One-dimensional High-dimensional Shuang Zhao 14

Deterministic Integration Quadrature rule: Scales poorly with high dimensionality: Needs n m bins for a m-dimensional problem We have a high-dimensional problem! Shuang Zhao 15

Monte Carlo Integration: Overview Goal: Estimating Idea: Constructing random variable Such that is called an unbiased estimator of But how? Shuang Zhao 16

Monte Carlo Integration Let p() be any probability density function over Γ and X be a random variable with density p Let, then: To estimate : strong law of large numbers Shuang Zhao 17

Monte Carlo Integration Goal: to estimate Pick a probability density function p(x) Generate n independent samples: How? Evaluate for j = 1, 2,, n Return sample mean: Shuang Zhao 18

PDF Sampling A universal method for geniting i.i.d samples from (almost) arbitrary one-dimensional PDFs Given a 1D distribution with PDF f(x), its cumulative density function (CDF) is given by Let, then follows the distribution given by f VP Short Course 2017 Shuang Zhao 19

How to pick density function p()? In theory (Almost) anything In practice: Uniform distributions (almost) always work As long as the domain is bounded Choice of p() greatly affects the effectiveness (i.e., convergence rate) of the resulting estimator Shuang Zhao 20

Monte Carlo Integration Hello, World! Estimating Algorithm: Draw i.i.d x 1, x 2,, x n uniformly from [0, 1) Return Live demo Shuang Zhao 21

Monte Carlo Integration Hello, World! Estimating Shuang Zhao 22

Monte Carlo Integration Goal: to estimate Pick a probability density function p(x) Generate n independent samples: Evaluate for j = 1, 2,, n Return sample mean: Shuang Zhao 23

Central Limit Theorem Let variables with Let be a sequence of i.i.d. random for all i, then Sample mean Estimation error In case of Monte Carlo integration, we have random variable <I> with. It follows that Confidence interval The size of the confidence interval shrinks at a rate of Shuang Zhao 24

Convergence Rate of MC Methods Monte Carlo methods have convergence rates of Evaluating π Evaluating definite integral Shuang Zhao 25

Radiative Transfer VP Short Course 2017 Shuang Zhao 26

Recap: Radiance In Lecture 1, we learnt that radiance L(r, Ω, t) is the central quantity of interest for many biomedical problems For example: defines the fluence at r and time t Shuang Zhao 27

Recap: Radiance Radiance generally depends on tissue geometry & optical properties as well as the source Example: Collimated beam Tissue The rest of this lecture focuses on estimating the radiance field given these information Shuang Zhao 28

Radiative Transfer A physical model describing light propagation in translucent materials based on geometric optics Shuang Zhao 29

Translucent Materials (Materials allowing light to scatter within) Human skin Cloud Milk Shuang Zhao 30

Geometric Optics Describe light as rays Light travels in straight lines in homogeneous media Accurate where the wave characteristics (e.g., diffraction, interference) of light propagation are not prominent Shuang Zhao 31

Stochastic Model Light enters a material and scatters around before eventually leaving or being absorbed X Absorbed Scattered Translucent material (e.g., human tissue) Shuang Zhao 32

Radiative Transfer Equation (RTE) Governs the radiance field L inside volume Boundary condition: radiance L on the boundary Shuang Zhao 33

Radiative Transfer Equation (RTE) Governs the radiance field L inside volume Boundary condition: radiance L on the boundary Steady-state version (i.e., assuming ) First-order integro-differential equation Shuang Zhao 34

Radiative Transfer Equation (RTE) In-scattering Out-scattering & absorption Emission Differential radiance In-scattering Out-scattering & absorption Emission Shuang Zhao 35

Radiative Transfer Equation (RTE) Differential radiance In-scattering Out-scattering & absorption Emission Scattering coefficient: Phase function: Extinction coefficient: Source term:, a probability density for Ω Shuang Zhao 36

Integral Form of the RTE (IRTE) Integro-differential equation Integral equation It is desirable to rewrite the RTE as an integral equation Better suited to the stochastic model Easier to solve numerically Shuang Zhao 37

Integral Form of the RTE (IRTE) Transmittance In-scattering Emission Transmittance Boundary cond. Transmittance: Shuang Zhao 38

Monte Carlo Solution to the Radiative Transfer Equation VP Short Course 2017 Shuang Zhao 39

General Measurements Many biomedical problems requires numerically evaluating integrals of the form f is called the measurement function and is given by the detector Example 1: An internal detector at at this point: measuring the fluence Shuang Zhao 40

General Measurements Example 2: A surface detector measuring irradiance: where θ is the angle between -Ω and the surface normal at r Shuang Zhao 41

General Measurements General measurements can again be estimated using Monte Carlo integration By picking some density p(r, Ω), we have an unbiased estimator Next, we focus on estimating the radiance L, which is the solution of the RTE Shuang Zhao 42

Recap: the IRTE where and Transmittance In-scattering Emission For simpler derivations, we assume the medium to be infinite, causing the second term to vanish Shuang Zhao 43

Solving the IRTE using Monte Carlo where and Consider estimating L(r 0, Ω 0 ) for some fixed r 0 and Ω 0 : Transmittance In-scattering Emission MC integration Shuang Zhao 44

Solving the IRTE using Monte Carlo where and Transmittance In-scattering Emission F 0 contains another integral, so we apply MC integration again: Transmittance In-scattering Emission Shuang Zhao 45

Solving the IRTE using Monte Carlo where and Putting everything together, we get Transmittance In-scattering Emission To obtain L(r 1, Ω 1 ), we simply repeat this whole process starting with r 1 and Ω 1 Shuang Zhao 46

Solving the IRTE using Monte Carlo Transmittance In-scattering Emission Pseudocode: Radiance(r,Ω): draw τ from some pdf p(τ) r 1 = r τ*ω draw Ω 1 from some pdf p(ω 1 ) return T(r 1 r)/p(τ)* ( μ s (r 1 )*p(r 1,Ω 1 Ω)*Radiance(r 1,Ω 1 ) + Q(r 1,Ω) ) Shuang Zhao 47

Solving the IRTE using Monte Carlo Transmittance In-scattering Emission This process effectively constructs a photon path or biography: (r 0, Ω 0 ), (r 1, Ω 1 ), (r 2, Ω 2 ), This construction starts from r 0 on the detector. There exists an adjoint version that starts from the source. Shuang Zhao 48

Solving the IRTE using Monte Carlo Transmittance In-scattering Emission Pseudocode: Radiance(r,Ω): draw τ from some pdf p(τ) Free distance sampling r 1 = r τ*ω draw Ω 1 from some pdf p(ω 1 ) Incident dir. sampling return T(r 1 r 0 )/p(τ)* ( μ s (r 1 )*p(r 1,Ω 1 Ω)*Radiance(r 1,Ω 1 ) + Q(r 1,Ω) ) Shuang Zhao 49

Sampling Incident Direction Transmittance In-scattering Emission Transmittance In-scattering Emission To draw the incident direction, we simply follows the stochastic model by setting p(ω 1 ) based on the phase function at r 1 and Ω 0 This cancels out the phase function term in the nominator Shuang Zhao 50

Sampling Free Distance Transmittance In-scattering Emission To sample the free-flight distance τ, it is desirable to cancel out the transmittance term This can be done by setting, yielding In-scattering Emission Shuang Zhao 51

Sampling Free Distance For homogeneous media, we have and We can draw τ from this exponential distribution using the PDF sampling method: The CDF is Let, then Shuang Zhao 52

Stochastic Model vs. Monte Carlo The Monte Carlo solution to the RTE is equivalent to the stochastic model captures the likelihood for light to collide with some particle in the medium follows the phase function Scattered Shuang Zhao 53 This Biophotonics is NOT 2017 the only solution: other probabilities can be used if necessary

Absorption Weighting In-scattering Emission During the construction of the photon biography, the weight of a photon decreases at each collision due to the scaling factor of is usually called the single-scattering albedo Two interpretations: at each collision, The photon gets absorbed with probability (1 α) The photon s weight scales down with a factor of α Shuang Zhao 54

Analog In-scattering Emission Pseudocode: Radiance(r,Ω): draw τ from r 1 = r τ*ω draw Ω 1 from rad = Q(r 1,Ω)/μ t (r 1 ) if rand() < μ s (r 1 )/μ t (r 1 ): rad += Radiance(r 1,Ω 1 ) return rad Shuang Zhao 55

Discrete Absorption Weighting In-scattering Emission Pseudocode: Radiance(r,Ω): draw τ from r 1 = r τ*ω draw Ω 1 from rad = Q(r 1,Ω)/μ t (r 1 ) rad += μ s (r 1 )/μ t (r 1 )*Radiance(r 1,Ω 1 ) return rad Shuang Zhao 56

Analog vs. DAW Analog is faster DAW offers cleaner results Shuang Zhao 57

Monte Carlo for Inverse Problem Monte Carlo method can also be applied to solve the inverse radiative transfer problem i.e., given some measurement I, need to solve for μ t, μ s, and p The inverse problem is generally more challenging and modeled as an optimization where I 0 is the provided measurement and I is that given by scattering parameters μ t, μ s, and p Also need to determine which norm ( ) to use Shuang Zhao 58

Monte Carlo integration is also used to render photorealistic images Shuang Zhao 59

Colored Explosion [Kutz et al. 2017] Shuang Zhao 60

Soap, Olive Oil, Curacao, and Milk [Gkioulekas et al. 2013] Shuang Zhao 61

Take Home Message Radiative transfer is an accurate model for light propagation in translucent materials when wave effects and not prominent Monte Carlo solution to the RTE provides a gold standard for simulating light propagation in tissue The flexibility of the Monte Carlo framework allows future research toward more efficient estimators Shuang Zhao 62