How simulated images can solve a major challenge in training AI models

Written by Henrik Birk
AI vision

AI can improve quality control significantly, but it comes with a fundamental challenge: training data. AI models often require thousands of images of both good and defective items to learn from, but what if those images don’t exist yet?

At JLI, we’ve been researching alternative solutions with promising perspectives, which we’ll cover in this blog post.

How to train a model before production has started

AI models used in quality control need extensive training. Traditionally, this means capturing and annotating thousands of real-world images, which is both time-consuming and impractical. This is especially true for new production lines, where defects may be rare, and it could take a long time to collect the needed number and variety of defects.

This leads to a bottleneck: How do you train a model before production starts, and how do you ensure it’s prepared for all possible defect types?

Simulating training images

Instead of waiting for defects to appear in production, we create them digitally. By leveraging 3D rendering software and game engines, we can build digital twins of both the item to be inspected and the entire vision system, including cameras and lighting and all.

This allows us to generate synthetic images that mimic real-world conditions without ever needing a physical defect.

The process looks like this:

1. 3D scanning the object.

We start with a real item and scan it to create an accurate digital model. If we already have a defective item, we can capture that defect in high detail.

2. Manipulating defects digitally.

Once we have a digital twin, we can move, resize, and reposition defects across multiple copies of the item. This allows us to simulate a wide variety of defect types and placements.

3. Transferring defects from other objects.

In some cases, we can “record” a defect from a completely different object using a 3D scanner, and then apply it to the digital twin of our target item. This enables defect reusability across different applications.

4. Generating realistic training images.

Because we’ve built a digital version of the entire vision system, we can render images that look like they were captured by an actual production setup. These synthetic images can then be used to train neural networks, making them significantly more robust.

simulated images (1)The second image in the top row is an image of an actual defect. The other seven are examples of simulated defects.

Tested in real-world applications

While creating digital twins is still a time-consuming process, advancements in 3D scanning technology are making it easier and faster.

We’ve already tested this approach in real-world applications with convincing results, and we’re actively integrating it into our projects. The next step is to refine the process, making it commercially scalable. Once fully developed, this method will allow us to deliver robust AI-based vision systems faster and at a lower cost than ever before.

AI in quality control is evolving and we believe that simulated training images are set to play a major role in the future of automated inspection.