Sie sind auf Seite 1von 117

CS468:

Machine Learning for 3D Data


Anastasia Dubrovina, Leonidas Guibas, Hao Su
Stanford University
Computational Topology and
Topological Data Analysis (TDA)

Topology —
Computational Topology

Homology — Persistent
Homology

Slides ack: Afra Zomorodian, Ryan Lewis,


Robert Ghrist

2
Computational Topology

Herbert Edelsbrunner Afra Zomorodian

Gunnar Carlsson

Robert Ghrist 3
Frederic Chazal
Some Textbooks

4
Topology and Topology Inference
Topology is the branch of mathematics that
studies the connectivity of spaces, and the
obstructions to such connectivity
Topology studies global structure
Algebraic
Topological structures:
Spaces vector spaces,
groups, rings

algebraic topology
homology
Sampled
approximations,
complexes 5
From Data to Algebraic Objects

Homology groups as
data descriptors 6
Topology

The bridges of
Köningsberg

7
Connectivity for 2-Manifolds:
Ordinary Surfaces
Topology does not take distances too seriously – we
are allowed to stretch and shrink
Homeomorphism: 1-1, onto, bi-continuous

But we care about cutting, puncturing, stitching, gluing


Note: connectivity information is indexed by dimension 8


2-Manifold Zoo

Sphere

Torus

9
More Exotic Animals
Möbius strip

Projective plane
Cross cap + disk

Klein bottle

10
Projective Plane

11
Sampled Spaces
and
Topological Data Analysis

12
Recovering “Shape” from
Sampled Data

Aim: recover the topology of the underlying space from which the data was sampled
13
Example: The Space of Natural
Images
(Carlsson, Ishkanov, de Silva, Zomorodian IJCVC 2008)

Lee-Mumford-Pedersen investigated whether a


statistically significant difference exist between
natural and random images
Natural images form a “subspace” of all images.
Dimension of ambient space e.g. 640 x 480 =
307,200
This space of natural images should have:
high dimension: there are many different images
even higher co-dimension: random images look
nothing like natural ones
Data is a collection of black-and-white images
used in cognitive science research 14
Natural 3 x 3 Patches
Instead of studying entire images, we
consider the distribution of 3 x 3 pixel
patches
Most of these are roughly constant in natural
images -- they drown out structure
L.M.P. chose 8,500,000 patches with high
contrast
Each 3 x 3-patch is considered a vector in
R9
Normalize brightness: R9 → R8
Normalize contrast: R8 → S7
15
High-Density Areas

highest density

next highest density 16


Klein Bottle of Pixel Patches

17
Applications of the Analysis
An efficient way to parametrize image
patches

Image compression: a 3 x 3-cluster may be


described using 4 values
Position of its projection onto the Klein bottle
Original brightness
Original contrast

Texture analysis: textures yield distributions


of occurring patches on the Klein bottle.
Rotating the texture corresponds to
translating the distribution.
18
Simplicial Complexes:
Combinatorial Topology

19
A Simplex

d=0 d=1 d=2 d=3

20
Faces / Subsimplices

21
Simplicial Complexes

22
Algebraic Topology:
Homology

23
Topology of Simplicial
Complexes

24
Chain Groups Other coefficient
fields/rings also OK

25
Boundary Operator

26
Boundary Examples

27
Boundary Theorem

28
Chain Complex

29
Cycle Group

30
Boundary Group

31
Boundaries are Cycles!

Nesting behavior

32
Equivalent Cycles

Cosets!

33
Simplicial Homology

34
To Repeat

35
Homology of 2-Manifolds

36
Complexes on Point
Clouds

37
𝜖𝜖-Balls

38
Complex Zoo
Must choose which simplices to introduce
Čech Alpha Rips

Combinatorial complexes provide discrete representations


of the underlying space
39
Čech Complex

40
Čech Complex

41
Čech Complex

42
Čech Complex

Can be hard to compute … 43


General Čech Complex

44
General Čech Complex

45
Rips-Vietoris Complex
The “poor man’s” alternative
to the Čech

This is a common complex


For computations

46
Rips vs. Čech

47
Persistent Homology

48
Filtrations

49
How to Choose 𝜖𝜖?

How to determine the topology of the


underlying space from a point cloud
approximation?

50
How to Choose 𝜖𝜖?

How to determine the topology of the


underlying space from a point cloud
approximation?

51
How to Choose 𝜖𝜖?

How to determine the topology of the


underlying space from a point cloud
approximation?

52
How to Choose 𝜖𝜖?

How to determine the topology of the


underlying space from a point cloud
approximation?

53
Filtrations

Sub-simplices of a simplex must be added before the simplex!


54
The Sub-Level Set Filtration

55
Persistent Homology:
Do not choose an 𝜖𝜖!

56
Standard Homology

