AI images demystified

a basic introduction to machine learning

"On Images and Pictures" guest lecture
23 May 2024 @ die Angewandte

jackie / Andrea Ida Malkah Klaura <jackie@tantemalkah.at>

https://tantemalkah.at/2024/ai-images-demystified/

Creative Commons License All contents, unless otherwise noted, were produced by Andrea Ida Malkah Klaura
under a Creative Commons Attribution - Share Alike 4.0 International License.

outline

  • whoami
  • and what's ai?
  • some machine learning basics
  • "neural" filters and other image "magic"
  • Hands on Machine Learning promo
  • discussion

whoami

  • in daily life: jackie
  • legal name: Andrea Ida Malkah Klaura
  • i like all of them
  • my NN is currently trained on jackie

pronouns

  • she/her in binary space
  • ze/hir in the wider multiverse


usage: https://my.geeky.gay/pronouns/ze/hir/hirs/hirself

Level up!

That gender you got at birth? That's just a tutorial gender. You're only supposed to use it to get the hang on this world's gender system and then ditch it for a stronger one, not use it your entire life, noob
Source: kirin@monads.online, January 14, 2021 on Mastodon

technoscientific background

  • until 2002: HTL für Technische Informatik & Internet Engineering
  • short excursion into philosophy
  • until 2009: BSc Technische Informatik @ TU Wien
    • 🤔 if life then: term_scaling = 'years'
  • until 2014: MA Science - Technology - Society @ Uni Wien
  • afterwards short excursion to TU again: Educational Technologies
  • 2017-2020: MSc IT Security @ FH Technikum, extra occupational
  • notable work engagements:
    • 2016-2020: IT machinist @ Radio ORANGE 94.0
    • smaller web on the side, projects mostly for NGOs
    • since 2020: web engineer @ dieAngewandte
    • since 2021: also lecturer @ Angewandte Coding Lab
    • since 2023: Feminist Technoscience Studies lecturer @ TU Wien

what are you trying to tell us?

  • I'm not an ML expert
  • But I like how robots think
  • And I sometimes think like robots
  • Plus: I like (to explain) algorithm thinking
  • ... as well as demystifying algorithmic practice

and what's ai?

according to Wikipedia:

"Artificial intelligence (AI), in its broadest sense, is intelligence exhibited by machines, particularly computer systems. It is a field of research in computer science that develops and studies methods and software that enable machines to perceive their environment and uses learning and intelligence to take actions that maximize their chances of achieving defined goals. Such machines may be called AIs."

Source: https://en.wikipedia.org/wiki/Artificial_intelligence (2024-05-22)

according to AI itself:

"Artificial Intelligence (AI) refers to the simulation of human intelligence in machines that are programmed to think and learn like humans. These systems can perform tasks that typically require human cognitive functions such as understanding natural language, recognizing patterns, solving problems, and making decisions. AI encompasses a variety of technologies, including machine learning, neural networks, deep learning, and natural language processing, enabling machines to improve their performance through experience and data."

Excerpt from ChatGPT, asked "What is Artificial Intelligence in one paragrpah?" on 2024-05-22

Two important problems:

  • What is intelligence?
  • And what is artificial?

AI vs ML

Machine Learning (ML) is a sub field of AI. It is publicly mostly talked about in terms of its even narrower subfield of Deep Learning (DL).

History of AI

Types of Machine Learning

Supervised Learning

Source: Stefan Seegerer @ medium.com: This Is How Machines Learn! Supervised Learning (Part 2)
License: CC-BY Seegerer, Michaeli, Jatzlau

Unsupervised Learning

Source: Stefan Seegerer @ medium.com: This Is How Machines Learn! Unsupervised Learning (Part 3)
License: CC-BY Seegerer, Michaeli, Jatzlau

Reinforcement Learning

Source: Stefan Seegerer @ medium.com: This Is How Machines Learn! Reinforcement Learning (Part 4)
License: CC-BY Seegerer, Michaeli, Jatzlau

some machine learning basics

do machines really learn?

MENACE

the Machine Educable Noughts And Crosses Engine

a very basic case:

linear regression

how do (digital) neurons work?

designed after and simulating a biological neuron (nerve cell)

Source: Noack & Sanner (2023): Künstliche Intelligenz verstehen: eine spielerische Einführung in die KI. Abb. 10.8

building a network of neurons

Source: Noack & Sanner (2023): Künstliche Intelligenz verstehen: eine spielerische Einführung in die KI. p. 203

animal detector neural network

based on cuteness and fluffiness values,
categorising into 4 (learned/trained) animals

Source: Noack & Sanner (2023): Künstliche Intelligenz verstehen: eine spielerische Einführung in die KI. Abb. 10.6

[optional] some other simple demo cases:

  • markov chains for text generation
  • KNN-classification
  • K-means clustering

[optional] reinforcement demo case:

  • q-learning

"neural" filters and other image "magic"

(simple) image recognition

for limited and pre-defined recognition tasks

Source: Noack & Sanner (2023): Künstliche Intelligenz verstehen: eine spielerische Einführung in die KI. Abb. 10.5

(complex) image recognition

with CNNs (Convolutional Neural Networks)

combining different layers of filter kernels with output neurons

demo: Chapter 13 examples on https://www.maschinennah.de/ki-buch/

GANs

Generative Adversarial Networks

  • pitting two neural networks "against" each other
  • the generator creates stuff of some random input and tries to trick the discriminator in believing the result is "real"
  • the discriminator has access to real data and checks if the generator produced something "real"-ish
Source: Noack & Sanner (2023): Künstliche Intelligenz verstehen: eine spielerische Einführung in die KI. Abb. 13.12

Stable Diffusion

VU Hands on Machine Learning

discussion / q&a

full references can be found on:

https://tantemalkah.at/machine-learning/2024/references.html