How machine learning can monitor worker fatigue and ensure safety