• Martin Thoma
  • Home
  • Categories
  • Tags
  • Archives
  • Support me

Computer Vision for Human-Computer Interaction

Contents

  • Behandelter Stoff
    • Klassifikatoren
    • Face Detection
    • Face Recognition
    • CNNs
    • Head-pose Estimation
    • Facial Feature Detection
    • Automatic Facial Expression Analysis
    • Person detection
    • Tracking
    • Gesten
    • Action / Activity Recognition
    • Wrap-up
  • Praktische Aufgaben
  • Prüfungsfragen
  • Material und Links
  • Fazit
  • Vorlesungs­empfehlungen
  • Termine und Klausurablauf
Dieser Artikel beschäftigt sich mit der Vorlesung „Computer Vision for Human-Computer Interaction“ am KIT. Er dient als Prüfungsvorbereitung. Ich habe die Vorlesungen bei Herrn Prof. Dr.-Ing. Rainer Stiefelhagen im Wintersemester 2016/2017 gehört. Die Inhalte sind dementsprechend stark an der Vorlesung angelehnt bzw. komplette Teile sind daraus übernommen. Noch ist der Artikel in der Entwurfsphase.

Der Kern der Vorlesung 'Computer Vision for Human-Computer Interaction' ist das finden und verfolgen von Personen / Gesichtern in Bildern und Bildfolgen. Dabei werden folgende Themenfelder besprochen:

  • Trackingverfahren: Kalman-Filter und Partikelfilter

Behandelter Stoff

# Datum Kapitel Inhalt
1 18.10.2016 Einführung Organisatorisches und Überblick über den Stoff
2 21.10.2016 Klassifikation Gaussian Mixture Models, EM, SVMs, Perceptron
3 24.10.2016 Face Detection I Color Spaces (HSV, YUV), Histogram Backprojection, Histogram Matching, Mixture of Gaussians, ROC, Morphological Operations
4 28.10.2016 Face Detection II Perceptron, MLP, Histogram Equalization, Haar-like features, Adaboost (Viola and Jones)
5 31.10.2016 Face Recognition I Eigenface, Fisherface
6 04.11.2016 Programmierprojekte Organisatorisches / Einführung dazu
7 07.11.2016 Face Recognition 2 Alignment (range affine warps), Morphing models of 3d forms (PCA),
8 11.11.2016 CNNs Convolution, Pooling, ReLU, Normalization layers,
9 14.11.2016 Programmierprojekte Besprechung der praktischen Aufgaben
10 18.11.2016 ? ?
11 21.11.2016 Facial Feature Detection ?
12 25.11.2016 Automatic Facial Expression Analysis ?
13 28.11.2016 Head Pose Estimation Model-based approaches, Appearence-based approaches
14 02.12.2016 Person Detection Introduction, HOG people detector, Shilouette matching
15 05.12.2016 ? ?
16 09.12.2016 ? ?
17 16.12.2016 Tracking II ?
- 20.01.2017 Visuelle Perzeption Kinect, Block Matching
- 23.01.2017 Gesture Recognition HMMs; Pro Gesture eine HMM trainieren
18 27.01.2017 Action & Activity Recognition I ?
19 30.01.2017 Action & Activity Recognition II ?
20 06.02.2017 Wrap-up Zusammenfassung der wichtigsten Themen

Klassifikatoren

  • Classification
    • SVM
    • EM-Algorithmus (Expectation Maximizaion)
    • Perceptron-Algorithmus
    • k nearest neighbor (Mahalanobis-Distanz)
  • Clustering
    • k-means
    • Agglomerative Hierarchical Clustering
  • Curse of Dimensionality
  • Dimensionality reduction
    • PCA
    • LDA
LDA (Linear discriminant analysis)
Maximizes class seperability (LDA)

Face Detection

Face Detection
Face Detection ist die Aufgabe, in einem gegebenen Bild eine Bounding-Box um jedes Gesicht zu zeichnen.

Ein Ansatz ist, zu versuchen "Gesichtsfarbe" zu erkennen.

Die Modellierung kann mit Histogrammen erfolgen.

Datensätze:
  • ECU face detection database
  • ECU face skin detection database
  • MIT and CMU frontal face database
