AI Vision Inspection with Deep Learning: How It Works, When to Use It and How Much Data You Need

AI vision inspection camera using deep learning to mark OK and NG parts on a conveyor
Article views 0 views
Quick answer

An AI vision inspection camera is a machine vision system that uses deep learning to learn from example images of good and bad parts instead of hand-written rules, so it copes far better than rule-based vision when shape, position, lighting or texture vary. Factory jobs fall into four types: object detection and counting, classification, character reading (OCR) and defect finding. Use AI when parts look inconsistent, defects have no fixed pattern or several models share one line; when conditions are already clear-cut, rule-based vision is enough. HIKROBOT case examples include steel bar counting at 99.98% accuracy and medicine box code reading at 99.94% from 1,158 training images.

Learns from examplesNo need to code every case
Four core jobsDetect/count · classify · OCR · defects
Signals the PLCAutomatic rejection like any vision system

What is an AI vision inspection camera, and how is it different from standard vision?

An AI vision inspection camera is an industrial camera system that analyses images with a deep learning model. Instead of telling the system where edges are or what colour values to expect, you provide labelled example images showing what is OK, what is NG or which objects to find, and the model learns the patterns itself. Standard rule-based vision instead uses tools such as edge measurement, template matching and pixel counting with fixed thresholds.

TopicRule-based visionAI (deep learning) vision
SetupConfigure tools and pass/fail values point by pointTrain a model on labelled example images
Best forFixed positions and clear criteria: presence, dimensions, barcodesVarying shapes, textures or positions; irregular defects; many models on one line
When the site changesNeeds re-tuning if lighting or camera position shiftsMore robust if training images cover those conditions
What you prepareA few sample partsEnough example images, both OK and every type of NG
HardwareVision sensor or standard smart cameraSmart camera with deep learning, or an industrial PC with a GPU

A HIKROBOT example shows the difference clearly. In an instant noodle fork check, the customer first used feature matching and blob analysis, which required camera position and lighting to stay unchanged. Vibration and lighting changes on site led them to switch to deep learning, which was correct on 2,586 test samples at 99.96%.

Better Code is the official HIKROBOT distributor in Thailand. We supply, install and support machine vision cameras, both rule-based and deep learning, and test with images of your real parts before you decide. See HIKROBOT vision inspection.

What can AI cameras do in a factory?

Four deep learning jobs for AI vision cameras in factories: object detection and counting, classification, OCR and defect finding with segmentation
Four deep learning job types common on production lines (illustration)
JobWhat it doesHIKROBOT case examples
Object detection and countingFinds where objects are and how manyCounting 12 types of steel bar with different cross-sections · checking a fork is in each noodle cup · confirming no medicine boxes remain in the machine at batch changeover
ClassificationDecides which group an image belongs to, or OK/NGWheel hub model recognition · checking gears have been welded · sorting 85 product box types
Deep learning OCRReads characters whose size, position or shape variesLaser-marked characters on worn parts · printed codes on medicine boxes · touching dot-matrix characters
Defect finding (segmentation / image comparison)Marks abnormal areas even when position and size varyPhone camera module defects · impurities in liquid medicine distinguished from bubbles · chipped edges on magnetic rings

If your main goal is finding scratches or surface defects, read defect detection cameras; for reading dates on packaging, see date code OCR inspection cameras.

When should you use an AI camera, and when is it unnecessary?

Choosing rule-based or AI deep learning vision: clear criteria suit rule-based tools, while inconsistent parts or irregular defects suit AI
Four questions to decide whether you need AI
  • Use AI when parts or defects look inconsistent: scratches of varying length and depth, characters that move each time the print head is cleaned, overlapping or occluded objects, or many models and colours on one line.
  • Use AI when rule-based vision has been tried but gives too many false rejects or escapes because site conditions change.
  • AI is unnecessary when criteria are clear-cut, such as cap presence, counting holes in fixed positions, measuring dimensions or reading barcodes and QR codes. Rule-based vision is faster to set up and needs no large image set.
  • Combine both in one system, for example using conventional locating tools to align the image, then deep learning to judge defects or read characters.

How many example images do you need?

Training images and test results from HIKROBOT deep learning cases: 440 training images 99.06%, 1,158 training images 99.94% and 483 training images 97.54%
Training image counts and real test results from HIKROBOT documents

There is no fixed number; it depends on how hard the job is and how varied the parts are. OCR cases in HIKROBOT documents give a sense of scale:

JobTraining imagesTest imagesResult
Laser-marked characters on worn parts with background interference44053099.06% read rate, in production
Printed codes on medicine boxes, high speed, different lighting per station1,1581,65099.94% read rate
Characters on phone shells, many models, varying print depth4836,35297.54%, or 99.61% after removing 132 faintly printed images
  • Too few images make results unstable. In a metal workpiece OCR case, most part types exceeded 95%, but one type with small characters reached only just over 80%; the document notes that few training images caused large fluctuation.
  • Images must cover site conditions: day and night, different lighting, part colours and sizes, as in an outdoor pallet counting case.
  • Print quality matters. Prints too faint for a person to read are a print quality inspection problem, not an OCR problem.
  • Some jobs add new groups with a handful of images. In an 85-type box classification case, 52 types were trained with 5 registration images each, and 3,000 test images were 98.6% correct; the wheel hub case adds new models without full retraining.

