Starting a Deep Learning Project in Manufacturing – Part 1: Planning

brain with network connections over boxes-large

Many manufacturing companies turn to deep learning to supplement their existing inspection systems or when rules-based algorithms fall short. For example, when a product itself or the number of potential defects in a part varies significantly from one piece to the next, a system can struggle to programmatically define parts as good or bad. 

Deep learning can help in such scenarios, but successful implementation and eventual results are dependent on taking the necessary steps up front. Typically, deep learning projects involve four steps: planning, data collection and ground truth labeling, optimization, and factory acceptance testing. Here we look at what goes into step 1, the planning phase.

Gather a Team, Identify Goals

If a company decides to implement a deep learning solution, it must put together a team of different stakeholders to look at the current process, define new goals, and determine whether deep learning can help achieve these goals. This team should be comprised of factory management, automation, QA, and a system integrator/machine builder. Goals must be well-defined, consistent, and mutually agreed upon by everyone on the team. They might include reducing defective/unacceptable product escapes (underkill), controlling costs by reducing scrap (overkill) or defective/unacceptable products or parts, or providing additional defect classification capabilities beyond a good-versus-bad determination.

If the collaborative team decides to move forward, one step involves identifying a “lighthouse” project that can be used to justify the expenditure of resources to management. This project should not involve unrealistic goals. It should be a project that is not too easy or too difficult, and one that can produce solid returns to let management know that future deep learning deployments may be viable.

Picking a Project, Moving Forward

For some manufacturers, an existing machine vision solution might have produced too many false negatives or false positives, or the system might have stopped working well due to too many product variations or environmental changes. In automotive electronics inspection, for instance, terminal spot welding applications can present problems for rules-based systems.

Terminal spot welding produces a wide variety of weld types — including hairpin, wire-to-pad, and wire-to-wire — and these create a slightly variable 3D metal projection with reflective surfaces. When a machine vision system captures terminal spot weld images, they often contain reflections, shadows, colored regions, and surface texture, even with optimal parts. These effects are often similar to actual defects, such as cracks, scratches, burns, and excessive or missing welds. These natural variations create problems in traditional machine vision systems due to their inability to reliably inspect welds and distinguish good parts from bad.

Three images of good spot welds

Spot welds showing natural variation receive a correct “good” grading from deep learning software

Spot weld with pitting, undersized spot weld, oversized spot weld

Spot welds showing pitting, undersized, and oversized defects receive a correct “bad” grading from deep learning software

Deep learning-based inspection systems are trained on datasets that are evaluated and labeled by internal experts. This helps the software distinguish between good and bad parts and even identify the type of problem in a defective product. With such capabilities, deep learning software provides a viable alternative to manual inspection and electrical testing, and steps in where rules-based algorithms cannot perform.

In part 2 of this blog series, we will look at data collection and ground truth.

More Posts on


Join MyCognex


Cognex representatives are available worldwide to support your vision and industrial barcode reading needs.

Contact Us