Skip to content

injection_moulding — defect_detection (patchcore-surface)

A fixed camera inspects each moulded part’s visible surface for defects such as short shots, flash at the parting line, sink marks over ribs/bosses, and burn marks near gate areas. patchcore is a one-class anomaly model trained only on known-good parts: it builds a memory bank of patch-level feature embeddings from good-part images and scores a new part by its nearest-neighbour distance in embedding space, so it needs no labelled defect examples and generalizes to defect types never seen in training, which fits a moulding process where defect types vary with material lot and die wear. The inspection zone (Zone, per the vision contracts) is a fixed polygon over the part’s visible face in the camera frame. Lighting is a diffuse ring light rather than a hard point source, chosen specifically because glossy moulded plastic produces specular hot spots under direct light that a patch-embedding model can mistake for anomalies; diffuse illumination keeps the good-part embedding distribution tight. For a mould cycling as fast as every 8 s, the part is stationary in the inspection fixture during each cycle’s cooling/ejection dwell, so a single triggered high-resolution frame per cycle is adequate; there is no motion to resolve, so the limiting factor is inspection resolution, not frame rate.

  • Spec: industrial GigE/PoE area-scan camera with fixed-focal C-mount lens and diffuse LED ring light, triggered single-frame capture, global shutter
  • Signal: scalar (1), range n/a
  • Basler ace 2 a2A2600-20gcPRO GigE area-scan camera (2608x1960, global shutter, PoE, HW trigger input)
  • Teledyne FLIR Blackfly S BFS-PGE-50S5C-C GigE PoE camera (5.0 MP) with 16mm C-mount lens
  • CCS Inc. LDR2-100SW2 diffuse LED ring light with controller

Mount the camera on a rigid fixture square-on to the part’s inspection face, framing the full surface of interest at a working distance that keeps the whole face in sharp focus at the lens’s working f-stop. Mount the diffuse ring light coaxially with the lens. Position the fixture clear of the mould’s platen travel, ejector stroke, and any pick-and-place robot envelope, and verify it stays clear through a full open/close cycle.

Camera connects via PoE Ethernet to the edge box’s GigE Vision NIC; the machine’s mould-open or part-in-fixture signal is wired to the edge box’s digital trigger input, firing the camera and ring light together; route trigger wiring away from the machine’s heater-band and high-current motor circuits to avoid induced noise on the trigger edge.

run 50 known-good parts and a set of deliberately defective parts (short shot, flash, sink mark, burn mark) through the inspection and compare flagged/not-flagged against a human QC sort

Expected: known-good parts score below score_threshold on >=98% of frames; each seeded defect class is flagged; re-tune score_threshold against the good-part score distribution if false-flags occur on normal cosmetic variation

  • lock out/tag out the moulding machine (LOTO) before mounting the camera/light fixture near the platen, ejector mechanism, or any robot pick envelope
  • verify the fixture cannot intrude into the mould’s open/close travel envelope or any robot’s reach at any point, including maintenance strokes
  • electrical safety for PoE camera cabling and ring-light power wiring routed near the machine’s heater-band and high-current circuits

500–1900 USD, difficulty 3/5, ~75 min install downtime.