Chromatic Color Spaces
Nur zweidimensional (HS von HSV, UV von YUV, normalized rg von RGB). Soll robuster für die Erkennung von Hautfarbe sein.
Histogram Backprojection
Man geht für die Trainingsbeispiele alle Hautfarbe-Pixel durch. Bekommt man nun ein neues Bild, so geht man für dieses Bild jeden Pixel durch. Die Ausgabe ist ein Graustufenbild selber Größe, wo die Pixelfarbe die Anzahl der Hautfarbenen Pixel dieser Farbe ist.
Histogram Matching
Erstelle ein Histogram für Hautfarbe. Um ein neues Bild zu klassifizieren, bildet man Ausschnitte für das Bild. Für jeden Ausschnitt vergleicht man das Histogram des Ausschnitts mit dem Hautfarbe-Histogram. Dazu können folgende Metriken verwendet werden:
  • Battacharya distance
  • Histogram intersection
  • Earth-movers distance
Histogram equalization
This method usually increases the global contrast of many images, especially when the usable data of the image is represented by close contrast values. Through this adjustment, the intensities can be better distributed on the histogram. This allows for areas of lower local contrast to gain a higher contrast. Histogram equalization accomplishes this by effectively spreading out the most frequent intensity values.
(Source: Wikipedia)
The intensity values of the image are modified in such a way that the histogram is flattened.
It roughly works like this:
  1. Let $p(x_i) = \frac{n_i}{n}$ be the probability of a pixel having level $i$.
  2. Let $c(i) = \sum_{j=0}^i p(x_j)$ be the cumulative distribution.
  3. Find transformation $T$ such that the cumulative distribution $y = T(x)$ is linear.
Image normalization
Normalization is a process that changes the range of pixel intensity values. Applications include photographs with poor contrast due to glare, for example. Normalization is sometimes called contrast stretching or histogram stretching.
(Source: Wikpedia)
ROC
Die ROC-Kurve misst die Abwägung zwischen True-Positve Rate ($\frac{TP}{Pos}$, y-Achse) und False Positive Rate ($\frac{FP}{Neg}$, x-Achse).
Intersection over Union (IoU)
Siehe StackExchange
Haar-like features
Based on Haar wavelets as features. Developed by Viola and Jones. A Haar-like feature considers adjacent rectangular regions at a specific location in a detection window, sums up the pixel intensities in each region and calculates the difference between these sums. Can be computed efficiently by using integral images.
AdaBoost
TODO

Face Recognition

Alignment:

  • Works only with "nice" images (no occlusion, high resolution)
  • Eyes are hard
  • Computationally intensive (not suitable for real time applications)
Face Recognition
Face recognition has 4 main tasks:
  • Face detection: Given an image, draw a rectangle around every face
  • Face alignment: Transform a face to be in a canonical pose
  • Face representation: Find a representation of a face which is suitable for follow-up tasks (small size, computationally cheap to compare, invariant to irrelevant changes)
  • Face verification: Images of two faces are given. Decide if it is the same person or not.
The face verification task is sometimes (more simply) a face classification task (given a face, decide which of a fixed set of people it is).
Challenges:
  • Extrinsic Variations
    • Illumination
    • View-point
    • Occlusion
    • Imaging process (low resolution)
  • Intrinsic Variations
    • Aging
    • Facial expressions
Approaches:
  • Feature-Based (Geometric)
    • fiducial points
    • distances, angles, areas
  • Appearence-Based
    • holistic, fiducial regions
    • statistical
Important papers:
  • Deep Face: closing the gap to human level performance (summary)
  • FaceNet: A unified embedding for face recognition and clustering (summary)
  • Deep Face recognition (summary)
Datasets
  • LFW (Labeled Faces in the Wild, results)
  • YTF (Youtube Faces)
Face Recognition Tasks
  • Closed set recognition: 120 Celebrities - who is it?
  • Known / unknown: Is it one of the persons in the known set?
  • Verification: Is it George Clooney?
  • Open Set recognition: First known/unknwon, then closed set.
Gabor Filter
TODO
Local Binary Pattern (LBP)
TODO
SIFT
TODO SIFT vector is 128 dimensional
Bag of Visual Words (BoVW)
TODO
Fisher Encoding
TODO

