A die casting can look acceptable on the outside yet reveal porosity after machining or fail a leak test. When a customer asks for evidence of internal quality, an X-ray machine with AI becomes an attractive option. Buying an automatic image classifier alone, however, does not create a defensible inspection process. The plant and its customer must agree which porosity, shrinkage and inclusions matter, where they matter, how images will be acquired and what happens when a result is uncertain. This guide covers 2D digital radiography (DR), CT, AI segmentation, procurement, factory and site acceptance tests, and shot-level traceability for a Thai production plant.
The decision in brief: let AI locate indications, and define acceptance with the buyer
A sound sequence is to identify the critical features and failure modes, write the buyer-approved acceptance criteria, establish reproducible image acquisition, use AI to highlight candidate defects, and have authorized personnel resolve borderline cases. An AI confidence score is not a customer-approved quality requirement. Define who owns the final disposition, when to rescan, and how to quarantine an indeterminate casting before the equipment is released to production.
Where a projected image reveals the relevant defect reliably at production takt, 2D DR is a sensible first candidate. CT is worth testing when overlap, complex geometry, defect depth, volume, wall thickness, or distance to a functional surface affects the decision. The choice between 100% CT and a combination of routine DR plus selective CT depends on demonstrated image quality, throughput and cost with actual castings. Nikon describes DR as a flat projection and CT as a three-dimensional reconstruction from projections at many angles. Nikon’s explanation of DR and CT

Why visual inspection and process traceability are not enough on their own
A surface camera can assess flash, scratches and other visible conditions. It cannot directly assess a void that never reaches the surface. An internal problem may only become evident after machining, a leak test or a durability test. This does not mean every casting needs X-ray inspection. It means the inspection scope should follow functional risk, contract requirements, failure history and process capability. ASNT’s radiographic testing guide describes how ionizing radiation reveals internal conditions, while also discussing limitations due to geometry, flaw orientation and radiation safety.
Shot, die and process records are indispensable for investigating cause. Yet a record of the process does not by itself prove the internal condition of an individual part. Linking X-ray results to shot ID, cavity, melt batch and time makes a failed casting traceable to the manufacturing conditions that produced it. For the design of those production records, see our die casting traceability guide for Thai plants. Our article on AI inspection of metal surface defects explains the related surface inspection workflow. Here the focus is internal integrity.
Separate the indications: gas porosity, shrinkage and inclusions
Gas porosity: count, size, distribution and location
Gas porosity appears as voids within the metal. Radiographic contrast depends on part thickness, viewing direction, exposure, detector settings and image processing. Counting dark spots alone is therefore an incomplete acceptance rule. Agree on the region of interest, maximum size or projected area, distribution in a specified region, distance from a sealing or machined face, and how clustered indications are counted. Identical numbers of pores can carry different risks in a thin stressed wall and a nonfunctional boss. ZEISS includes pores and porosity among the internal conditions addressed by X-ray inspection of light-metal castings. ZEISS light-metal casting overview
Shrinkage: connect morphology and location to the process
Shrinkage-related cavities may have irregular, branching or clustered shapes rather than the appearance of an isolated round pore. Do not infer a unique root cause from the image alone. Compare locations with die temperature, injection and cooling settings, melt history and cavity. CT may add value when the three-dimensional extent and neighbouring wall thickness matter. The active ASTM E1814-25 practice for CT examination of castings identifies porosity, inclusions, cracks and shrinkage as examples of discontinuities that CT can locate and characterize. The practice does not set a particular casting’s acceptance limits.
Inclusions: distinguish “not detected” from “proven absent”
Foreign material can have a different density and image contrast from a void. The material, size and position that must be detected depend on the product and imaging system. If the buyer is concerned about hard particles damaging a cutting tool, the assessment may differ from one focused on structural strength. Specify the smallest relevant indication and demonstrate detectability on representative samples. Treat “image inadequate” and “unable to classify” as held states, not automatic passes. Ensure that the buyer’s terminology, operator labels and AI training labels use the same defect categories; otherwise inspection data cannot reliably support process improvement.
Choosing 2D DR or CT for a production line
DR records a projection of the casting on a detector. It lends itself to fixed inspection stations and automated handling, and additional views can reduce blind spots. Depth information overlaps in the image. Thick and complex regions can hide or distort an indication, so a “DR is sufficient” decision should be demonstrated for each critical defect and relevant orientation on actual parts.
CT rotates the object, acquires projections around it, and reconstructs slices and a volume. The method can separate overlapping features and support analysis of defect volume, depth, surface distance and internal geometry. Its acquisition, reconstruction, data and handling requirements must be measured as part of the cycle. Nikon likewise distinguishes fast routine DR from CT’s greater capability for complex three-dimensional analysis. Nikon inspection services
A practical comparison uses the same approved good, bad and borderline castings on both methods. Record whether the buyer’s specified defects are adjudicable, as well as fixturing repeatability, full cycle time, restart after downtime, safety, storage, service and future capacity. A staged route—DR for routine inspection, another view or CT for uncertain cases—may be effective, but it still requires validation against the buyer’s criteria.

