Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

📚 The CoCalc Library - books, templates and other resources

132928 views
License: OTHER
1
\documentclass{beamer}
2
\usetheme{metropolis}
3
\usepackage{hyperref}
4
\usepackage[utf8]{inputenc} % this is needed for german umlauts
5
\usepackage[english]{babel} % this is needed for german umlauts
6
\usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf
7
\usepackage{caption}
8
\usepackage{tikz}
9
\usetikzlibrary{arrows.meta}
10
\usetikzlibrary{decorations.pathreplacing}
11
\usetikzlibrary{positioning}
12
\usetikzlibrary{decorations.text}
13
\usetikzlibrary{decorations.pathmorphing}
14
\usetikzlibrary{shapes.multipart, calc}
15
\usepackage{minted} % needed for the inclusion of source code
16
17
\begin{document}
18
19
\title{Convolutional Neural Networks (CNNs)}
20
\subtitle{Theory and Applications}
21
\author{Martin Thoma -- \footnotesize \href{http://tinyurl.com/CNN-Intro}{tinyurl.com/CNN-Intro}}
22
\date{22. February 2019}
23
\subject{Machine Learning, AI, Neural Networks, Convolutional Neural Networks}
24
25
\frame{\titlepage}
26
27
% \section{Neural Network Basics}
28
% \subsection{}
29
\begin{frame}{Artificial Neuron (Perceptron)}
30
$$f: \mathbb{R}^n \rightarrow \mathbb{R}$$
31
\begin{figure}[ht]
32
\centering
33
\includegraphics[width=0.8\paperwidth, height=0.7\paperheight, keepaspectratio]{graphics/artificial-neuron.pdf}
34
\end{figure}
35
% $$f(x) = ax^2 + bx + c \text{ with } f(0) = 3, f(1) = 2, f(-1) = 6$$
36
% \begin{align*}
37
% \onslide<2->{f(0) &= a \cdot 0^2 + b \cdot 0 + c = 3} &\onslide<3->{\Rightarrow c &= 3\\}
38
% \onslide<4->{f(1) &= a \cdot 1^2 + b \cdot 1 + 3 = 2} &\onslide<5->{\Rightarrow a &= -1-b\\}
39
% \onslide<6->{f(-1) &= a \cdot {(-1)}^2 - b + 3 = 6\\}
40
% \onslide<7->{\Leftrightarrow 3&=a - b\\}
41
% \onslide<8->{\Leftrightarrow 3&= (-1-b) - b\\}
42
% \onslide<9->{\Leftrightarrow b&= -2\\}
43
% \onslide<10>{\Rightarrow \quad f(x) &= x^2 -2 x + 3\\}
44
% \end{align*}
45
% \only<1>{$$f: \mathbb{R}^n \rightarrow \mathbb{R}^m$$}
46
% \only<2>{$$f: \mathbb{R}^2 \rightarrow \mathbb{R}$$
47
% # 2x - 1
48
% # (x-1)^2 + 1
49
% Examples:
50
% \begin{itemize}
51
% \item $1 \rightarrow 1$: $f(x) = x$
52
% \item $2 \rightarrow 3$: $f(x) = $
53
% % \item $3 \rightarrow 3$
54
% \end{itemize}
55
% }
56
\end{frame}
57
58
\begin{frame}{Multi-Layer Perceptron (MLP)}
59
$$f: \mathbb{R}^n \rightarrow \mathbb{R}^m$$
60
\begin{figure}[ht]
61
\centering
62
\includegraphics[width=0.8\paperwidth, height=0.7\paperheight, keepaspectratio]{graphics/perceptron-notation.pdf}
63
\end{figure}
64
\end{frame}
65
66
\begin{frame}{}
67
\begin{itemize}[<+->]
68
\item Predict housing prices: (bed rooms, size, age) $\rightarrow$ Price
69
\item Product categorization: (weight, volume, price) $\rightarrow$ \{shoe, handbag, shirt\}
70
\item Image classification: List of pixel colors $\rightarrow$ \{cat, dog\}
71
\end{itemize}
72
\end{frame}
73
74
\begin{frame}{}
75
\begin{center}
76
\Huge Data
77
\end{center}
78
\end{frame}
79
80
\begin{frame}{Necessary Data}
81
\begin{itemize}
82
\item $f(x) = w_0$
83
\item $f(x) = w_1 \cdot x + w_0$
84
\item $f(x) = w_2^2 \cdot x^2 + w_1^2 \cdot x + w_0$
85
\item sin, cos, tan, \dots
86
\end{itemize}
87
\end{frame}
88
89
\begin{frame}{Convolution}
90
\begin{figure}[ht]
91
\centering
92
\includegraphics[width=0.8\paperwidth]{graphics/convolution-linear.pdf}\\
93
\href{https://martin-thoma.com/graphic-filters/}{martin-thoma.com/graphic-filters}
94
\end{figure}
95
\end{frame}
96
97
\begin{frame}{Max Pooling}
98
\begin{figure}[ht]
99
\centering
100
\includegraphics[width=0.8\paperwidth]{graphics/max-pooling.pdf}
101
\end{figure}
102
\end{frame}
103
104
\begin{frame}{Convolutional Layer}
105
\begin{figure}[ht]
106
\centering
107
\input{graphics/convolution-layer}
108
\end{figure}
109
\end{frame}
110
111
112
\section{Applications}
113
\begin{frame}{Symbol recognizer}
114
\begin{figure}[ht]
115
\centering
116
\includegraphics[width=0.8\paperwidth, height=0.7\paperheight, keepaspectratio]{graphics/symbol-recognizer.png}
117
\captionsetup{labelformat=empty}
118
\caption{\href{http://write-math.com}{write-math.com}}
119
\end{figure}
120
\end{frame}
121
122
\begin{frame}{}
123
\inputminted[linenos,
124
numbersep=7pt,
125
gobble=0,
126
fontsize=\footnotesize, tabsize=4]{python}{cnn.py}
127
\end{frame}
128
129
\begin{frame}{Super Resolution}
130
\begin{figure}[ht]
131
\centering
132
\includegraphics[width=0.8\paperwidth, height=0.7\paperheight, keepaspectratio]{graphics/pixel-recursive-super-resolution.png}
133
\captionsetup{labelformat=empty}
134
\caption{Dahl, Norouzi, Shlens: Pixel recursive super resolution (2017)}
135
\end{figure}
136
\end{frame}
137
138
139
\begin{frame}{Colorization: The Problem}
140
\begin{figure}[ht]
141
\centering
142
\includegraphics[width=0.8\paperwidth, height=0.7\paperheight, keepaspectratio]{graphics/multimodality-apple.png}
143
\captionsetup{labelformat=empty}
144
\caption{Cinarel: Automatic Colorization of Webtoons Using Deep Convolutional Neural Networks (2018)}
145
\end{figure}
146
\end{frame}
147
148
149
\begin{frame}{Colorization - Photographs}
150
\begin{figure}[ht]
151
\centering
152
\includegraphics[width=0.8\paperwidth, height=0.7\paperheight, keepaspectratio]{graphics/colorful-image-colorization.png}
153
\captionsetup{labelformat=empty}
154
\caption{Zhang, Isola, Efros: Colorful Image Colorization (2016)}
155
\end{figure}
156
157
Interactive Demo: \href{http://richzhang.github.io/colorization/}{richzhang.github.io/colorization}\\
158
Model Lab: \href{https://github.com/MartinThoma/model-lab}{github.com/MartinThoma/model-lab}
159
\end{frame}
160
161
162
\begin{frame}{Colorization - Comic}
163
\begin{figure}[ht]
164
\centering
165
\includegraphics[width=0.8\paperwidth, height=0.7\paperheight, keepaspectratio]{graphics/comic-colorization.png}
166
\captionsetup{labelformat=empty}
167
\caption{Ci, Ma, Wang, Li, Luo: User-Guided Deep Anime Line Art Colorization with Conditional Adversarial Networks (2018)}
168
\end{figure}
169
\end{frame}
170
171
\begin{frame}{Denoising}
172
\begin{figure}[ht]
173
\centering
174
\includegraphics[width=0.8\paperwidth, height=0.7\paperheight, keepaspectratio]{graphics/denoising.png}
175
\captionsetup{labelformat=empty}
176
\caption{Zhang, Zuo, Gu, Zhang: Learning Deep CNN Denoiser Prior for Image Restoration (2017)}
177
\end{figure}
178
\end{frame}
179
180
181
\begin{frame}{Image Inpainting (Watermark removal)}
182
\begin{figure}[ht]
183
\centering
184
\includegraphics[width=0.8\paperwidth, height=0.7\paperheight, keepaspectratio]{graphics/leopard-inpainting.png}
185
\captionsetup{labelformat=empty}
186
\caption{Yang, Lu, Lin, Shechtman, Wang, Li: High-Resolution Image Inpainting using Multi-Scale Neural Patch Synthesis (2017)}
187
\end{figure}
188
\end{frame}
189
190
191
\begin{frame}{CNNs in NLP}
192
\begin{figure}[ht]
193
\centering
194
\includegraphics[width=0.8\paperwidth, height=0.7\paperheight, keepaspectratio]{graphics/tdnns.png}
195
\captionsetup{labelformat=empty}
196
\caption{Collobert, Weston, Bottou, Karlen, Kavukcuoglu, Kuksa:
197
Natural Language Processing (almost) from Scratch (2011)}
198
\end{figure}
199
\end{frame}
200
201
\end{document}
202
203