Artificial intelligence, machine learning, and deep learning are interrelated concepts involved with computer-based learning from vast amounts of data – and then making predictions based on that information. This article will show how these technologies can provide good alternatives to traditional image processing, and how software works to make this happen. As the capabilities of these technologies advance, they have important applications to many industries, and will certainly advance the task of quality inspection.

Artificial Intelligence Improves Quality

Bruno Menard, software director with Teledyne DALSA, explains how artificial intelligence will improve a growing number of applications. Here he explains trends in AI and how manufacturers can benefit from the technology.

The terms artificial intelligence (AI), machine learning (ML), and deep learning (DL) are often used interchangeably, but there are differences. If you think of concentric circles, AI is on the outside as the big idea. AI is often thought of as the engineering of making intelligent machines and programs. This includes when a machine can mimic human intelligence with the ability to predict, classify, learn, plan, reason and/or perceive. Next, machine learning is a subset of AI that includes the ability to learn without being explicitly programmed. It incorporates math and statistics to learn from the data itself and improve with experience; it requires labeled data often used for classification and clustering. At the center, deep learning is a subset of ML that uses neural networks to solve more complex challenges. DL uses unstructured or unlabeled data; it is also good for classification and clustering, although DL can create new data points on its own and it is more difficult to explain why the model makes certain decisions. It also requires larger amounts of processing power, such as Graphical Processing Units (GPUs). Throughout this article, we will generally talk about AI, unless we are specifically delving into the more specific categories.

The Benefits of AI Over Traditional Image Processing

Uncontrolled Environment

  • AI allows robust performance in uncontrolled environment.
  • AI tolerates significant variation in ambient lighting, viewing angle, rain, dust, occlusion and other environmental factors.

Varying Targets

  • AI tolerates high variation in shape of objects of interest such as defects, vehicles, fruits, faces, etc.
  • AI easily locates/recognizes objects never seen at training time.

Where Can AI Deliver Benefits Over Traditional Image Processing

When comparing AI to traditional image processing, there are two main criteria to consider. The first is the environment and the second is the target or the object you are looking for.

You want to employ machine learning algorithms which are extremely robust in terms of finding objects in uncontrolled scenes. You also want to identify the objects you are interested in. In an image where the food is sorted by type and identity, you want to be able to try to identify the tomatoes and the cucumbers with respect to what they are and not with just strict thresholds and limits as would be the case if you used traditional image processing. AI will have a high tolerance on the variation of shape, color, and lighting. In a scene where cars are moving on a street at night, where the environment of the lighting and the angle at which we track the objects is completely uncontrolled, it is a very challenging task to identify the cars.

AI allows robust performance in uncontrolled environment; it tolerates a significant variation in ambient lighting, viewing angle, rain, dust, occlusion, and other environmental issues. AI also tolerates a high variation in shape of objects of interest, such as defects, vehicles, fruits, faces, etc. By learning from the data over time, machine learning easily locates and recognizes objects not seen at training time.


Industries Where AI Can Be Used

AI is being adopted across industries to harness the power of data and use it to make more informed decisions. Self-driving cars sense the environment they are in and make decisions on how to operate and where to go. In healthcare, robot-assisted surgeries are becoming commonplace. Sports teams are using player data and AI technology to improve performance. And in manufacturing, the opportunities to implement AI abound. AI improves product quality by reliably detecting defects, and often detecting them earlier in the process chain. AI also improves speed by automating more steps in the process that are traditionally done visually.

Machine vision has been a part of manufacturing and quality inspection for decades, becoming increasingly common in the 1990s. Now, traditional machine vision techniques can be complemented with machine learning to classify parts and inspect final products even more quickly, efficiently and automatically, bringing the promise of AI to reality.

Requirements of AI - What Do You Need to Use AI?

  1. Image Samples
    • Minimum samples (few tens to few hundreds)
    • Enough variation inside dataset
    • Representative of the final scene
  2. Annotations
    • Annotations for each image samples
    • Class names, rectangles, polygons, image masks
    • Ideally made by human (ground truth)
  3. GPU
    • Mandatory for training
    • Recommended for runtime (inference)
    • Minimum class GPU (cores and memory)

What Criteria Do You Need To Use AI?

There are three criteria required to be able to use AI. You first need to collect image samples. Then, you need to provide annotations to describe all of those image samples. And third, you must have a GPU card in your system that is robust and powerful enough to manage an efficient and fast training time. Here is a bit more detail on each of the criteria.

  • Collect Image Samples. You will typically need a few tens to a few hundred samples to achieve good results on a typical application. This is provided that you have pre-trained the models via a software application. You must provide enough variation inside this data set so that it accurately represents the situation in which you will deploy this application in the field.
  • Annotations. Annotations are typically provided for each image sample, though there are new techniques today that require manual annotations for a few samples and generate others automatically. The annotations are essentially the names of the class you're trying to classify, the rectangles surrounding the object you want to locate, and further detail if you want to perform segmentation. Annotations are ideally made by humans and are referred to as the ground truth, which is the reference of what’s inside the image.
  • GPU (Graphics Processing Unit). A powerful GPU is mandatory for training your system to learn from the samples you provide. Once your model is trained, you can deploy it in the field without your GPU. You can run it on a CPU with a little bit less performance.

To train your AI system, you will take training images along with annotations and provide that to the software that will run a development PC with the GPU on it. And this software, through a quick flow will provide a model. A model is basically a neural network that has been trained with your sample images; that model can then be fed to the image processing software.


What Can AI-Enabled Software Do?

By training on data samples, an AI-based graphical application can enable users to train neural networks for a wide variety of tasks, delivering results that can be integrated into the user application. These include:

  • Classification - Classification takes an images output and assigns it to a class. It is used in inspection, OCR presence, and detection sorting. Essentially, the software will tell you what that image is.
  • Anomaly Detection – Anomaly detection is a variant of classification. In this case, it’s dedicated fully to finding good and bad, so it’s a binary classifier. Anomaly detection trains only on good samples so that the algorithm learns what a good sample is, and then deduces what bad samples are without more training.
  • Object Detection. This is a super set of classification in which we classify the object in terms of classes, but we also provide the object location, which makes it extremely versatile.
  • Segmentation - In this case, the segmentation algorithm will provide one class per pixel at the output. So, if you group those pixels, you will end up with continuous objects from which you can determine the shape. The shape can then be used for sorting or identification applications.
  • Noise Reduction. This isn’t used too much in machine vision, but it has proven to be extremely useful in medical imaging and it has proven to provide a higher signal-to-noise ratio than traditional noise reduction algorithms.



Artificial intelligence is a technology that will certainly improve a growing number of applications. As software programs emerge to make the most of the data we have, and take advantage of the advances in processing power, we will reap the benefits. AI enables reliable yield, leading to less scrapped material and reduced costs associated with waste. As compared to AI, traditional defect detection is less robust and forced manufacturers to scrap more units to ensure high quality products.