What AI should do—and what remains a quality decision
AI can identify candidate regions, segment their outlines, suggest classes and produce measurements for a documented rule. With CT it can work on volume data. ZEISS explains that noise and artifacts complicate CT defect detection and that its ZADD Segmentation app uses AI to segment candidate defects and support measurements such as diameter and volume. This is a description of a product capability, not a performance guarantee for a particular factory. ZEISS ZADD Segmentation
AI does not infer the intent of a customer’s drawing. If a seal face has a different permissible indication from a remote feature, Quality must define the region and threshold and approve changes. Keep the segmentation output separate from the acceptance rule. This lets the team identify whether a later change came from the model, image acquisition or the customer’s rule. A high model confidence is not the same as contractual acceptance.
Measure misses and false calls separately. A false call creates rescans, manual review or unnecessary scrap; a miss may reach the customer. Test by part family, cavity, thickness, view and production condition. Do not report a single impressive accuracy number drawn only from obvious samples. Retain borderline images in the validation set and define a confidence band requiring human review. Indeterminate images should remain visible in reports rather than disappearing from the denominator.
Agree the acceptance rule before issuing the RFP
Gather the buyer drawing, contract specification, approved samples, applicable reference images and failure history. Mark critical regions and build an acceptance matrix by defect type. Document which view is assessed, whether overlapping indications count separately, whether a machined-away zone is included, and what happens at the exact boundary value. Where a threshold is unresolved, mark it as awaiting buyer approval; a machine supplier should not decide it by default.
Image quality is part of the rule. Define material and maximum thickness, view and orientation, exposure, calibration, file format and rescan criteria. If a human cannot adjudicate an image, AI should not be allowed to pass it. ASNT notes that radiographic detectability depends on geometry and flaw orientation. ASNT RT guide An inadequate image belongs in hold or alternative inspection.
Assign ownership: Quality controls the criterion and its revision history; inspectors escalate ambiguity; Engineering maintains the equipment and imaging process. Define which changes need buyer approval—AI model, threshold, view, fixture or casting design. Without change control, adding training images can inadvertently change the effective acceptance boundary.
Build a dataset that represents the production decision
Do not train only on striking defect images. Include the many normal images seen in production, wall-thickness transitions and machining features that resemble defects, small critical indications and difficult borderline parts. Preserve part number, die, cavity, view, thickness, machine and acquisition period. Images of the same casting from different angles must stay together in either the training or evaluation split; otherwise measured performance on unseen parts can be overstated.
A competent team should label against the agreed definitions, with joint review of disputed cases. CT or destructive sectioning may help establish ground truth for selected samples, but a small investigated set may not represent every production lot. Keep separate fields for indication presence, type, location, adjudicability and final disposition. When AI differs from the reference decision, the team can then tell whether acquisition, segmentation or the acceptance rule caused the discrepancy.
Keep a fixed validation set after commissioning and register newly discovered modes separately. Melt, die, material and seasonal operating conditions may shift. When a model changes, run old and new versions on the same fixed set and disclose changes in misses, false calls and indeterminate rate. Model development must not silently redefine buyer-approved acceptance.
What to put in an RFP for a Thai die casting plant
Specify the part numbers, alloys, dimensions, maximum section, mass, fixturing, available views, target indications, critical regions and evidence the customer requires. For mixed production, define recipe selection and how a wrong recipe is prevented. Takt time must include loading, ID capture, positioning, exposure, reconstruction, AI analysis, human review where needed and unload. A camera exposure figure alone is not line capacity.
Require a supplier demonstration using agreed samples and acquisition conditions. If reference images are part of the contract, state their edition, class and use. ASTM E2973-22 provides digital reference images for aluminum and magnesium die castings, but the purchaser and supplier still need to agree the inspection attributes and acceptance criteria. ASTM E1814-25 describes CT examination of castings and does not prescribe acceptance for a particular product. Do not let a standard’s title stand in place of a product-specific decision.
Specify image input, resolution and allowable acquisition range; retained defect masks, measurements, results and software versions; low-confidence hold; rescan and manual override; retraining and revalidation. Require the interface to PLC or MES, behaviour during a network outage, time synchronisation, retention, backups and access controls. Check shielding, interlocks, installation, inspection and training with the plant safety team and qualified local specialists. ASNT describes the safety requirements of RT. ISO 9712:2021 provides an international framework for qualification and certification of NDT personnel; site-specific legal requirements need separate confirmation.
FAT and SAT: prove the result at the supplier and at the installed line
At factory acceptance testing (FAT), use your own approved good, bad and borderline castings. Freeze the sample list, views, reference labels and rescan rules before testing. If the supplier tunes a threshold after seeing a test image, move that image into the tuning set and confirm the result on unseen parts. Record detection by defect class, misses, false calls, indeterminate outcomes, repeatability and full cycle time. An overall percentage by itself can hide a severe miss on a rare critical defect.
Site acceptance testing (SAT) repeats the agreed conditions after installation with real handling, power, network and MES connections. Deliberately test a skewed casting, missing ID, incomplete image, AI service outage and network loss. None should silently route to “pass.” Run day and night shifts and more than one operator. Measure the effect of rescans and manual review on actual line flow. Imaging and network conditions may differ from the supplier’s test site.
At handover, collect the test record, acquisition recipes, model and acceptance-rule versions, calibration and maintenance instructions, backup and recovery procedure, support escalation and training record. Confirm that each final disposition can be reconstructed from its image and rule revision when the customer later challenges a shipment.

