Machine learning for machine vision