Industrial Defect Detection
An end-to-end inspection workflow: classify the view, detect the anomaly, show the heatmap, measure the result.
My contribution
Solo build: dataset preparation, the classification and anomaly stages, and the evaluation workflow.
The problem
Manual visual inspection on a production line is slow, inconsistent between inspectors, and gives no record of why a part was rejected.
The approach
A pipeline built on the MANGO workflow platform. Images are validated and organised, classified by product view (bottom / side / top), then passed through a ResNet18 feature extractor into a Random Forest classifier that separates good from defective parts. Heatmaps visualise the regions behind a call, and a precision-recall curve with PR-AUC quantifies the model rather than relying on accuracy alone.
Decisions
- Frozen backbone plus a classical classifier
- Deep features from a pretrained ResNet18 fed into a Random Forest trains in minutes on a modest dataset and avoids overfitting that end-to-end fine-tuning would invite at this scale.
- Report PR-AUC, not accuracy
- Defects are the minority class. Accuracy flatters a model that calls everything good; a precision-recall curve shows what it actually does on the class that matters.
- Classify the view before judging the part
- A defect that is obvious from the top is invisible from the side. Routing by view first means each anomaly decision is made against comparable images.