Last timestep in masked sequence

Motivation This is just a short piece of code which I have needed multiple times when training a LSTM with masked inputs. Setup: Seq2seq training with additional loss Problem: How to get the last time step which is not masked...

Generating Behavior for Vehicles

This post is a loose collection of JavaScript demos I made while studying for the course “Generating Behavior for Vehicles”. The following two gifs show you how two of the demos work: **Planning a path through a city map with...

Localization of mobile agents

In this post I am going to try to explain the basic concepts of localization of mobile agents which I have learned in the lecture “Lokalisierung mobiler Agenten” at the KIT. The main outline: Wheel and vehicles (one lane kinematic...

Boltzmann Machines

This article tries to explain Boltzmann machines, RBMs, DBN, a little bit about energy models and contains a python example which shows how a generative model can be trained with contrastive divergence. Boltzmann Machines I have explained Binary Hopfield Networks...

Hopfield Network

This article explains Hopfield networks, simulates one and contains the relation to the Ising model. Hopfield Nets Let’s assume you have a classification task for images where all images are known. The optimal solution would be to store all images...

Simulating heat flow with Fourier

I recently read the book “Infinite Powers” by Steven Strogatz. In chapter 10 he told the story of Joseph Fourier and why he initially cared about approximating functions with a mixture of sine and cosine waves. His objective was to...

Car model datasets

List of car datasets This is a simple lookup page to answer questions like “In which dataset are images of the Renault Clio?” The lists are extracted from the datasets either by reading the directory structure or the accompanying matlab...

Optimization

Optimization Search for the optimum Assume we define a function f which takes a profession and returns the annual salary. It sounds naturally to search for the optimum. Maybe we even have some constraints like “the job should be in...

Dead Reckoning 2d

Dead reckoning The following notebook contains a simple implementation of dead reckoning with the Explicit and Implicit Euler Method for a bi-cycle given the steering angle and velocity at every timestep t. import math import numpy as np import matplotlib.pyplot...

Harris Corner Detection

This is an interactive demo for the Harris Corner Detector running in your browser with tensorflow.js. The goal is to find points in an image which are corners. These points have Hessians with large, similar eigenvalues. If only one of...

Information theory

Whether it is cryptography, automatic speech recognition or computer vision: Information theory seems to be everywhere in computer science. This post is a collection of intuitions and formulas. Information theory reasons about channels and how to optimally encode messages on...

Estimate depth information from two images

For human babies we know that: Depth perception, which is the ability to judge if objects are nearer or farther away than other objects, is not present at birth. It is not until around the fifth month that the eyes...

Analysis of Exam Questions in Automatic Speech Recognition

A fellow student counted the most frequent exam questions for the course “Grundlagen der Automatischen Spracherkennung” as I am preparing for the oral exam I thought that a visualization of this would be cool. About the course I attended the...

HMMs

Discrete HMM We can use a markov chain to model a stochastic process. A popular example is a weather model. We assume that the past can be summed up to states which describe enough to decide which state will be...

Sum-Product Network 2 - Learn Parameters

In the last post I wrote about inference, marginalization and such for SPNs. Now let us take a look at parameter learning for SPNs. Toy example In order to motivate ourselves let’s try to solve a motivating example: We try...

Sum-Product Network 1 - Overview

This post aims to give an overview of Sum-Product Networks with a graphical explanation. It also contains an introduction on inference. TL;DR Sum-Product Network is a group of probabilistic graphical models with the nice property that inference is linear in...

Visualize Grasping Movements

Visualizing joint angles of grasps In this post I am going to explain how to use the master motor map (MMM) in order to visualize grasping movements with joint angle data I downloaded from handcorpus.org. The MMM has a Whole-body...

Lstm Toy Examples

Some impressions of LSTM architectures for simple math functions: seq2seq, seq2vec and then seq-seq-autoencoder. In particular the last part is an experiment of reconstructing sinoid waves with phase displacement from a single latent parameter. Sequence to sequence X-Y I generated...

Detection end-to-end

The odyssey of writing a YOLO-like detection model for German traffic signs. Simply said: Give a CNN an image and let it draw boxes around the traffic signs. Getting started slowly Before detecting concrete boxes I thought it would be...

Tensorflow Toy Examples

I have been using tensorflow for some examples in this blog. Building a sequential model and evaluating some metrics was easy. But when I wanted to do a little bit more (for example image data set augmentation) I got really...

CS231n

Review of the video course When looking up resources on how to get a good overview of neural networks for computer vision you almost always get pointed to the youtube videos of the CS231n course held at Stanford. I watched...

Computer Science Master in Germany

Finding a computer science master in Germany This blog post describes my journey of finding a place for a master in computer science in Germany. It could be interesting to read because: You are also looking for computer science masters...

Image data set augmentation

Transform images to increase the size of the GTSRB dataset My GTSRB Keras CNN is overfitting its training data. I know that because the accuracy on the training data ist above 98% but the accuracy on the test data was...

Visualizing a CNN

Using Quiver to visualize a Keras CNN Debugging a neural network is tricky. CNNs are a little bit more “understandable” because we can look which features of an image activates different neurons. The following video is from the CS231n class...

GTSRB with tensorflow.js

TL;DR You can try my Traffic Sign Recognition Model in your browser: https://pollithy.com/gtsrb/index.html. The accuracy won’t overwhelm you ;) This blog post explains how to build such a website. Using tensorflow.js to run a Keras model in browser Tensorflow.js is...