BACK_TO_LOG
Artificial Intelligence 08 sep 2026

YOLOv8 for Industrial Defect Detection and Counting: A Practical Guide

What YOLOv8 is, which tasks it solves (detection, segmentation, pose), how to train it on images from your own line, how to deploy it at the edge and where it fails. With three real cases of counting and OEE on existing cameras.

YOLOv8 for Industrial Defect Detection and Counting: A Practical Guide
RECURSO DESCARGABLE

Hassle-free automation?

Checklist: 10 Steps to Digitize Your Plant

Avoid costly implementation errors

100% Spam-Free

What YOLOv8 is #

YOLO (You Only Look Once) is a family of object detection models that, unlike two-stage detectors, locate and classify everything in an image in a single pass of the network. That is the reason for its speed and its dominance in real-time video applications. YOLOv8, released by Ultralytics in 2023, is the version most widely deployed in industry thanks to its balance of accuracy, speed and ease of training on custom data.

It comes in five sizes, from nano to extra large. On a plant floor the small and medium ones are used almost always: they run at tens of frames per second on a desktop GPU and are enough for counting, visible-defect detection and presence checks.

Which tasks it solves #

  • Detection: a box around each object with its class. Counting units, detecting missing labels, verifying caps.
  • Segmentation: the exact outline of the object. Measuring areas, detecting stains or burrs.
  • Classification: one label per image. Good or defective, sealed or not.
  • Pose: keypoints. Operator posture in hazard zones, part orientation.
  • Tracking: combined with a tracker, it assigns an identity to each object across frames. That is what makes counting moving objects without duplicates possible.

Training on images from your own line #

  1. Capture from the real camera, in the real position, across shifts and lighting conditions. A model trained on internet photos fails on the floor.
  2. Labeling. A few hundred well-labeled images beat thousands of sloppy ones. Define the classes with the quality team before starting.
  3. Augmentation. Rotations, brightness and scale changes simulate variation the line will have. They do not replace real data for rare cases.
  4. Training and validation. Measure mAP on images the model never saw. More important: measure false positives per shift, which is what makes people switch the system off.
  5. Retraining. Every new product, packaging or lighting change needs new data. Plan for retraining from day one.
Industrial solution

Digitize your Plant with iGromi

Book a 30-min demo and discover how to increase your productivity.

Deploying at the edge #

The model is exported to ONNX or TensorRT and runs at the plant, next to the camera, without sending video to the cloud. For a few cameras a mid-range desktop GPU is enough; for more streams you scale to server GPUs or industrial embedded platforms. What leaves the edge is not video but events: "unit counted", "defect at position 4", which feed OEE, MES or CMMS. We have a hardware guide with a GPU calculator to size it.

Where it fails, and what to do #

  • Lighting. Most "the model stopped working" reports are a fluorescent tube that got replaced. Controlled, diffuse lighting before a bigger model.
  • Occlusion and overlap. Objects covering each other on a conveyor. Solved with camera angle and cross-frame tracking, not detection alone.
  • Biological variability. Fish, fruit, meat: no two are alike. It demands more data and models trained on the real operation.
  • Prototype hardware in production. An Arduino rig or a webcam is fine for a demo and fails after 24 hours on the floor. We explain it in Arduino vs industrial machine vision.

Three real cases on cameras that already existed #

  • PROA: automatic counting with 99.9 percent accuracy validated in operation.
  • INVERMAR: counting moving fish, with partial occlusion and biological variability, on the processing plant's existing IP cameras, no new hardware.
  • COEXCA: real-time OEE and traceability using the existing CCTV network and Siemens PLC, no additional sensors.

All three are documented in real cases. In every one, the model detects and counts; the decision about the line is made by a person. That is how vision connects to the rest of the plant: the event YOLO produces enters the Industrial Second Brain with its machine, batch and shift, and from there OEE, maintenance and agents use it.

Frequently asked questions #

What is YOLO in computer vision?

YOLO (You Only Look Once) is a family of object detection models that locate and classify everything in an image in a single pass of the network, which makes it fast enough for real-time video. YOLOv8 is the Ultralytics release from 2023.

Can YOLOv8 detect defects on a production line?

Yes, if it is trained on images from the actual line, under real lighting and speed conditions, and deployed on edge hardware with a GPU. A few hundred well-labeled images already give useful results for counting and visible-defect detection.

What hardware does YOLOv8 need on a plant floor?

For a few cameras a mid-range desktop GPU or an industrial embedded platform is enough; for more cameras or higher resolution you scale to server GPUs. Export to TensorRT or ONNX to reduce latency.

What are the limits of YOLO in industry?

Lighting changes, occlusion, new products that were not in the dataset and poorly placed cameras. The fix is rarely a bigger model: it is better lighting, better framing and retraining with data from your own line.

KEYWORDS:

#yolov8#yolov8 defect detection#yolo industrial inspection#yolo object detection manufacturing#yolov8 training custom dataset#edge ai vision#ultralytics
Sebastián Carrillo

Sobre el Autor

Lead Hardware Engineer

Sebastián Carrillo

Traduce el código en tornillos apretados. Lidera instalaciones en faena y diseña los gateways industriales de iGromi, resolviendo problemas donde el polvo y la vibración entran en juego.

¿Te resultó útil? Comparte con tu equipo

Ayúdanos a llegar a más ingenieros y gerentes de planta que puedan beneficiarse de este contenido.

ENGINEERING_BULLETIN

Stay Ahead of Industria 4.0

Join 5,000+ managers and experts. Get technical analysis, OEE guides and Edge architectures straight to your inbox. Cero spam.

FREE_DOWNLOAD

The Definitive Productivity Guide

Learn to measure OEE and catch micro-stoppages, with a technical PDF and an interactive checklist.

Looking for an automated solution?