# AI reads X-ray images of aluminium castings to find porosity and shrinkage, on existing inspection systems (Hengst SE, Fraunhofer IIS)

> AI X-ray inspection of die castings: at Hengst SE the AI found every critical pore in a live test and ran in 1.3 s per image on a standard PC.

- Canonical URL: https://aiagentsformanufacturing.com/use-cases/ai-xray-casting-porosity-automatic-defect-recognition-hengst-fraunhofer/
- Department: Quality (https://aiagentsformanufacturing.com/departments/quality/)
- Evidence level: Verified. Real deployment at a named or precisely described company, with a measured result from a primary source.
- Added: 2026-11-11
- Last updated: 2026-11-11
- Publisher: AI Agents for Manufacturing (https://aiagentsformanufacturing.com)
- Manufacturers named: Hengst (https://aiagentsformanufacturing.com/companies/#hengst)
- AI tools deployed: Fraunhofer IIS ISAR (https://aiagentsformanufacturing.com/tools/#fraunhofer-iis-isar)

## Role

Quality and non-destructive testing (X-ray inspection of die castings). Typical users: quality manager, NDT or X-ray inspector, foundry or die-casting process engineer, quality engineer at a casting supplier

## The problem

Internal porosity and shrinkage cavities in aluminium die castings weaken parts and are found only by X-ray, before machining or assembly. In many plants the radiographs are still judged by people, which depends on experience and fatigue, makes subtle pores easy to miss, and gives different decisions from one inspector or shift to the next. At Hengst SE (filtration systems, Nordwalde, Germany), the X-ray cell inspected each series part in a fixed set of positions (9 for one part, 18 for another) and the evaluation was manual; any AI had to run in under two seconds per image on a standard industrial PC without a graphics card and fit into the existing X-ray software, which has no API. Classical automatic defect recognition (rule-based image processing) exists, but according to Fraunhofer IIS it needs a lot of setup and produces false calls that someone must check by hand, while AI has been held back by the amount of training data it needs and by customers' doubts about its reliability.

## How AI helps

A deep learning object detector looks at each radiograph and draws a box around every pore it finds. At Hengst SE, researchers from the University of Applied Sciences Emden/Leer and Hengst trained YOLOv5 models on 5,400 production radiographs with about 40,000 annotated pores, kept the native 2016 x 2016 pixel resolution because downscaling hid small pores, and compared one model per inspection position with one model per part. The X-ray software was only set to save each image to a network folder with the part and position in the file name; the AI program watches that folder and returns its result, so neither the X-ray hardware nor its software was changed. Fraunhofer IIS takes a different route for its ISAR inspection software: a network pre-trained on simulated and real X-ray images, which a customer fine-tunes with only a small number of its own images, set with a single threshold, and run in parallel with the classical rule-based recognition during the introduction period, so inspectors can build confidence before relying on the AI. Inspectors still own the accept or reject decision on critical findings.

## Step by step

1. Pick one high-volume casting with a stable X-ray routine (fixed fixture, fixed positions, fixed exposure recipe); AI works best when the pose and settings do not change.
2. Collect a few thousand production radiographs and have your certified inspectors mark the defects the same way, with a written rule for what counts as one defect.
3. Agree on acceptance criteria before training: no missed critical defect on a test set, a maximum false-reject rate, and the time per image your cycle allows.
4. Connect without touching the X-ray system if possible (images saved to a folder, results shown beside the operator's screen), and run the AI in parallel with the inspectors for several weeks.
5. Compare blind on the same images, review every disagreement with a senior inspector, and count physical defects, not boxes.
6. Plan for upkeep: new parts, new exposure recipes or tooling wear need new labelled images and retraining, and the false-reject rate should be tracked every week.

## Tools

- YOLOv5 (open-source object detector, Ultralytics) trained in-house and connected to the existing X-Cube Compact cabinet and VistaPlusV software through a network folder: used at Hengst SE
- Fraunhofer IIS ISAR with its AI-based automatic defect recognition module: developed and tested by Fraunhofer IIS on wheels and chassis components
- Other tools to evaluate: the AI defect recognition option from your X-ray system supplier, specialised vision vendors for radiography, CT for parts where 2D views are not enough
- To prepare a project without new software: your rejection data and inspection standard, plus any LLM (ChatGPT, Claude, Copilot, Gemini) with the prompt below

## Result

Hengst SE (peer-reviewed study in Applied Sciences, December 2025, with a Hengst employee as author): mean inference time of 1.33 s per image on an Intel Core i5 industrial PC without a GPU; F1 scores of 0.74 to 0.87 by position; in a blind two-week live test against certified inspectors, the position-specific models found all 7 critical findings on part A and all 11 on part B; on all defects, the models came close to the inspectors on part A (F1 0.892 versus 0.904) and beat them on part B (0.891 and 0.904 versus 0.806) once split detections of the same pore were merged. The authors note small samples for critical defects, no repeated runs and no measured scrap or cost savings. Fraunhofer IIS (ECNDT 2026 conference paper): for light-metal wheels and chassis components, the AI module reached near-100% probability of detection for critical defects with significantly fewer false calls than classical automatic defect recognition; the short paper gives no detailed numbers. A small Italian die caster (about 60 employees, not named) reported in a trade-show article a 52% drop in defects found by customers, returns down from 2.8% to 0.9% and about EUR 95,000 saved in the first year with an AI X-ray system, after a false-reject rate above 12% in the first two months that fell below 2% after re-labelling by quality staff (DGITALMECSHOW article; unverified).

As reported by the source; most figures are vendor or self-reported and not independently verified.

## Human review: cautions

- The Hengst results come from one cell, two parts and a two-week live test with small samples for critical defects; the paper reports no scrap, cost or throughput savings.
- The Fraunhofer IIS paper is a short conference summary without detailed figures, and the Italian SME results come from a trade-show article that does not name the company.
- A model trained on one part, pose and exposure recipe will not simply work on another: plan for new images, labels and retraining.
- For safety-relevant parts, customer and standard requirements still apply; keep certified inspectors responsible for critical decisions, and agree any change to the inspection method with your customers.

## Try it yourself (prompt)

```text
You are a quality engineer at an aluminium die-casting plant preparing a pilot of AI defect recognition on our X-ray cell.

I will paste: (1) our X-ray inspection routine for one part [positions, exposure recipe, cycle time]; (2) our acceptance standard for porosity and shrinkage; (3) last year's X-ray reject data and customer complaints for that part.

Do this:
1. Summarise where and how often defects are found, and which positions matter most.
2. Propose acceptance criteria for the AI pilot: critical-defect detection, false-reject rate, time per image, and how to count one physical defect.
3. Write a labelling guide for our inspectors so that everyone marks defects the same way.
4. Draft a parallel-run test plan: how many images, how long, blind comparison, who adjudicates disagreements.
5. Write 10 questions for X-ray or AI vendors (integration with our software, hardware needed, images needed to fine-tune, retraining when a part changes, who owns the model and data).

Do not decide whether a part is acceptable: flag that for our certified inspectors. Use only the data I paste in; if something is missing, write 'not found' or list it as a question instead of guessing. Do not send, order, post or change anything in any system: produce drafts for my review and approval.
```

## Related use cases

- [Vision defect inspection on the edge (Seagate, Procter & Gamble, Coppenrath & Wiese)](https://aiagentsformanufacturing.com/use-cases/vision-defect-inspection-on-the-edge/)
- [Anomaly detection on machine and process data to cut scrap](https://aiagentsformanufacturing.com/use-cases/anomaly-detection-to-cut-cost-of-quality/)
- [Deep learning optical sorters spot hard defects in fruit and nuts on the line, so food plants pack cleaner product with fewer hand sorters (Chelan Fruit, Kings River Packing, The Almond Company)](https://aiagentsformanufacturing.com/use-cases/ai-deep-learning-optical-sorting-grading-food-defects-chelan-kings-river-almond-company/)
- [AI double-checks what the AOI machine flags on circuit boards and clears the false calls, so operators only review real defects (Siemens Rastatt, USI, FermionX)](https://aiagentsformanufacturing.com/use-cases/ai-aoi-false-call-reduction-smt-pcb-inspection-siemens-rastatt-usi-fermionx/)

## Sources

- https://www.mdpi.com/2076-3417/15/24/13134
- https://www.ndt.net/article/ecndt2026/papers/ECNDT_2026_ID_298.pdf
- https://dgitalmecshow.com/en/Inline-X-ray-inspection-of-surface-defects-for-PMI-die-casting/

---
Please cite the canonical URL: https://aiagentsformanufacturing.com/use-cases/ai-xray-casting-porosity-automatic-defect-recognition-hengst-fraunhofer/
