Computer vision system for identifying packaging defects

Task

Develop a video-based system for quality control on a production line using AI.

Results

Approximately 98% defect detection accuracy, improving process stability. 2.5× faster inspections through workflow optimization and automated analysis. 25% lower payroll costs as automation reduced labor expenses while maintaining efficiency.

Technical strategy

In collaboration with researchers from Saint Petersburg Electrotechnical University "LETI", we built a system that uses computer vision and machine learning to detect packaging defects.

The system is based on a neural network developed in PyTorch and Ultralytics YOLO for fast and accurate object detection. The interface is implemented using Qt and JavaScript. Components are integrated via a RESTful API, while controller management is implemented in C++ using Rapid STP.

The system is deployed on the production line and ensures high defect detection accuracy.

System components for automated quality inspection

  1. Control unit with vision processing module—control cabinet with computational and I/O modules for product quality control.
  2. Quality inspection cameras—four IP cameras with a bandwidth of approximately 1 Gbps each.
  3. Optical sensor for camera activation—sensor activates cameras with a 24-volt PNP trigger.
  4. Signal transmission interface—transmits signals about the bottle inspection: inspected or not, rejected, or system ready.
  5. Human-machine interface (HMI)—the operator uses the HMI to manage the system, set configurations, and perform regular tasks.

Automated conveyor inspection and rejection system components

  1. Inspection point—аssesses quality and reports defective items.
  2. Rejector unit—directs rejected items to a dead-end conveyor.
  3. Encoder—synchronizes conveyor speeds.
  4. Blockage detector—detects and prevents blockages on the conveyor.
  5. Overflow detector—detects overflow and stops the system.
  6. Dead-end conveyor for rejects—accumulates rejected products.
  7. Siemens PLC S7-1200 controller—manages rejection in real time based on system data.
  8. Previous machine control cabinet—halts production in case of an emergency.
  9. Conveyor control panel—stops sections of the transport system.
  10. HMI—manages the rejection process and diagnoses system performance.
  11. Signal tower—indicates system status with light and sound signals.

System performance and defect detection accuracy

To adapt the system to real production conditions—such as camera failures, lighting degradation, and angle variations—we conducted a series of test shoots that replicated situations on the conveyor line. By adjusting viewing angles and lighting, we fine-tuned the system and achieved the required defect‑detection accuracy without disrupting production.

Each defect is categorized by color: green—within normal limits, amber—above normal but not critical, and red—significantly above normal.

Case studies

AI-driven fleet management platform

Development

  • White label trading app

    Design

  • 24ORM—digital shelf analytics for brands

    Design, Development

  • 24AI—image generation service for marketplaces

    Design

  • Mobile app for Emirates NBD Bank

    Design

  • Website for Apple products reseller

    Design