Deep multi-task learning for farm animal monitoring from images