Introduction
In this section we finetune a pretrained CNN model using the cross-entropy loss for classes where the machine settingC has the anomalous label FAIL and all other settings belong to the nominal category PASS. We report relevant classification metrics as well as save the finetuned model for future use. UMAP is used to visualize the embeddings of the supervised model.
Approach
The supervised approach differs from the unsupervised approach in that we directly use the anomaly labels during training:- Training Data: Images labeled as either
PASS(nominal) orFAIL(anomalous) - Model: Pretrained ResNet-50 finetuned with a binary classification head
- Loss Function: Cross-entropy loss for classes
- Output: Binary classification (PASS/FAIL)
Advantages and Limitations
Advantages:- Direct optimization for the anomaly detection task
- Can achieve high accuracy when sufficient labeled data is available
- Interpretable decision boundary
- Requires labeled anomaly data which may be scarce
- May not generalize well to novel anomaly types not seen during training
- Risk of overfitting to specific anomaly patterns

