Generative Deep Learning for Image Anomaly Detection 

How does Machine Learning really work? Find out how AI can optimise image anomaly detection....

Generative Deep Learning for Image Anomaly Detection 

At Gemmo, we offer AI manufacturing solutions, including object detection, object tracking, and deep learning for image anomaly detection. Gemmo can help you today to set up a fault detection system with computer-vision solutions, which will boost your company’s quality control, performance, and safety.

In this article, we will discuss generative deep learning image anomaly detection, and show you examples in action. Generative Deep Learning is becoming increasingly useful to supply chain companies with the application of image anomaly detection.

Generative Deep Learning & Image Anomaly Detection

What is generative deep learning?

In its simplest form, it means that AI algorithms are created and used to perform repetitive tasks. Over time, these deep learning AI algorithms simultaneously examine varying datasets while processing end solutions.

Essentially, these AI algorithms learn to flag anomalies at the most acute level. The process is not a static technical code, instead, it is a generative deep learning algorithm.

A great example of this is on assembly manufacturing lines. Implementing generative deep learning allows tasks to be performed with near-zero efficiency loss. Generative deep learning can handle even the rarest of anomaly detection cases.

What is anomaly detection?

Anomaly detection can be defined as: ‘Anything that deviates from an established baseline pattern is considered an anomaly.’

For example, an apple might ‘pass’ or ‘fail’ a baseline test based on its appearance. Thus, some things to keep in mind are that challenges of AI-based anomaly detection can include:

  • data,
  • definition,
  • generalisation.

Anomalies within datasets can be rare. Therefore, the AI needs to be fine-tuned. The definition of anomaly needs to be defined so that the right data is being captured.

Another question to ask yourself is: ‘what should the AI do when it encounters situations that it has never seen before?’

Image Anomaly Detection in Action through Deep Learning

Generative Deep Learning for Image Anomaly Detection can be used to improve many various elements of your company. These include:

  • efficiency: productivity levels can be increased with the aid of machine learning algorithms
  • effectiveness: machines do not experience a loss of attention, or the errors that can come with a human workforce,
  • safety:  workplace welfare can be prioritised meaning less risk of accidents or injury for workers,
  • new opportunities: workers can be assigned to more complex and profitable tasks.


Image anomaly detection is proactive instead of reactive.
It’s dynamic. It’s real-time.

Intrinsically, an AI algorithm learns the anomalies from a visual perspective. This is generative deep learning for image anomaly detection in a nutshell.

Most importantly, generative deep learning is an architectural base setup on cameras. Generative deep learning and image anomaly detection are most known and most used in manufacturing production lines.

With the use of image anomaly detection, generative deep learning can quickly detect if a product, such as an apple, is “pass” or “fail” based on its appearance.

manufacturing generative deep learning image anomaly detection apples

Remember – Not Every Anomaly is a Problem 

This is where the generative deep learning part emerges. These AI algorithms come to know which anomalies are important.

They can be trained to alert the system or staff, and even to categorise and sort lower anomaly issues. As we all know very well, not every issue that arises is critical, nor are all issues rated the same level of priority.

Thus, image anomaly detection can classify each anomaly as high impact, low impact, high importance, low importance, etc.

Generative deep learning focuses on the problem that really matters.

Generative Deep Learning Techniques

Among the types of Generative Deep Learning techniques, some of the most frequently utilised include AutoEncoders and Generative Adversarial Networks.

Variational AutoEncoder 

At Gemmo, we use Variational AutoEncoder (VAE). This can be used to detect defects.

A great example of using VAE in generative deep learning image anomaly detection is for bottles or bolts. VAE uses an input image. In regards to the image below, the input image is the groove part of the bottle top, where the lid screws onto the bottle.

From looking at images at the top of the bottle grooves, AI can easily determine which one has a defect. The output image is what each individual bottle looks like. So, when multiple bottles are together on an assembly line, the cameras take a quick snapshot image.

Then, the AI algorithm can easily detect anomalies. After this, it creates a residual image to show the staff where exactly the anomaly is on the bottle.

image anomaly detection - bottle lids

Generative Adversarial Network 

Another type of deep learning technique is Generative Adversarial Network (GAN). GANs can be unsupervised or supervised learning models.

In situations where your company has a lot of data, and it’s uncertain how to process or categorise it all, an unsupervised model is a great starting place. An unsupervised GAN can learn a task and automatically discover patterns or similarities within datasets.

All that is required is that you feed the GAN with input data. It will generate possible outcomes, patterns, or categorisations based on that data in order to show you different end result possibilities.

This is extremely useful when you have input variables, but you are unsure what the output variables should be or what you want them to be yet because it is hard to visualise with the complexities presented from the input data itself.

Thus, GANs construct models from input data to output by extracting and summarising the input data, which then creates an output pattern or categorisation. There are many variations of GANs, and many more actions that they can accomplish.

manufacturing generative deep learning image anomaly detection bent pins

While we only provided two examples here, there are a multitude of different techniques and generative deep learning models and types that can be used in anomaly detection.

Conclusion on Deep Learning for Image Anomaly Detection

We encourage your company to discard static modifications or software that cannot detect all anomalies and issues real-time. Instead, think of ways to implement generative deep learning and image anomaly detection into your company’s manufacturing tasks.

Generative deep learning models can be trained and taught to detect anomalies at the most minute level. Unlike other softwares or coding, generative deep learning is dynamic and uses predictive analysis to detect anomalies. Implement image anomaly detection today to avoid false positives in your quality control processes.

Author: Samantha Sink

Gemmo's noise classification case study with Sonitus