Machine learning for vision-based motion analysis