57
Functoriality: Homological Algebra

58
We Can Track Topological
Features in a Filtration

The inclusion map among the complexes translates to a homomorphism


59
between the homology groups
Persistent Homology is
Functorial Homology

⊆ ⊆ ⊆ ⊆ ⊆

Homology of the entire filtration

Homomorphisms at the homology level allow us


to track homology classes – i.e., topological features 60
Barcodes are the Lifetimes of
Topological Features

Barcodes are the output of persistent homology 61


Another View: Persistence
Diagrams
persistence persistence
barcode diagram
(a,b)

a b

Short barcodes =
long barcodes = points near
points away from the diagonal =
the diagonal = noise
robust features

62
Map 1-D intervals to points in 2-D
Persistence Provides a Pairing:
Birth and Death of a Topological
Feature
Sublevel sets of a function example

63
Persistence Provides a Pairing

Sublevel sets of a function example

64
Persistence Provides a Pairing

Sublevel sets of a function example

65
Persistence Provides a Pairing

Sublevel sets of a function example

66
Persistence Provides a Pairing

Sublevel sets of a function example

67
Persistence Provides a Pairing

Sublevel sets of a function example

68
Persistence Provides a Pairing

Sublevel sets of a function example

69
Persistence Provides a Pairing

That pairing is the persistence diagram

70
Persistence of Homology
Classes

Lifetime of γ 71
Filtering Out Topological Noise

are stable structures

72
Bottleneck Distance Between
Persistence Diagrams

73
Stability Theorems

74
Computing Persistent
Homology

75
Computational Topology Software

JavaPlex (Henry Adams) -- has very nice tutorial


Dionysus (Dmitriy Morozov)
PHAT (Michael Kerber)

76
Simplicial Filtrations for Low D

Use a simplicial filtration

77
Vertices

78
Edges

79
Triangles and Tetrahedra

80
Positive and Negative Simplices

81
Tracking Topological Features

82
Persistent Homology
Examples

83
Detecting a Torus from Samples

Point Cloud Data 84


(PCD)
Recall: Betti Numbers βi
Ranks of the free part of homology groups Hi

β0 counts the number of connected


components

β1 counts the number of independent loops

β2 counts the number of independent voids


85
Topology is fundamentally a tool for classification
Question of Scale: A Rips
Filtration

β0 = 150 β0 = 1 β0 = 1 β0 = 1
β1 = 0 β1 = 37 β1 = 2 β1 = 1
β2 = 0 β2 = 0 β2 = 1 β2 = 22
β1
ε

86
From Complex Inclusions to
Homology Homomorphisms

⊆ ⊆ ⊆

K250 K500 K994 K1452


i
Functoriality

Hk(K25) Hk(K50) Hk(K994) Hk(K1452)

Idea: Follow homology basis elements from birth to death


while maintaining compatible bases
87
Consistent Bases Exist

Basis elements for 1-homology

88
Deconstructing the Barcode
β1 Graph β1
ε

Torus!

β1 Barcode

PCD Persistence barcode for


the torus

89
Back to the Natural Images
Example

90
Back to the Natural Images
Example

91
Back to the Natural Images Example

92
Back to the Natural Images Example

93
FYI, Other Methods

94
Persistence-Based
Segmentation

95
3D Shape Segmentation
Partition a 3D model into meaningful components

96
Key Segmentation Method
Goals
Robust to noise

Intrinsic (invariant to isometric


deformations)

Efficiently computable

Parametrizable 97
Choose a Lens / Filter Function

Function f : Data Set  R


Ex 1: x-coordinate f : (x, y, z)  x
98
Approach: Use a Filter or Lens
Function
We want the data to guide us on how to
aggregate function values

Use the persistence diagram of the filter


function to guide the segmentation
process

99
Persistence Approximation

100
Computing Segments

101
Computing Segments

102
Computing Segments

103
Computing Segments

104
Computing Segments

105
Computing Segments

106
Algorithm

107
Union-find
Interpreting Persistence
Diagrams

The PD itself can


help us decide
what the merging
threshold should
be

108
Choice of Filter Function is
Crucial
Ideal function should be
Stable under perturbations
Invariant under rigid and isometric deformations
Informative: local maxima should correspond to
segments
Efficiently computable

Use heat kernel signature (HKS) or wave kernel


signature
These are functions obtained from solving certain
partial differential equations on the surface of a 3D
shape
109
Segmentations

110
Stable Diagrams

111
Caveats
No single function is likely to be truly
informative
Regions is which a function is featureless
create inherently unstable regions
Possible solution: perturb the mesh and look
for stable regions
Identify segments stable under perturbations
Treat unstable regions separately

112
Extended Algorithm

113
Extended Algorithm

114
Improved Results

115
The End

116

Das könnte Ihnen auch gefallen