Enhancing Quality Control for Manufacturing: Implementing Edge Intelligence

NVIDIA EGX hardware (Source: NVIDIA)

Embedded Computing has been the foundational technology driving innovation and transformation in applications across diverse industries.

Small-board computers, for years, have been instrumental in exciting educational projects, domestic automation, and security surveillance systems. I recently had to configure the NVIDIA Jetson Nano Xavier from scratch, a compact, yet powerful small board computer engineered to facilitate the development of an edge inferencing application and complete the story from Part 1 of this series. This involved playing with a wide range of architectures Ubuntu 22.04.4 LTS (Jammy Jellyfish), JetPack 5.1.2 includes Jetson Linux with bootloader, Linux kernel, Ubuntu desktop environment, and a complete set of libraries for acceleration of GPU computing, multimedia, graphics, and computer vision. The most important caveat here is that though this module comes with production-grade GPU power, it contains only 16 GB eMMC 5.1 of memory, which means you have a few options to install anything. So procuring one with an internal SSD is crucial to boot from the SSD storage and that’s the trick. Leave alone another few days to figure out the compatibility of Pytorch libraries and Jetpack versions. Take on the challenge and I hope you will crush it!

In the ever-evolving landscape of artificial intelligence and edge computing, NVIDIA’s Jetson platform has emerged as a game-changer, empowering developers to harness the power of AI in real-time inferencing applications. With its compact form factor and exceptional processing capabilities, NVIDIA Jetson has found widespread adoption across industries, from robotics and autonomous vehicles to healthcare and manufacturing. In the newer world of Embedded Computing, IoT embedded edge nodes like the NVIDIA Jetson platform are revolutionizing businesses by automating processes, improving data analysis, and enhancing process efficiency.

In this article, we’ll explore how to configure a Jetson Nano to carry real-time inferencing using Jetson Nano using a computer vision model trained inside Snowpark Container. A simple approach was adopted to “pull” the model from the Snowflake stage. For a production-ready pipeline always adopt edge runtime services from leading providers. With a deep learning model trained in Snowflake, this can be approached in a scalable and efficient manner by deploying the deep learning visual inspection solutions to edge devices on the factory infrastructure to communicate with cameras, apply models to images, and make predictions to inform real-time decision making on the factory floor.

We also recently see the trend in the newer world of Embedded Computing revolutionizing businesses with generative AI at the edge emerging as a winning differentiator to carry application-specific AI workflows using autonomous machines and embedded applications. The best example of a AIoT embedded edge node such as NVIDIA Fleet Command enables AI applications at the edge to be fully operational in minutes, rather than what used to be weeks decades ago. These can provision new devices takes mere minutes, deploying new configurations requires just a few clicks, and administrators of any expertise level can effortlessly manage and monitor their entire edge fleet.

Along with the NVIDIA DeepStream SDK, a streaming analytics toolkit for multisensor processing, video, audio, and image understanding now creating stream processing pipelines that incorporate neural networks and other complex processing tasks such as tracking, video encoding/decoding, and video rendering can be done very easily.

At a minimal the different parts of an end-to-end quality control using computer vision system architecture include:

  • High-end camera and hardware setup for streaming
  • Edge Device connected to an IoT Gateway
  • A trained Deep Learning Model
  • Cloud-based Analytics Service

In Part 1 of this series, we saw how Snowflake can be leveraged to complete the last 2 items in the above list.

Optimization

The integration of cameras with edge inferencing software for real-time monitoring of production line activities that effectively captures and analyzes the data in a real-world manufacturing environment is interesting. It is a candidate for not only a separate post but for someone with hardware skills as well. Examining the impacts of the inference engine software on inference accuracy and performance, using real-edge applications, datasets, and a trained neural network model is also crucial.

Many methods and technologies have been devised to facilitate efficient deep learning inference on edge devices with limited resources. These involve the creation of energy-efficient, high-performance SoC chips tailored for deep learning inference and leveraging CUDA and GPU. Further, model compression techniques like quantization and pruning of deep learning models for devices with limited resources have been developed. Additionally, the design of lightweight models with fewer weights and parameters, such as MobileNets and YOLO, has been introduced for use in edge computing environments. Another approach is to take advantage of the several deep learning compilers such as TVM, TensorFlow, TensorRT, and TensorFlow Lite that have been developed to address in case of specialized accelerator performance issues. It optimizes the inference and provides a runtime that delivers low latency and high throughput for deep learning inference applications.

For example, TRT builder can apply various optimization parameters, batch size, mixed precision, and many more, to build an optimized inference engine specific to the infrastructure.

Once inference happens at the edge, the output can be written back to the Cloud using IoT Gateways, bus connectors, microservices, or other embedding application services.

A benchmarking exercise may be needed in a real-world production setting with the Industrial grade edge device to evaluate performance metrics such as FPS, throughput, latency, and hardware-related metrics like GPU and RAM utilization. In this toy implementation that was built to demonstrate the end-to-end architecture seen in Part 1, we achieved 94.6% mAp, 92.2% F-score, and 82FPS on Jetson Nano Xavier.

Figure 1: Closing the loop of Defect Detection with Defect documentation and prediction in Snowflake

The end-to-end application architecture contains components that we discussed earlier encompassed in one module called Edge Device.

Drift Detection and feedback loops were built to keep the model up to date, with human expertise providing crucial guidance.

We then constructed a monitoring dashboard with alert notifications, enabling near real-time tracking of key metrics and defect exploration. This setup facilitates root-cause analysis using process data and derived vision results, a process often known as Defect Documentation. It paves the way to support planned maintenance by examining the correlation between factors such as production line machine parameters, worker proficiency, and environmental conditions.

Business resources such as consumables, labor, and production capacities are wasted, leading to revenue losses when a defective product is produced. When the defective finished product reaches the customer, the impact is severe. Beyond customer complaints and further revenue loss, it can result in a hard-to-recover reputation hit. Defect prediction which is nothing but given a set of environmental conditions predicting the likelihood that a defective product will be produced or not should be the next step in this case. It is easy to extend on top of the data gathered so far to build a deep-learning model to achieve this task and thus identify faulty components and aid in their separation before production commences, effectively mitigating these issues.

Conclusion

Implementing automated quality control processes can enhance yield, and process efficiencies, and guarantee that businesses never deliver flawed products to customers. Overall, a vision-based quality control solution can save significant time compared to manual inspection but also facilitate root-cause analytics and the formulation of countermeasures, assisting teams in effectively managing the entire process life cycle and achieving zero defects at scale more efficiently.

We have thus achieved an edge inferencing solution that can deliver real-time, low-latency inferencing capabilities directly at the edge, enabling manufacturers to carry quality control efficiently and improve production rates.

Keep innovating!

--

--