Initial draft, more or less working.

Still pretty much a work in progress.
I'm pretty sure the tracker works fine, the learning probably too, the detection is however very slow.