Deep learning for medical image quality control