Swaran Soft
Industry Insights

Computer Vision for Quality Inspection in Manufacturing

November 21, 20267 min readBy Yogesh Huja, Founder & CEO
Computer Vision for Quality Inspection in Manufacturing

If you walk along almost any production line in India you will see teams of staff examining goods for issues such as scuffs, cracks, missing items and incorrect labelling. Often this goes on for many hours and even shifts.

Whilst quality inspectors are highly skilled individuals, there are limitations around human perception. People become tired and therefore less effective at identifying issues over time. Quality is generally poorer on the night shift compared to the day. Furthermore, it can be extremely difficult to establish precisely what and when quality checks were undertaken if a batch is rejected by a customer.

Computer vision overcomes these issues. Using both cameras and artificial intelligence, all items can be analysed continuously at line speed. Checks are then documented. Staff can then focus on analysing challenging items and working to resolve underlying issues – an improved use of staff skills.

What computer vision does

Typically a camera is used to photograph each item. This is analysed in milliseconds by an AI to determine whether it passes, fails or should be referred to a person. Where necessary, it can activate a rejection barrier, display a message on a supervisory screen or log information into a quality management system.

Modern computer vision can check for:

  • Defects – such as scuffs, dents, cracks, discolouration, porosity and burrs and poor surface finish.
  • Completeness and correct positioning of items such as screws, clips, seals and labels.
  • Dimensions, spacing and alignment.
  • Correct printing of batch numbers, expiry dates and barcodes.
  • And sort goods according to quality, colour and/or type.

Best application points

Whilst not all points on a production line are equally suitable for computer vision, the most successful applications tend to be:

  • High throughput.
  • Issues are easily identifiable.
  • There is real financial impact if goods leave with issues (for example via warranty claims, customer fines and/or product recalls).
  • Manual quality checks currently play a key role.
IndustryExample application
AutomotiveCasting surface, fastener and weld inspection
ElectronicsSolder, positioning and PCB inspection
Pharma/FMCG packagingLabel, closure/sealing and print batch/expiry date inspection
TextilesWoven fabric imperfections, colour and fabric roll discolouration
Steel/MetalsCracks, scale and coil/ sheet marking
FoodForeign body, colour and size inspection and filling level

Key elements

Cameras and illumination

Often successes and failures within computer vision projects hinge on this area. No matter how good an AI is, it will be unable to identify issues where the camera has not clearly photographed them. Appropriate illumination is also key. Side lighting aids definition of shape and lines. Diffuse lighting is ideal for reflective items. And directional lighting emphasises scuffs and dents.

Invest time in analysing the optimal lighting solution for your needs. This will save considerable time later in fine-tuning the AI model.

AI model

Most contemporary computer vision utilises ‘deep learning’ AI. Models are trained using good and bad quality images. There are generally two types of model. ‘Supervised’ models require examples of each type of issue to train them. They are a good option if you understand the issues you wish to identify. Alternatively, ‘anomaly detection’ models are trained to recognise good quality goods and then identify deviations. This can be particularly effective in cases where issues are uncommon and/or diverse.

Many plants begin with an anomaly detection model due to the lack of bad quality examples. Supervised models are subsequently added as additional bad quality examples are obtained.

Edge computing

Sending and analysing images to and from a cloud server is impractical given that production lines often operate at hundreds of items per minute. Usually, inference is undertaken at the production line by an ‘edge’ computer – an industrial PC fitted with a graphics card (GPU). As well as enabling rapid inference, this also means that production line images remain within your site; a consideration many manufacturers are keen to maintain for intellectual property and data security purposes.

System integration

Whilst a camera which identifies an issue is a useful tool, it is of little use unless it can also reject problematic goods. Integration with a range of systems (such as PLCs, rejection barriers, MES and quality management) enables issues to be addressed. Furthermore, it allows audit-ready documentation of all quality checks including relevant imagery, which is invaluable for both internal and external enquiries.

Expected benefits