Which hardware: smart camera or PC with a GPU?

SetupBest forExamples from HIKROBOT documents
Smart camera with deep learningSingle inspection points, easy installation, on-camera processingGear weld checks, automotive plastic part OCR, parcel sorting and milk carton shim checks
Industrial camera + PC + GPUMultiple cameras, many classes or heavy modelsWheel hub recognition within 20 ms on GPU · magnetic ring chip detection above 99.5%

Steps in an AI vision project

  1. Define the job: what to find, count or sort into how many groups, plus targets for false rejects and escapes.
  2. Stabilise lighting and camera first. AI does not replace good lighting; clear, consistent images reduce the training images needed.
  3. Collect images on the real line: good parts and every type of bad part, all models, all lighting conditions.
  4. Label and train, then test on images not used for training.
  5. Install and connect: send OK/NG to the PLC for rejection (see vision OK/NG sorting and PLC signals).
  6. Collect more images and retrain when new models arrive or unseen cases appear.

Real-world examples: figures from HIKROBOT cases

Figures from HIKROBOT deep learning cases: steel bar counting 99.98%, pallet counting 99.92%, medicine box codes 99.94%, 85 box types 98.6%, camera module defects 99.73-100% and magnetic rings above 99.5%
Data from HIKROBOT Deep Learning Application Case Set (2021)
  • Steel bar counting: 12 bar types with different cross-sections and bonding, 99.98% correct, 0.02% missed
  • Pallet counting and code binding: images fused from 18 code reading cameras outdoors under changing light, 99.92% correct (proof-of-concept stage)
  • Medicine box codes: 1,158 training and 1,650 test images, 99.94% read rate
  • 85 product box types: 3,000 test images, 98.6% correct
  • Phone camera module defects: 99.73–100% correct by side and good/bad
  • Magnetic ring chipped edges: above 99.5% with an industrial camera and GPU PC

Every project should agree on criteria for good parts rejected (false rejects) and bad parts missed (escapes) before starting. The medicine box clearance case reported 0.85% false rejects and 2.14% misses in testing.

Summary

AI vision inspection cameras use deep learning to learn from example images and suit jobs where parts, defects or characters look inconsistent. They handle four core jobs: detection and counting, classification, character reading and defect finding. Accuracy depends on the quality and coverage of training images, while clear-cut jobs remain better value with rule-based vision. Better Code, the official HIKROBOT distributor in Thailand, assesses whether your job needs AI, tests with images of your real parts, installs and provides after-sales support.

Frequently asked questions about AI vision inspection cameras

What is an AI vision inspection camera?

It is a machine vision camera that uses deep learning to learn from labelled example images, then detects, counts, classifies, reads characters or finds defects without rule-by-rule setup. It suits parts whose appearance, position or lighting varies.

How does an AI camera differ from standard machine vision?

Standard vision uses configured tools and thresholds such as edge measurement and template matching, ideal for clear criteria. AI cameras learn from example images and handle irregular shapes or defects better, but need more example images and may need more powerful hardware.

How many example images are needed?

It depends on the job. In HIKROBOT OCR cases, 440 to 1,158 training images gave read rates of 99.06% to 99.94%, and some classification jobs add new groups with 5 registration images each. Most important is covering every model, every NG type and every lighting condition.

Does an AI camera need a computer?

Not always. Smart cameras with deep learning process on the camera and suit single inspection points. Multi-camera setups or heavy models use industrial cameras with an industrial PC and GPU.

Can AI cameras keep up with high-speed lines?

Yes, depending on model size and hardware. In HIKROBOT cases, wheel hub recognition on GPU took within 20 ms, and deep learning OCR on milk cartons ran at 7 pieces per second on a filling line. Always test at real line speed before installation.

Which jobs do not need AI?

Jobs with clear criteria and fixed positions, such as checking a cap or part is present, measuring dimensions, counting holes in fixed places or reading barcodes and QR codes. Rule-based vision is faster to set up and needs no large image set.

Where can I buy HIKROBOT AI vision cameras in Thailand?

Contact Better Code (Better Code Co., Ltd.), the official HIKROBOT distributor in Thailand, via LINE @bettercode or +66 2-170-9611. The team assesses your job, tests with images of your real parts, selects camera, lighting and hardware, and handles installation and after-sales support.

Sources

  • HIKROBOT – Deep Learning Application Case Set (2021): object detection, classification, character recognition and defect detection cases, including training/test image counts, accuracy and hardware used
  • HIKROBOT – Introduction to Machine Vision: vision system components and inspection, gauging, guidance and identification applications

Not sure whether your job needs AI?

Send photos of OK and NG parts and tell us what you need to inspect. The Better Code team will assess whether rule-based or deep learning vision fits, and test HIKROBOT cameras with images of your real parts.

Related articles