CNN-Intro.tex 6.7 KB

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