Depending on the goods and production line, benefits will differ. However, well managed computer vision implementations typically provide:

  • Complete item inspection at line speed.
  • Better inter-shift consistency in comparison to manual checks, avoiding the fall-off in effectiveness seen with human assessors.
  • Fewer faulty goods reaching customers – so cutting associated warranty, re-working and customer complaint costs.
  • Audit-ready visual documentation greatly facilitating both issue analysis and customer enquiry resolution.
  • Staff refocused on higher value activities such as process enhancement and assessment of challenging goods.

Within our own manufacturing environment we have seen the value of digitalising quality information. By introducing biometric and GPS geo-fencing for staff quality checks, we enabled our client to be fully assured that quality checks were both authentic and undertaken in the correct geographical location. Computer vision extends this concept by automatically documenting quality assessment.

Real challenges

Consider the following when implementing computer vision:

  • Poor data availability. Issues may be uncommon and so there may be limited images available to train on. Anomaly detection, data enhancement and thorough initial data gathering all contribute to overcoming this.
  • Goods diversity. Products, suppliers and surface finishes can change and cause problems for models trained on historical data. Include re-training in your implementation strategy from the outset.
  • Defining issues. Staff frequently differ in their views on what constitutes an issue. Well defined and preferably illustrated, ‘good quality’ and ‘bad quality’ standards should be established prior to data tagging.
  • Site factors. Dust, motion, temperature and ambient light can all influence image quality. Suitably sealed and lit environments largely resolve these issues.
  • People factors. Staff must trust the computer vision system. Involve them at the implementation stage, demonstrate the system’s outputs and encourage them to tag challenging items.

Implementation stages

We suggest initially piloting computer vision on one production line. Follow the 8 week plan below.

WeeksAction
1–2Decide on a focus for computer vision, together with quality staff, establish quality standards. Undertake a camera and lighting analysis. Begin data gathering.
3–5Tag data, train and test models. Fit an edge computer. Integrate with production line rejection or alert systems.
6–7Test the computer vision system in ‘shadow mode’ alongside staff. Contrast performance. Refine settings.
8Launch computer vision, incorporating system oversight, a re-training schedule and a quality team dashboard.

Shadow mode is essential. It enables precise assessment of where the computer vision system matches and out-performs, and where further development is required, compared to human assessment. Only then should the system begin to exert control over the production line.

Making a business case

Base this around your specific situation. Consider the cost of quality checks (across all shifts), plus expenses incurred due to faulty goods reaching customers (including returns, re-working, fines and lost business) and late-stage waste. Together with the time consumed analysing quality related issues where good data is lacking, even moderate enhancements in these areas generally underpin the business case for piloting computer vision on one line. Following successful implementation on one line, expansion to comparable lines is substantially less costly. Much of the hardware, integration and modelling can then be re-used.

Maintaining security and sovereignty

Often production line images contain sensitive information regarding goods, processes and suppliers. Processing inference at the edge, and training models on on-site or private infrastructure using open source tools, ensures that intellectual property remains within your business. Furthermore, as image volumes increase, this avoids ongoing cloud-based, per-image fees.

In summary

Computer vision is amongst the most applicable and quantifiable forms of AI currently available for shop floor use. Identify one high-impact quality area to target. Ensure good cameras and lighting are in place. Test the system in shadow mode and plan for re-training. Then progress to wider implementation.

Swaran Soft has had 25+ years’ experience in delivering enterprise solutions. Within manufacturing, we have automated quality checks. Our vision and agentic AI solutions are built on open source and operate on-site, so there is no vendor dependency.

Want to talk it through with us? We run a free 45-minute AI Pilot Assessment. Drop a line to info@swaransoft.com, or ring +91 9220-313-650 (India) | +971-50-9292-650 (UAE). You'll find more at www.swaransoft.com

Common head of plant questions

Free 45-minute AI Pilot Assessment

Share this article:
Yogesh Huja — Founder & CEO, Swaran Soft
Yogesh HujaFounder & CEO

AI Architect and Entrepreneur building India's Edge AI ecosystem. 25+ years in enterprise technology. Founder of Swaran Soft, Gignaati, and Copilots.in.

Published: ⏱ 7 min read