CNNs

  • Lernen Gabor Wavelets (TODO: Quelle?)
  • Warum tiefere Netze? → Muster können geteilt werden (Räder für Traktoren / Motorräder)
  • TODO: Filter response = Feature Map?
  • TODO: Warum ist es ok, dass der Gradient von ReLU(x) für $x \leq 0$ gleich 0 ist? (Saturierungsproblem)
  • TODO: Negative Log Likelihood vs Cross Correlation - what are differences?
Pooling (Subsampling)
Auf eine $k \times k$ Region der Feature-Map wird ein Operator (z.B. max, mean) angewendet, der diese Zusammenfasst. Typischerweise wird diese Operation mit einem Stride > 1 verwendet. Durch den Stride wird zugleich die Datenmenge auf $\frac{1}{s^2}$ reduziert.

Pooling wird seperat pro Feature-Map angewendet.
Normalization Layers
TODO
  • Contrast Normalization
  • Range Normalization

Head-pose Estimation

  • State of the Art: Regression based apprach (Random Regression Forests) is 15 years old
  • slide 14: $r$ is distance, $f$ is focus length, $b$ is baseline, $d_L, d_R$ is distance left/right - in the later slides is a figure.
  • Pan / Tilt / Jaw
Entropy
The entropy $H$ of a discrete random variable $X$ is $$H(X) = \mathbb{E}[-\ln(P(X))] = - \sum_{i=1}^n P(x_i) \log_2 P(x_i)$$
Information Gain (Kullback–Leibler divergence)
The expected information gain is the change in entropy $H$ from a prior state to a state that takes some information as given: $$IG(T,a) = H(T) - H(T|a)$$
Disparitätenkarte
TODO

Facial Feature Detection

Facial Features
  • Nose tip
  • Ears
  • Eyes
  • Chin
  • Lips (corners)
  • Eyebrow
Facial Feature Detection
Is important for alignment Problems:
  • Expression variations
  • Scale variations / angle
  • Lightning
  • Occlusions

Statistical Appearence Models

  • Represent shape and texture (learned seperately): $x \approx \bar{x} + P_s b_s$, wobei $P_s$ eigenvektor of covariance; $b_s = P_s^T (x-\bar{x})$

Fit shape Model

  • Active shape model (fitting algorithm)

Automatic Facial Expression Analysis

Allgemein
  • Valence-Arousal Modell von Russel 1980
  • Facial Action Cod
FACS (Facial Action Coding System)
  • 44 Action Units, welche Menschliche Mimik beschreiben
    • 30 Gesichtsmuskeln (12 upper, 12 lower)
    • Viele Binär, manche mit Intensität
  • Emotionen sind Kombinationen daraus
Datenbanken
  • Cohen-Kanade AU-Coded Facial Expression Database
  • Emotion Recognition in the Wild (EmotiW)
  • AFEW db
Bag of Visual Words
TODO

Person detection

Detection
Detection is classification with localization
Person detection
Person detection (sometimes also pedestrian detection) is the task of finding people in an image or video. This is usually done with bounding boxes, although tight segmentation methodes exist.

One can divide the methods the following way:
  • Input: Single image / video
  • Detection approach
    • Global: Detection of the person as a whole
    • Part-based: Detection of arms, legs, head, ...
  • Model type
    • Generative: Models how the data was generated (+ is interpretable - hard to create)
    • Discriminative
Shilouette matchin is a discriminative, global, single image approach. HOG people detector is a single image approach (TODO: global/part based? generative / discriminative?)
L2 hysterese
A variant of the L2 norm which cuts peaks
HOG People Detector
TODO
Shilouette Matching
Shilouette matching is practically not used anymore. It uses chemfer matching, 2/3 distance. It can be speeded up with a template hierarchy.

Tracking

Multi Camera Systems
Topologies
  • Stero-Cameras (cars)
  • wide baseline multi-camera system (conference room)
  • non-overlapping fields of view (security system)
Kalibrierung: Intensität und extTODOs z.B. mit Schachbrettmuster bestimmen.
TDOA (Time Delay of Arrival)
In the case of multiple microphones and one audio source, the time delay when microphone 1 records the same as microphone 2 is called TDOA. It can be used to locate the audio source.
Adaptive Merkmalsgewichtung
TODO

Gesten

Gesten
Gesten bedeuten nicht überall das selbe. Ein Nicken bedeutet in vielen, aber nicht in allen Kulturen Zustimmung (Quelle)

Action / Activity Recognition

