Deep Metric Learning for re-identification, tracking and hierarchical novelty detection