Using machine learning Learning knot methods in geometric modeling - - PowerPoint PPT Presentation

using machine learning
SMART_READER_LITE
LIVE PREVIEW

Using machine learning Learning knot methods in geometric modeling - - PowerPoint PPT Presentation

Machine learning in geometric modeling Georg Umlauf Using machine learning Learning knot methods in geometric modeling placement SVM knot placement for curves SVM knot placement for skinning Georg Umlauf Learning primitive


slide-1
SLIDE 1

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Using machine learning methods in geometric modeling

Georg Umlauf

Institute for Optical Systems University of Applied Science Constance, Germany Joint work with Pascal Laube, Merlin Blume, Manuel Caputo, Matthias Franz

Dagstuhl, 1 June 2017

slide-2
SLIDE 2

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Contents

◮ Part 1: Learning knot placements for b-spline curve

approximation and t-spline surface skinning

◮ Using support vector machines (SVMs) to learn good

knot vectors for spline curve/surface approximation.

◮ Part 2: Learning surface primitive classification

from point clouds

◮ Using SVMs to classify point clouds to geometric

primitive classes.

◮ Using stacked auto-encoders (SAEs) to learn geometric

features used for classification.

slide-3
SLIDE 3

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Part 1: Learning knot placements for b-spline curve and t-spline surface approximation

Problem definition 2d-input Given a sequence of points pi for curve approximation. 3d-input Given an array of sequences of points for surface skinning (lofting). Output: Good knot vector(s) for spline approximation.

slide-4
SLIDE 4

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Curve approximation

hide

Curves: Compute the control points cj of a b-spline curve C(t) =

  • cj · N l

j (t)

  • f degree l minimizing
  • pi − C(ti)2.

Skinning: Compute the control points ci,j of a t-spline surface S(u, v) = ci,j · N k

i,j(u) · N l j (v)

  • f degree (k, l) minimizing

pi,j − S(ui, vj)2 where each N k

i,j has its own knot vector u(j).

slide-5
SLIDE 5

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Approach

◮ Design geometric point features for knot placement. ◮ Train a support vector machine (SVM) to learn the

quality of a candidate knot.

◮ For validation use approximation of test data.

◮ Use the trained SVM to generate knot vectors for new

approximation tasks.

Point data Knot placement Knot selection Knot vector manually designed automatic/trained Test set generation Training Feature design and extraction SVM

slide-6
SLIDE 6

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Support vector machines (SVMs) (1)

  • 1. Map data points to feature vectors xi.

◮ For training label the data with correct class labels yi.

slide-7
SLIDE 7

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Support vector machines (SVMs) (1)

  • 1. Map data points to feature vectors xi.

◮ For training label the data with correct class labels yi.

  • 2. For a linear decision function sign(ωtx + b), maximize

the margin between the classes by minimizing ωtω/2 s.t. yi(ωtxi + b) ≥ 1.

margin support vectors separating hyper-surface separating hyper-plane

slide-8
SLIDE 8

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Support vector machines (SVMs) (1)

  • 1. Map data points to feature vectors xi.

◮ For training label the data with correct class labels yi.

  • 2. For a linear decision function sign(ωtx + b), maximize

the margin between the classes by minimizing ωtω/2 s.t. yi(ωtxi + b) ≥ 1.

  • 3. For noisy data add slack ξi, i.e. minimize

ωtω/2 + C

  • ξi

s.t. yi(ωtxi + b) ≥ 1 − ξi.

margin support vectors separating hyper-surface separating hyper-plane slack

slide-9
SLIDE 9

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Support vector machines (SVMs) (2)

  • 4. For non-linearly-separable data, replace the scalar pro-

duct with a kernel K(·, ·), i.e. use the decision function sign

  • αiyiK(xi, x) + b
  • score

.

◮ This is solved using Lagrange multipliers and dualization

with ω = αiyixi.

margin support vectors separating hyper-surface slack

slide-10
SLIDE 10

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Support vector machines (SVMs) (2)

  • 4. For non-linearly-separable data, replace the scalar pro-

duct with a kernel K(·, ·), i.e. use the decision function sign

  • αiyiK(xi, x) + b
  • score

.

◮ This is solved using Lagrange multipliers and dualization

with ω = αiyixi.

  • 5. The score measures the signed distance to the

separating hyper-surface.

margin support vectors separating hyper-surface slack score

slide-11
SLIDE 11

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Geometric features for curve knot placement (1)