Aktion
Zielgerichtete Interaktion mit der Umgebung; tendentiell mit wenigen oder einzelschritten / kurzen Perioden
Aktivität
Sind auf viele Einzelaktionen aufgebaut. Zwei verschiedene Aktivitäten können aus sehr ähnlichen Bewegungen bestehen, aber deutlich unterschiedliche Semantik haben. Ein Beispiel ist das öffnen einen Schlosses mit einem Schlüssel und das herausdrehen einer Schraube mit einem Schraubenzieher.

Es ist ein Klassifikationsproblem mit Bild-Sequenzen.
Lösungsansätze: HMMs, RNNs

Features: Optical Flow aus Histogram
  • Global
  • Lokal (Bild aufteilen)
  • Implicit Shape Models
  • Deskriptoren (SIFT)

Datasets: UCF Sport; Hollywood 2; Sports-1M
Zero-Crossing Rate
Extrem einfaches Audio-Merkmal, welches es erlaubt Auto-Hintergrundrauschen von Sprache zu unterscheiden. TODO
MFCC (Mel Frequency Cepstral Coefficients)
MFCCs sind gängige Features der Sprachverarbeitung.
BoW (Bag of Words, Bag of Visual Words)
Cluster Features for objects by feature similarity; gives histogram representation of object; TODO
HOG (Histogram of Gradients)
Ein Merkmal für Bilder welches in SIFT eingesetzt wird; TODO
Optical Flow (OF)
TODO
HOF (Histogram of Optical Flow)
TODO
MBH (Motion Boundary Histogram)
TODO
Dense Trajectories
TODO

Wrap-up

  • pinhole model, calibrarion (extrinsische / intrinsische Parameter), stereo processing (disparitäten)
  • Features
    • Color, fg/bg, stereo edges, edge histogram, Gabor- und Haar-Filter (Viola&Jones), LBP
    • Mid-level-Representations*: GMM, Bow, BoW+Spatial layout (body parts)
    • Dimensionalitätsreduktion: PCA (Eigenfaces) / LDA (Fischer-Faces)
  • Classifiers: Boosting, SVM, CNN, Regression Trees, HMMs, k-NN
  • Wie finde ich keypoints?
  • Descriptors (SIFT!)
  • Space-Time-Features: Space-Time-Interest points; HOG / HOF, Dense Trajectories: Bildfolge, finde Trajektorie
  • Implicit Shape Model: Baog-of-Words + Spacial Layout
  • Statistische Modelle: Active Shape / Active appearence
  • Chromatische Farbräume: Helligkeit rausnormalisieren (2-dimensional: rg, HS, UV)
  • Morphable 3D models: PCA - laser scans
  • Active Shape: Statistische Modellierung der Form; Textur entlang der shape. Nutzt PCA. Lernt Textur.
  • Active Appearence: 2D. Gemeinsames statistisches Modell von Shape & Appearence; Textur innerhalb von Mesh / Punkten. Nutzt auch PCA. Lernt Textur.
  • 6 Basic Emotions: FACS, Action Units
  • HOG modelliert Textur
  • HOF modelliert Bewegung

Praktische Aufgaben

Es gibt 3 praktische Aufgaben, die 10% der Note ausmachen:

  • Haut erkennen
  • Detektieren ob auf einem Bild eine Person ist oder nicht
  • Erkennen ob auf zwei gegebenen Bildern die selbe Person ist

Die Aufgaben müssen mit C++ gemacht werden. OpenCV kann verwendet werden. Es ist Beispielcode gegeben.

Man muss in 180s die Modelle trainieren.

Bewertet wird eine Präsentation, die am 16.01.2016 gemacht werden muss. Die Präsentation soll mindestens 3 Folien, maximal 5 Folien haben. In diesen 5 Folien sollen alle 3 Aufgaben beschrieben werden. Es soll beschrieben werden wie die Aufgaben gelöst wurden / was geklappt bzw. nicht geklappt hat. Die Präsentation soll ca. 8 - 10 min pro Team dauern.

Es ist ok private Datensätze zu verwenden um ggf. Hyperparameter zu bestimmen.

Für weitere Fragen steht Manuel Martinez zur Verfügung.

