Success Story

$1+ Million Savings per Year with AI-Based Image Anomaly Detection

The client’s objective was to modernize and automate the existing manual processes. They brought Adastra in to find a way to compare images from the current runs with those from past successful runs of that recipe of foam and issue alerts if any deviations were found.


Million savings per year


scrap reduction


report refreshment

About the Client

One of the largest foam manufacturers in North America, specializing in automotive foam, operating more than 30 plants located across several continents.


Adastra adopted an advanced analytics approach to develop a Proof of Concept (POC) in one of the client’s plants.

Success Story



Service Domain:

Background and Challenge Story

Traditionally, manufacturing companies have relied heavily on manual supervision and monitoring of their production lines to ensure quality and detect anomalies. This manual process is costly, time-consuming, and prone to error or delays, which can often result in millions of dollars of losses.

With increasing adoption of technology and advanced analytics solutions, many manufacturers are looking at automating their processes to improve efficiency and operational accuracy. The ‘Factory of the Future’ will use Artificial Intelligence and machine learning tools to monitor production lines – possibly remotely, through the cloud – and allow for preventative remediation of future anomalies before they even occur. This data-driven approach is already making way into leading manufacturing companies today and with Adastra’s extensive expertise, custom-made solutions can be deployed for different types of manufacturers.

This article showcases a recent Proof-of-Concept that was delivered for a foam manufacturing organization in Canada.

One of the large foam manufacturers in Ontario, specializing in automotive foam, was looking to modernize their shop floor, with the aim of creating a ‘Factory of the Future’. The client has 30 plants located across several continents and wanted a Proof of Concept (POC) to automate anomaly detection in their foam manufacturing lines.

Manufacturing and Pre-Pilot Anomaly Detection Process

The client manufactures 120 different recipes of foam, with each using different chemicals and reaction processes. The lines operate under controlled conditions (temperature, pressure, etc.) depending on the conditions and chemicals needed to make a certain kind of foam.

For each line, the liquid chemicals are dispensed from a “pour head”. The reacting liquid forms a “cream line”, when transitioning from a liquid to solid state, and an exothermic reaction causes the foam to expand. The shape and positioning of the cream line could be indicative of future defects in the foam product. Each line has cutters at the end to cut the massive foam slabs into blocks and shape them as needed. A camera is placed over the nozzle or cream line at each production line which takes pictures every 10 seconds. The client stored historical information of past runs in a file server.

The existing monitoring process was manual, and several production engineers and supervisors observed the process via an “eye-test” to detect any striations or issues with the foam. These seasoned engineers relied on their experience to monitor the shape of the cream line for each type of foam and gauge potential anomalies and recalibrated conveyor belt settings to adjust temperature, pressure or other parameters accordingly to make sure the foam being manufactured was perfect.

The client’s objective was to modernize and automate the existing manual processes. They brought Adastra in to find a way to compare images from the current runs with those from past successful runs of that recipe of foam and issue alerts if any deviations were found.

Adastra’s Solution

Adastra adopted an advanced analytics approach to develop a Proof of Concept (POC) in one of the client’s plants. For this POC, Adastra’s team comprised of 1 data scientist, 1 Azure Architect, 2 offshore developers for Azure Architecture and Power BI respectively. The entire POC was executed end-to-end by our team with support from the client’s Operation Technology team.

We used an image segmentation model to determine the position of the cream line, which is the defining line between the liquid pour and the solid expanded foam. Determining the optimal position of this line is key to ensuring production of a consistent and reliable foam.

The cream line varies for each recipe, so we took the images that were taken by the cameras every 10 seconds and developed a way to automatically compare those images with images from successful past runs for that recipe. An acceptable range of variance (tolerance level) was defined, and as long as the position and shape of the cream line fell within that range, the foam produced would be considered defect-free.

