99% defect detection on metal surfaces is the number that matters on a die-casting line — but only if the inspection runs before machining, not after. Catching a porosity cluster or cold shut on the as-cast surface costs the price of remelting. Catching the same defect at leak test, after CNC machining, assembly, and cleaning, costs everything that has been added since the casting left the furnace. The economics of inline inspection for castings are not about accuracy alone. They are about where in the value stream the defect is found.
Foundry quality engineers know this. The frustration is that most inspection on casting lines is still downstream. X-ray sampling catches a fraction of the porosity that enters the machining queue. Coordinate measuring machines confirm dimensional conformance but do not see surface-initiated defects. Visual inspection at final assembly catches what every earlier step missed. Each discovery point adds the cost of all the processing between the casting and the finding. Vision inspection on the as-cast surface changes the discovery point to the earliest position in the value stream where the defect is physically visible.
Why the as-cast surface is the right inspection window
A die-casting leaves the die with its defects already formed. Gas porosity from entrapped air. Shrinkage porosity from solidification contraction at thick sections. Cold shuts where two metal fronts met without adequate fusion. Misruns where the cavity did not fill before the metal froze. Flash at the parting line. These defects do not appear during machining — they are revealed by it. Material removed by a CNC tool exposes a porosity network that was present in the casting from the moment it was ejected.
The surface of an as-cast part carries signatures of most of these defects. Gas pores that intersect the surface are visible as circular or near-circular pits. Shrinkage porosity at hot-spot locations creates a spongy texture at thick-section transitions. Cold shut lines appear as faint seams across the casting face, often at thin walls distal from the gate. Misruns leave rounded or scalloped edges where fill was incomplete. These signatures are learnable by a trained AI model.
What makes as-cast surface inspection practically useful is that it is a leading indicator of the defects that will cause scrap and failures downstream. It is not a perfect predictor — subsurface porosity that does not break the surface is invisible to any optical system — but it captures the process drift that produces high-risk castings before those castings consume machining time.
Defect modes, surface signatures, and detection challenges
| Defect mode | Formation mechanism | As-cast surface signature | Detection challenge |
|---|---|---|---|
| Gas porosity | Entrapped air or gas during die fill or solidification | Circular to irregular pitting, 0.1–5 mm diameter, smooth internal walls where they intersect the surface | Surface pores detectable optically; deep subsurface pores require X-ray; distinguishing acceptable porosity density from rejectable requires threshold calibration |
| Shrinkage porosity | Volume contraction during solidification at last-to-freeze locations | Irregular spongy or rough-textured depressions, typically at thick section transitions and locations farthest from gate | May be masked by flash or parting-line artifacts; texture variation across alloys (aluminium vs. zinc vs. magnesium) requires per-alloy training |
| Cold shut | Two metal flow fronts meeting at insufficient temperature for fusion | Linear seam or fold line on surface, typically at thin walls, long flow paths, or distal from gate entry; low surface relief | Low luminance contrast against surrounding metal; appearance changes significantly with lighting angle; most commonly missed defect under fixed-illumination systems |
| Misrun | Metal solidified before cavity fill was complete | Incomplete section edge; rounded or scalloped boundary where fill terminated; smooth finish at misrun edge distinguishes it from mechanical damage | Requires full-periphery image coverage; partially obscured by die lubricant residue immediately post-ejection |
| Flash | Metal bleeding into die parting line, vent pins, or ejector pin locations | Thin metallic fin at split line or pin-hole locations; consistent position across production run | Present at acceptable severity on most castings; distinguishing acceptable flash thickness from rejectable overflow requires area threshold calibration per part geometry |
Cold shuts deserve particular attention. They are the defect class most consistently missed by both X-ray sampling and manual visual inspection. X-ray detects volumetric defects — gas or shrinkage voids — but a cold shut is a planar interface with minimal void volume, so it shows low contrast on a radiograph. Manual inspectors under production pressure focus on visible pitting; a faint seam line blends with surface texture under standard lighting. A trained AI model working with controlled directional lighting detects the cold shut seam as a consistent luminance pattern regardless of surface finish variation within normal process tolerances.
The scrap-versus-machining-cost calculation
The cost difference between catching a defect before machining and after machining is determined by the machining-to-casting cost ratio of the finished part. For a structural aluminium die-casting — a transmission housing, a suspension bracket, an engine-mount bracket — the as-cast blank typically represents 10–20% of the finished machined part value. The remaining 80–90% is CNC machining time, fixturing, tool consumption, and cleaning.
A part scrapped at the as-cast stage loses the casting cost: metal, die lubricant, energy, and cycle time. That blank can be remelted and recast. A part that passes as-cast inspection and enters the machining queue, then fails porosity leak test or dimensional inspection after CNC, loses the casting cost plus the machining cost. The blank is scrap metal, not remelt — it cannot be reprocessed.
The scrap multiplier — finished part cost divided by as-cast cost — is typically 5–10x for complex structural aluminium castings. A defect discovery at machining costs 5–10 times more than the same discovery at the as-cast stage. For a production line running several hundred castings per shift, shifting even a fraction of defect discoveries from machining to the casting stage produces material scrap cost reduction within weeks.
The calculation does not require capturing every defect. It requires shifting the first discovery point earlier. Each defect caught at casting prevents that specific casting from consuming machining resources. The 60–80% reduction in false positives that trained vision achieves over threshold-based methods matters here: false positives on the as-cast line create unnecessary remelt of good castings, which is its own cost. Precision at the detection stage determines whether the economics work.
X-ray sampling vs. vision census: why sampling is a lottery
Process X-ray sampling at a rate of 5–10% of production is standard practice for porosity-sensitive castings. It is also a lottery. A 5% sample means 95% of the castings from a process that is drifting toward porosity pass inspection without being examined. When a core-pull temperature is running high or a die-lubricant cycle is deviating, the defect may appear in 3–8% of castings — a rate well within the sampling window's miss probability.
The correct framing is not "sampling vs. 100% inspection." It is "sampling plus downstream discovery vs. inline vision as a census." A sampling program that catches drifting process conditions in the 5% examined fraction will still miss the majority of defective parts. A vision system inspecting 100% of castings on the as-cast surface detects process drift as a rising defect density trend across consecutive parts — before a batch of defective castings has entered the machining queue.
The distinction between a sample and a census is particularly relevant for cold-shut defects, where the formation mechanism is process drift rather than random variation. A die running consistently at the wrong fill speed or metal temperature produces cold shuts on most of its output during that window, not randomly. A 5% sample has poor coverage of a systematic drift condition. 100% vision inspection on the as-cast surface catches the drift when it begins.
How AI vision operates on as-cast surfaces
The inspection challenge on die-cast surfaces is not resolution — standard industrial cameras at appropriate standoff distances capture the surface signatures described above at adequate resolution for most defect classes. The challenge is that die-cast surfaces are specular, reflective, and highly variable in texture across the same part. Directional lighting that illuminates a cold shut seam on one surface angle creates false shadows on another. Threshold-based systems struggle with this variability and require manual threshold adjustment as the die ages and surface texture changes.
A trained AI model learns the appearance of defect surface signatures across the natural variation in surface texture, lighting response, and die lubricant residue. It does not require re-threshold each time the die wears. New defect instances that appear during production — a new shrinkage location as the die thermal profile changes — are added to the training set and the model is updated. The same patented training approach that achieves 99% detection accuracy with 1,000 training images, rather than the 10,000 that conventional systems require, allows die-cast inspection models to be built practically for a large casting variant library without year-long data collection periods.
HyperQ AI Vision — the same architectural pattern that handles 8,000+ product variants on a Tier-1 automotive-parts line running 11,520 units per day at 99% detection accuracy — is cross-industry proof for metal surface inspection in high-mix environments. That deployment handles reflective metal surfaces — the same specular-reflection challenge that makes die-cast surface inspection difficult under fixed illumination — and runs zero-reconfiguration changeovers between fastener variants. The defect qualification capability (distinguishing an acceptable surface mark from a rejectable defect against the customer's specific quality standard) applies directly to the acceptable-flash vs. rejectable-flash threshold question that die-cast lines face on every part family.
For context on how HyperQ AI Vision handles surface defect detection on metal parts in production, see the extrusion profile defect detection walkthrough. Full specifications for production deployment are on the HyperQ AI Vision solution page.
Process monitoring: from defect detection to process control
An inline vision system running on an as-cast line produces a defect record per casting. Aggregated across a shift, those records tell a different story than per-part pass/fail decisions. Porosity density rising across consecutive parts without a step change in overall reject rate is an early signal of die temperature drift. Cold shut incidence correlating with a specific die cavity on a multi-cavity tool identifies one cavity running at the wrong fill temperature. Misrun clusters appearing at the start of each production run, then subsiding, flag a die warm-up protocol that is too short.
None of this is visible in a sampling X-ray program. When the sample rate is 5%, consecutive defective castings that are not sampled produce no signal until a downstream quality measure — machining scrap rate, leak test failure rate — moves enough to be noticed. By that point, the drift condition has produced a batch of defective castings that are already in the machining queue.
A vision system generating 100% as-cast defect records feeds a Statistical Process Control dashboard with real defect frequency, defect type, and defect location data for every production run. The signal latency between a process excursion and its detection in the quality record drops from hours (when the downstream measure finally moves) to minutes (when the defect density trend crosses the control limit on the as-cast record). For OEM supply chains that require SPC documentation as a condition of supply, the per-casting defect record is also the audit trail that demonstrates process control.
MY and SG foundry context
Malaysia's die-casting and precision casting base is concentrated in Johor and Perak, supplying automotive OEMs across Southeast Asia and Japan. Penang and the Klang Valley host precision aluminium and zinc casting operations serving electronics and medical device supply chains. Singapore precision casting serves semiconductor equipment and aerospace MRO markets where leak integrity is a qualification requirement.
For these operations, the case for as-cast surface inspection is also a regulatory and customer audit case. Automotive OEM supply chains increasingly require Statistical Process Control records with defect traceability to the individual casting. A vision system running on the as-cast surface generates a per-casting defect record that feeds directly into SPC dashboards and customer audit documentation. Manual inspection at final assembly cannot produce that record — it cannot attribute a late-discovery defect to the casting cycle that produced it.
Honest positioning: where X-ray remains the right choice
Subsurface porosity that does not break the casting surface is not optically detectable by any vision system, regardless of model quality or camera resolution. For safety-critical castings where subsurface void volume is a stress concentration risk — aerospace structural castings, high-pressure hydraulic housings — X-ray or CT inspection remains necessary and cannot be replaced by surface vision.
The correct approach for most structural die-casting applications is both: as-cast surface vision as the process-drift early warning and the majority defect-discovery system, and X-ray sampling for the subset of castings that pass surface inspection but require volumetric confirmation. The combination reduces machining-queue scrap without eliminating the subsurface coverage that surface vision cannot provide.
Rule-based threshold systems handle simple geometric defect classes on parts with stable, single-SKU geometry. They break on the surface texture variability, die-wear progression, and mixed alloy surface characteristics that a high-mix die-casting operation presents across its product range.
Send a casting sample batch and your current rejection pareto to Hypernology. Within two weeks we will run the sample through a surface inspection evaluation, identify which defect classes are detectable at the as-cast stage, and return a capture-rate estimate against your specific scrap driver. No contract until the detection rate against your dominant defect mode is confirmed.