Link inspection evidence to shot ID
Images filed only by date are difficult to match to a shipped part. Link the unique part or shot ID, part number, die and cavity, casting and inspection times, equipment, recipe, AI model, acceptance-rule revision, final reviewer and reason. Add melt batch and process settings where useful. If there is no individual serial number, design the relationship from shot and cavity to each casting.
Preserve the physical-to-digital link throughout handling. An unreadable ID should create a hold; operators should not guess it later. If a casting is rescanned, retain the first image and record why. If a held part is released by an authorized person, retain both decisions and the approver. Separate training data extraction from the official customer quality record, and calculate retention and storage cost for source projections, CT volumes, masks and reports before procurement.
Connected shot data can show whether indications cluster by cavity, time or process condition. Correlation alone does not prove cause: inspect the die, melt, injection and cooling evidence, then compare before and after changes using consistent imaging. The value of the X-ray record includes this route back to process improvement.
Compare total cost and introduce the system in five stages
Put the source and detector, shielding, handling fixtures, AI licence, server, MES integration, initial labelling, FAT/SAT, operator training, maintenance, consumables and recalibration in the same comparison table. CT may add reconstruction and storage cost. Include installation downtime, holds and rescans. Split costs into installation, annual operation and each additional part family. Measure benefits against a pre-installation baseline: earlier detection before machining, manual review load, customer evidence retrieval time and process feedback. A universal payback period would be misleading.
Stage 1—scope and criteria. Select one or a few part numbers, collect buyer requirements and prior failures, and map critical regions. Quality, Production, Engineering, IT and the customer interface should agree outstanding decisions.
Stage 2—image feasibility. Use representative good, bad and borderline castings in DR and, when needed, CT. Record blind areas, handling difficulty and cycle time. Distinguish CT as an engineering analysis tool from CT as a 100% production gate. In ZEISS’s Handtmann megacasting case, optical, tactile and X-ray methods play complementary roles in quality assurance.
Stage 3—RFP and FAT. Compare suppliers on the same samples and test procedure. Examine image quality, hold logic, safety, data exchange and service as well as AI output. Close issues against documented criteria.
Stage 4—SAT and parallel running. Compare AI and qualified human decisions for a defined period. Review disagreements daily and record whether image acquisition, labels, model or acceptance rule is at issue. Set the official language and translated work instructions so every shift follows the same rule.
Stage 5—production control. Before automatically routing parts, verify that missing ID, bad images, AI outage and communication loss all hold material safely. Review indication trends, hold and rescan rates, newly found misses and model revisions. Reassess after part, die or buyer specification changes.
FAQ
Is 2D DR or CT cheaper for die casting internal defect inspection?
The total cost depends on the casting, required detectability and cycle, not just the machine price. Compare image feasibility, handling, rescans, analysis, storage and maintenance on the same samples. Routine DR with selective CT is another option to validate.
Can AI replace the final inspector once it finds porosity?
Keep qualified human resolution of indeterminate images and borderline cases until the buyer-approved rule and measured performance support a different workflow. Even after automation, define audits and model-change oversight. AI can standardise candidate detection; it does not remove quality accountability.
Does an ASTM document determine whether our die casting passes?
No standard title automatically determines product-specific critical regions and limits. Agree the adopted edition, reference images, defect class, assessment region and borderline cases with the purchaser. ASTM E1814-25 covers a CT examination practice and explicitly does not provide a casting acceptance criterion. ASTM E1814-25
Where should a Thai plant start?
Pick a part family and collect approved good, bad and borderline samples alongside the buyer drawing. Decide what needs to be seen and where an indication becomes unacceptable before choosing equipment. Involve safety and maintenance specialists early in site planning.
Are stored images enough without shot ID?
A date folder rarely proves which shipped part and cavity produced the image. Retain a part or shot-and-cavity identifier, acquisition and decision times, recipe and model versions, final disposition and all rescans and overrides.
Summary
AI X-ray inspection works as a controlled production process when the X-ray method, segmentation, buyer-approved acceptance rule and traceability are designed together. Define how porosity, shrinkage and inclusions are judged by location; compare 2D DR and CT on real castings; write the conditions into the RFP; repeat them in FAT and SAT; and link each result to shot ID. AI can speed and standardise candidate analysis, while image adequacy, borderline cases and disposition stay governed by the agreed rule.
If you are still defining parts, acceptance examples or data links for a Thai plant, contact TOMAS TECH. We can help structure the inspection comparison and the connection from the final decision back to production history.