Machine learning

and stuff...

Artificial Intelligence

Machine Learning

Neural Networks

Tensor Flow

Computer Vision

Humans Machines
Hard





 
Easy






 
personIsPresent = true

Label

Feature

xx
x
yy
y
θj:=θjαθjJ(θ0,θ1)\theta_{j} := \theta_{j} - \alpha\frac{\partial}{\partial\theta_{j}}J(\theta_{0}, \theta_{1})
\theta_{j} := \theta_{j} - \alpha\frac{\partial}{\partial\theta_{j}}J(\theta_{0}, \theta_{1})
j=0:θ0J(θ0,θ1)=1mi=1m(hθ(x(i))y(i))j = 0: \frac{\partial}{\partial\theta_{0}}J(\theta_{0}, \theta_{1}) = \frac{1}{m} \sum_{i=1}^{m}(h_{\theta}(x^{(i)}) -y^{(i)})
j = 0: \frac{\partial}{\partial\theta_{0}}J(\theta_{0}, \theta_{1}) = \frac{1}{m} \sum_{i=1}^{m}(h_{\theta}(x^{(i)}) -y^{(i)})
B=ATB = A^T
B = A^T
hθ(x)=θ0+θ1xh_{\theta}(x) = \theta_{0} + \theta_{1}x
h_{\theta}(x) = \theta_{0} + \theta_{1}x

Kud svi Turci, tu i mali Mujo

  • Created by
  • Industry standard
  • Quick and easy start
  • Not ideal for Computer Vision
  • Requires good datasets

* Isn't Pythonic

Computer vision

if(a){
 // do stuff
} else if(b){
 // do some stuff
} else if(c){
 // do some other stuff
} else if(d){
 // do completely different stuff
} else if(e){
 // don't do stuff
} else if(f){
 // hope it doesn't come to this
}

A bunch of ifs

Machine learning

to learn

is to generalize

Linear Regression

Random forest

k-Nearest Neighbors

Support Vector Machine

Hammer Rant time

Machine Learning

\neq
\neq

<rant>

</rant>

x1x_1
x_1
x2x_2
x_2
x3x_3
x_3
w1w_1
w_1
w2w_2
w_2
w3w_3
w_3
bb
b
y={0if jwjxjb1if jwjxj>by = \begin{cases} 0 &\text{if } \sum_j{w_j x_j} \leq b \\ 1 &\text{if } \sum_j{w_j x_j} > b \end{cases}
y = \begin{cases} 0 &\text{if } \sum_j{w_j x_j} \leq b \\ 1 &\text{if } \sum_j{w_j x_j} > b \end{cases}
  • xix_i {0,1}\in \{0, 1\} - input values
  • wiw_i R\in \mathbb{R} - weights
  • bb R\in \mathbb{R} - threshold
  •  yy {0,1}\in \{0, 1\} - output value
yy
y

Perceptron

Neural networks

Face Swapping

  • Head pose
  • Skin type
  • Lighting
  • Resolution
  • ...

Things to consider

Face Detection

Facial feature extraction

convex hull

  • Finds boudaries of the face
  • Efficient
  • Speeds up further computation by A LOT

Delaunay triangulation

Triangulation refers to the subdivision of a plane into triangles

AA
A
DD
D
CC
C
BB
B
t1t_1
t_1
t2t_2
t_2
AA
A
DD
D
CC
C
BB
B
t1t_1
t_1
t2t_2
t_2
AA
A
BB
B

All facial features

ConVEx hull

<

speed

Delaunay triangulation

Affine Warping

Affine transformations

Rotation

Shearing

Scaling

Translation

Seamless Cloning

Before

After

Thank you for your attention!

Aleksandar Šmigić

Made with Slides.com