What are good geometric features for knot placement?

See e.g. [Park/Lee2007; Piegl/Tiller2000+2012; Razdan; Yuan/Chen/Zhou2013; etc.].

◮ Point distances. ◮ Features derived from discrete curvature estimates κi. ◮ Local curvature maxima (LCM) are points pi with

κi > max(κi−1, κi+1) and κi ≥ κaverage.

◮ Features derived from the LCM

◮ Angles to closest LCM. ◮ Euclidean, arc-length, or parametric point distances to

the closest LCM.

Point data Knot placement Knot selection Knot vector manually designed automatic/trained Test set generation Training Feature design and extraction SVM

slide-12
SLIDE 12

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Geometric features for curve knot placement (2)

Subsequent knot selection

◮ Use salient features as knots and, in regions without

salient features, sample uniformly,

◮ ... or use averages of uniform parameter averages...

Point data Knot placement Knot selection Knot vector manually designed automatic/trained Test set generation Training Feature design and extraction SVM

slide-13
SLIDE 13

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Score-based knot placement

How well do points with salient geometric features perform for approximation?

◮ Score maxima of a trained SVM.

◮ Choose peaks by prominence: Highest value you have to

at least descend to to reach a higher peak.

Point data Knot placement Knot selection Knot vector manually designed automatic/trained Test set generation Training Feature design and extraction SVM

slide-14
SLIDE 14

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Score-based knot placement

How well do points with salient geometric features perform for approximation?

◮ Score maxima of a trained SVM.

◮ Choose peaks by prominence: Highest value you have to

at least descend to to reach a higher peak.

Subsequent knot selection

◮ For knot insertion, find closest score peak to mid-point

  • f knot segment with maximum score-sum.

◮ In regions without score peaks, sample score-weighted.

Point data Knot placement Knot selection Knot vector manually designed automatic/trained Test set generation Training Feature design and extraction SVM

slide-15
SLIDE 15

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Results for SVM curves knot placement

◮ Score from high score (red) to low score (blue)

slide-16
SLIDE 16

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Results for b-spline curve approximation

10 15 20 25 30 35 40 0.04 0.08 0.12 0.16 0.2 # of Knots Hausdorff distance NKTP SKP

slide-17
SLIDE 17

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Results for t-spline skinning

SKP NKTP

slide-18
SLIDE 18

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Part 2: Learning surface primitive classification

Input: Point clouds sampled from a patch of a primitive surface. Output: Classification to the correct primitive class. Planes Cylinders Cones Spheres Ellipsoids Tori

slide-19
SLIDE 19

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

SVM primitive classification (1)

General approach analog to knot-placement.

◮ Design geometric point cloud features for primitive

classification.

◮ Train a support vector machine (SVM) to learn the

corresponding primitive class.

◮ For validation use pre-labeled of test data.

◮ Use the trained SVM to classify new point clouds. Point cloud Shape classification Shape clas- sification manually designed automatic/trained Test set generation Training Feature design and extraction SVM

slide-20
SLIDE 20

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

SVM primitive classification (2)

Point clouds are mapped to feature vectors.

See e.g. [Koenderink/van Doorn1992; Osada et al. 2002; Wahl et al. 2003; etc.].

◮ Point relation features:

◮ Point distances, point angles, triangle areas, etc.

◮ Normal based features:

◮ Normal directions, normal angles, etc.

◮ Curvature based features:

◮ Curvature directions, curvature angles, shape index, etc.

◮ Hybrid features:

◮ Surflet pairs, etc.

slide-21
SLIDE 21

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Results of SVM primitive classification (1)

◮ Classification of a manual 3d-scan.

planes, cones, spheres.

slide-22
SLIDE 22

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Results of SVM primitive classification (2)

◮ Separating hyper-surfaces projected to 3d.

Planes Cylinders Cones Spheres Ellipsoids Tori

slide-23
SLIDE 23

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Learning geometric features using SAEs

◮ Primitive classification using manual features. Hand- designed features Mapping from features input

  • utput

geometric features SVM point cloud primitive classification

learned manual

slide-24
SLIDE 24

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Learning geometric features using SAEs

◮ Primitive classification using manual features. Hand- designed features Mapping from features input

  • utput

geometric features SVM point cloud primitive classification

learned manual ◮ Learning geometric features for classification. Learned features Mapping from features input

  • utput
slide-25
SLIDE 25

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Learning geometric features using SAEs

