Semi-supervised anomaly detection for visual quality inspection