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

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.
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.
| Topic | Rule-based vision | AI (deep learning) vision |
|---|---|---|
| Setup | Configure tools and pass/fail values point by point | Train a model on labelled example images |
| Best for | Fixed positions and clear criteria: presence, dimensions, barcodes | Varying shapes, textures or positions; irregular defects; many models on one line |
| When the site changes | Needs re-tuning if lighting or camera position shifts | More robust if training images cover those conditions |
| What you prepare | A few sample parts | Enough example images, both OK and every type of NG |
| Hardware | Vision sensor or standard smart camera | Smart 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%.
What can AI cameras do in a factory?

| Job | What it does | HIKROBOT case examples |
|---|---|---|
| Object detection and counting | Finds where objects are and how many | Counting 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 |
| Classification | Decides which group an image belongs to, or OK/NG | Wheel hub model recognition · checking gears have been welded · sorting 85 product box types |
| Deep learning OCR | Reads characters whose size, position or shape varies | Laser-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 vary | Phone 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?

- 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?

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:
| Job | Training images | Test images | Result |
|---|---|---|---|
| Laser-marked characters on worn parts with background interference | 440 | 530 | 99.06% read rate, in production |
| Printed codes on medicine boxes, high speed, different lighting per station | 1,158 | 1,650 | 99.94% read rate |
| Characters on phone shells, many models, varying print depth | 483 | 6,352 | 97.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?
| Setup | Best for | Examples from HIKROBOT documents |
|---|---|---|
| Smart camera with deep learning | Single inspection points, easy installation, on-camera processing | Gear weld checks, automotive plastic part OCR, parcel sorting and milk carton shim checks |
| Industrial camera + PC + GPU | Multiple cameras, many classes or heavy models | Wheel hub recognition within 20 ms on GPU · magnetic ring chip detection above 99.5% |
Steps in an AI vision project
- Define the job: what to find, count or sort into how many groups, plus targets for false rejects and escapes.
- Stabilise lighting and camera first. AI does not replace good lighting; clear, consistent images reduce the training images needed.
- Collect images on the real line: good parts and every type of bad part, all models, all lighting conditions.
- Label and train, then test on images not used for training.
- Install and connect: send OK/NG to the PLC for rejection (see vision OK/NG sorting and PLC signals).
- Collect more images and retrain when new models arrive or unseen cases appear.
Real-world examples: figures from HIKROBOT cases

- 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.