Prüfungsfragen

  • Was ist das Hauptproblem der Gesichtserkennung?
    → Beleuchtung / Pose missmatch (ECCV'94), Occlusion, illumination
  • Welche Farbbasierten Ansätze gibt es zur Gesichtserkennung?
    → Parametric vs Non-Parametric, Histogram Backprojection, GMM, Bayes, Farbräume
  • Welche Feature-Basierten Ansätze gibt es zur Gesichtserkennung?
    → Ellipsis, Eigenfaces, Fisherfaces, ANN, Evaluationsmaß: ROC / AUC, Viola&Jones: Rotierte Gesichter -> in trainingsdaten verwenden
  • Wofür steht DCT und AAM?
    → TODO
  • PCA vs LDA: Was ist zur Face Recognition besser?
    → Das Hauptziel der PCA ist Gesichter gut rekonstruieren zu können. TODO
  • Wozu ist die Histogram Equalization gut?
    → TODO
  • Welche Feature-Basierten Ansätze gibt es zur Face Recognition?
    → Facial Features (Abstand der Augen) vs Appearence-based
  • Warum macht man Tracking und nicht einfach Frame-weise Detection?
    → Tracking ist leichter, weil man Annahmen über die Position machen kann
  • Was sind Anwendungen von Action und Activity Recognition?
    → Fahrer beobachten (ist er aufmerksam? spielt er mit dem Handy?), Fußgänger beobachten (will er auf die Straße?), Patientenüberwachung, Sicherheitssystem (aggressives Verhalten)
  • Was ist Kalibrierung?
    → TODO
  • Woher kommt die Skalen-Invarianz bei SIFT?
    → Finden einer charakteristischen Skala
  • Woher kommt die Rotationsinvarianz bei SIFT?
    → Kantenhistogramme, Maximalausrichtung (vgl. People detection)
  • Was ist der Unterschied zwischen Diskriminativen und Generativen Modellen?
    → Generative Modelle modellieren explizit die Verteilung (Bayes-Formel)
  • Wie funktioniert Histogram Backprojection?
    → TODO
  • Welche Metriken kann man zum Benchmarken benutzen??
    → ROC, TP-Rate, FP-Rate
  • Was macht Computer Vision schwer?
    → Beleuchtung, Pose, Occlusion (manche Ansätze sind weniger Anfällig, z.B. Part-based approaches)
  • Welche Annahmen macht man im Kalman-Filter, die man nicht im Particle-Filter hat?
    → TODO
  • Welche Anwendungen gibt es für CV in der HCI?
    → Smart Houses, Roboter-Interaktion, Smart Cars, Smart Rooms, Assistenztechnologien z.B. für Blinde
  • Auf welcher Ebene, wann und wie werden Informationen zusammengeführt (z.B. Face / Pose)?
    → TODO

Material und Links

  • Vorlesungswebsite
  • lecture-demo.ira.uka.de: Interaktive Demos, insbesondere Rosenblatt-Perceptron, ...
  • StackExchange:
    • Why do CNNs with ReLU learn that well?
    • How is the evaluation setup for YouTube faces of FaceNet?
    • What are interleaved layers of convolutions?
  • Video Analysis lecture

Fazit

Kommt noch.

Vorlesungs­empfehlungen

Folgende Vorlesungen sind ähnlich:

  • Analysetechniken großer Datenbestände
  • Informationsfusion
  • Machine Learning 1
  • Machine Learning 2
  • Mustererkennung
  • Neuronale Netze
  • Lokalisierung Mobiler Agenten
  • Probabilistische Planung

Weitere:

  • Einführung in die Bildfolgenauswertung
  • Content-based Image and Video Retrival - 3 ECTS, 2 SWS

Termine und Klausurablauf

Die Veranstaltung wird mündlich geprüft, jedoch sind 10% der Note durch praktische Aufgaben zu erlangen. Üblicherweise dauert eine Prüfung etwa 30 min.

Die Anmeldung zur Prüfung erfolgt per Email an das Sekretariat ([email protected]).

Weitere Prüfungstermine erst nach dem 18. April.

Published

Okt 19, 2016
by Martin Thoma

Category

German posts

Tags

  • Computer Vision 6
  • Klausur 34

Contact

  • Martin Thoma - A blog about Code, the Web and Cyberculture
  • E-mail subscription
  • RSS-Feed
  • Privacy/Datenschutzerklärung
  • Impressum
  • Powered by Pelican. Theme: Elegant by Talha Mansoor