As part of the improved process, PLC controllers sent the new images to the file server. The folder was monitored by Azure LogicApps, which triggered the anomaly detection process when a new file appears. Adastra’s team created a machine learning model that runs through Python, which was executed via Azure Functions to analyze the images for anomalies. The team went through all the images and coded an algorithm which determined whether the image and cream line fell within the bounds of the client’s set tolerance limits.

The mathematical model was based on an unsupervised k-means clustering algorithm used to extract pixel coordinates of the cream line locations and calculate the Euclidean distance from the average cream line location. Historical data along with the library of images from the SQL server and telemetry targets stored in a SQL Express database (pressure, temperature, etc.) were used to train the model.

If an anomaly were detected, Azure LogicApps would trigger an alert mechanism and send an alert via email. Both the ‘good’ and ‘problem’ images were stored in the Azure Data Lake. Power BI was used to expose all this information, and the images and telemetry KPIs (flow, temperature, pressure, chemicals, mechanical data, etc.) were presented through an operational dashboard that was refreshed every 10 seconds. Through the real-time image segmentation model, we were able to create a “heads-up” display dashboard, which allowed for improvements and recalibration. The dashboard also showed trends of various KPIs, alerting management when errors were statistically likely to occur.

Instead of constantly monitoring the production lines directly, the production engineers reviewed the anomaly alerts and the dashboard, and if needed, could make changes to the line settings during the live run.

A POC of this scale typically takes about 6 weeks. The solution has not yet been productionalized, and prior to deployment, certain modifications and standardizations are needed at the client’s facilities. Productionalization across all product lines would also require determination of threshold settings for each recipe of foam and clarity on time of transition to a different recipe on a production line.


  • $1+ Million savings per year
  • 2-5% scrap reduction
  • 10-second report refreshment
  • Manpower cost reduction
  • Real-time dashboards and alerts

The automated AI-driven anomaly detection solution developed by Adastra reduced the client’s reliance on production engineers to detect and rectify issues on the foam production lines. Not only can this solution, once productionalized, potentially lower the costs of trained manpower (fewer production engineers needed), but it can also prevent “misses” that sometimes arise due to manual oversight. The alerts issued via LogicApps notified production engineers about possible anomalies early on, and the Power BI dashboard allowed them to view real-time telemetry data and take preventative measures and adjust or recalibrate settings to keep the production line running smoothly, without any issues.

The manufacturing process is complicated and halting the production line due to problems is an expensive, time-consuming undertaking. Adastra’s AI model can quickly learn to catch issues, so that they can be addressed right away, potentially saving tens of thousands of dollars per run. The solution also resulted in an estimated 2-5% reduction in scrap, as it allowed line settings to be changed much faster. Overall, with multiple runs each day, the plant could save upwards of millions of dollars per year.

Upon deployment, this solution will allow the client to manage Edge services from the cloud and analyze data across all 30 plants simultaneously from one place in Azure. By centralizing monitoring, they should be able to eliminate the need for separate production engineers at each plant location and significantly lower overhead costs.

There is scope for future enhancements to this solution once it is productionalized. In addition to the images, a wide array of telemetry data associated with past runs of each foam variant can be reviewed to understand why the anomalies occurred and identify trends. This will enable predictive fixing of the cream line based on trends even before anomalies occur. This will further increase cost savings and reduce production downtime and scrap.

With access to more and more historical data, AI and Machine Learning solutions can be improved over time, increasing their efficiency and impact for the organization. This solution, for instance, was able to significantly reduce the client’s reliance on experienced manpower and consequently, automate the manufacturer’s monitoring and anomaly detection process. Upon productionalization, there will be scope for consolidating the monitoring process for all the client’s plants to one location over the cloud. Automation and adoption of advanced analytics solutions is not only the next logical step for organizations looking to improve quality, and cut down on production costs and wastage, but is also the pathway to creating a factory of the future.

Want to learn more about our AI Services and how we can help you modernize your organization? Book a free consultation today!

Need a similar solution?

. Contact Form (Sidebar)

Share this story

Read More Success Stories

Need a similar solution? Get in touch with us, we can help.