Neural networks for surface inspection