Add adaptive thresholds.
Merge branch 'master' of https://github.com/devnev/kth-kart
Merge branch 'master' of https://github.com/devnev/kth-kart