◮ Primitive classification using manual features. Hand- designed features Mapping from features input

  • utput

geometric features SVM point cloud primitive classification

learned manual ◮ Learning geometric features for classification. Learned simple features Learned complex features Mapping from features input

  • utput

CNN point cloud primitive classification stacked auto-encoder (SAE)

slide-26
SLIDE 26

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Feature engineering using SAEs

◮ A stacked auto-encoder (SAE) is

◮ a multi-layer

  • 2

perceptron

  • 1

◮ for un-supervised learning

  • 3

◮ of representations

  • 3

.

slide-27
SLIDE 27

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

1 Perceptron

◮ A perceptron evaluates for the inputs x1, . . . , xn the

function y = a

  • b +

n

  • i=1

wi · xi

  • .

a( · ) function activation

  • utput y
  • summation

w2 w1 w0 = b bias

. . .

wn synaptic weights x0 1 = x2 x1 xn inputs

slide-28
SLIDE 28

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

2 Deep neural nets (DNNs)

◮ Deep neural nets: multiple layers of perceptrons. ◮ Training via back-propagation and gradient descent.

. . .

  • utput

layer

. . .

  • utput

. . .

2nd hidden layer

. . .

1st hidden layer

. . .

input

slide-29
SLIDE 29

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

3 Stacked auto-encoders (SAEs)

◮ A stacked auto-encoder minimizes an error E(x, r) on

each layer.

. . . . . .

h f (x) g(h)

. . .

x r E(x, r)

slide-30
SLIDE 30

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

3 Stacked auto-encoders (SAEs)

◮ A stacked auto-encoder minimizes an error E(x, r) on

each layer.

. . . . . .

h1 f ( x )

. . .

h2 g ( x ) g ( h1 ) g ( x )

. . .

r2 E(h1, r2)

. . .

x r1 E(x, r1)

slide-31
SLIDE 31

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

3 Stacked auto-encoders (SAEs)

◮ A stacked auto-encoder minimizes an error E(x, r) on

each layer.

. . . . . .

h1 f ( x )

. . .

h2 g ( x ) g ( h1 ) g ( x )

. . .

r2 E(h1, r2)

. . .

h3 g ( x ) g ( x )

· · ·

g ( x )

. . .

x r1 E(x, r1)

slide-32
SLIDE 32

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

3 Stacked auto-encoders (SAEs)

◮ A stacked auto-encoder minimizes an error E(x, r) on

each layer.

. . .

h1 f ( x )

. . .

h2 g ( x )

. . .

h3 g ( x ) g ( x )

· · · . . .

x

slide-33
SLIDE 33

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

3 Stacked auto-encoders (SAEs)

◮ A stacked auto-encoder minimizes an error E(x, r) on

each layer.

◮ The trained SAE can be used as feature extractor. . . .

x

. . .

h1 f (x)

· · ·

f (x)

. . .

hn f (x) f (x) SAE feature extractor

slide-34
SLIDE 34

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

3 Stacked auto-encoders (SAEs)

◮ A stacked auto-encoder minimizes an error E(x, r) on

each layer.

◮ The trained SAE can be used as feature extractor. ◮ The features learned by the SAE are used to train a

second DNN to classify the data.

. . .

x

. . .

h1 f (x)

· · ·

f (x)

. . .

hn f (x) f (x) SAE feature extractor

. . .

hn

· · ·

f (x)

. . .

hn f (x) f (x)

  • utput

CNN/SVM classifier

slide-35
SLIDE 35

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Learned geometric features (1)

◮ The auto-encoder is capable of representing geometric

primitives.

◮ Generative sampling.

  • riginal

DAE, 4100 neurons SDAE, 3 layers, 4100 neurons

slide-36
SLIDE 36

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Learned geometric features (2)

◮ How can we interpret the un-supervised learned

geometric features?

◮ First layer activation.

Torus Cone Cylinder Ellipsoid Plane Sphere

SDAE 3x4100 (Gaussian noise = 0.5)

slide-37
SLIDE 37

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Learned geometric features (3)

◮ Saliency maps.

1st layer 2nd layer 3rd layer 1st layer 2nd layer 3rd layer

SAE 3x4100 (no noise) SDAE 3x4100 (Gaussian noise = 0.5)

slide-38
SLIDE 38

Machine learning in geometric modeling Georg Umlauf Learning knot placement

SVM knot placement for curves SVM knot placement for skinning

Learning primitive classification

SVM primitive classification SAE feature engineering

Thank you!