Automated visual inspection of cast parts

A CNN flags defective castings, explains itself with Grad-CAM, picks its decision threshold from the cost of a shipped defect versus a false reject, and is tested for whether it really looks at the part or at how the photos were taken. The model below runs entirely in your browser.

Live demo

Or upload a top-view casting photo:
Selected casting
Input
Grad-CAM heatmap
Grad-CAM: evidence for "defect"
-
Pick an image to run the model.

Results

Models on the held-out test split

Shortcut tests (test AP)

A model that reads the part keeps its AP with the background greyed out or its brightness equalised, and falls to chance (AP = defect share) when only the background is visible.

Figures