KeySight AI Product Quality Inspection

KeySight: AI Visual Inspection for product quality

KeySight: AI Visual Inspection for product quality

KeySight is an AI-powered visual inspection system developed to identify defective fruit directly on a moving production line. Using computer vision and deep learning, the solution detects individual apples, evaluates their quality, and classifies each one as acceptable or defective. The system is designed for real-time operation on compact NVIDIA Jetson hardware, making it suitable for integration with industrial cameras, conveyor systems, and automated sorting mechanisms.

Category:
AI / ML
Industry:
Food Production / Quality Control
Year:
2025

The Challenge

Fruit quality inspection is often performed manually, making the process dependent on human attention and subjective judgment. Inspectors must evaluate products continuously while they move along a production line, which can lead to inconsistent results, overlooked defects, and production bottlenecks.

A reliable automated solution must detect fruit in motion, distinguish defective products from acceptable ones, and deliver results quickly enough to support real-time sorting. Our initial tests showed that performing detection and quality classification in a single stage did not provide the required precision. A more specialized approach was therefore needed.

Our Solution

We developed a two-stage computer vision pipeline using YOLOv8 and YOLO11. In the first stage, the system detects and locates each apple in the camera image. Once an apple has been identified, the detected image region is passed to a separate binary classification model.

The second-stage model classifies the apple into one of two categories:

  • Good
  • Defective

In addition to detection and classification, the system tracks each apple as it moves along the production line. Every apple is assigned a persistent instance identity, allowing the system to recognize the same product across multiple video frames. This enables the model to inspect an apple several times during its movement and from different visible angles. Instead of making a final decision from a single image, the system combines the current prediction with previous classifications associated with the same tracked apple. Using multiple observations reduces the impact of temporary occlusion, motion blur, lighting changes, or an unfavorable viewing angle. The final quality decision is therefore based on a more complete visual assessment of each individual apple.

Separating object detection from quality classification produced more reliable results than using a single model to perform both tasks simultaneously. It also allowed each part of the system to be optimized independently. The final models were optimized for deployment on NVIDIA Jetson devices. Their compact size enables fast inference close to the production line without requiring images to be transferred to an external cloud service.

Key Features

  • Two-Stage AI Pipeline: Apple detection and quality classification are handled by separate models, improving precision and making the system easier to optimize.
  • Instance Tracking: Each apple is tracked across consecutive video frames and assigned a persistent identity while it moves through the inspection area.
  • Multi-Angle Inspection: The system evaluates the same apple multiple times as its position and visible surface change during movement along the conveyor.
  • Classification History: Predictions from previous frames are retained for each tracked apple and combined with new observations to produce a more reliable final classification.
  • Real-Time Defect Detection: The system identifies defective apples while they are moving through the production line.
  • Binary Quality Classification: Each detected apple is classified as either good or defective according to the trained quality criteria.
  • Edge AI Deployment: The models are lightweight enough to run directly on NVIDIA Jetson hardware installed near the inspection camera.
  • Production-Line Integration: Classification results can be connected to external mechanisms that remove defective products from the conveyor.
  • Flexible Camera Integration: The compact hardware setup can be connected directly to a production-line camera for continuous, real-time inspection.
Fruit defect detection
Fruit defect detection

Technologies

  • YOLOv8
  • YOLO11
  • NVIDIA Jetson
  • Computer Vision
  • Deep Learning
  • Object Tracking
  • Python

How the Inspection Process Works

  • A camera captures images of apples moving along the production line.
  • A YOLO-based detection model locates each apple in the image.
  • The tracking system assigns an identity to every detected apple and follows it across consecutive frames.
  • Each detected apple is passed to the binary classification model.
  • The same apple is evaluated multiple times as new views and angles become visible during movement.
  • New predictions are combined with the previous classification history of that tracked instance.
  • The system produces a final decision indicating whether the apple is good or defective.
  • The result can be sent to a connected sorting or rejection mechanism.
  • Defective apples can then be removed from the production line automatically.

Results

The completed system achieved precision above 90% when identifying defective apples. The two-stage architecture delivered better results than the original single-stage approach by separating apple detection from quality classification. Instance tracking further improved the reliability of the inspection process by allowing each apple to be evaluated across multiple frames.

Rather than relying on one image, the system uses several observations of the same apple from different angles and considers its previous classification results. This provides a more stable final decision and reduces errors caused by poor visibility, motion blur, partial occlusion, or temporary changes in lighting.

The optimized models are small enough to perform fast inference on NVIDIA Jetson hardware. This enables detection, tracking, classification, and decision-making to run directly beside the production line in real time. The solution can be connected to industrial cameras and automated sorting equipment, creating a complete workflow for detecting, evaluating, and removing defective apples before they continue to the next production stage.

Work With Us

Ready to Build Something Exceptional?

From Edge AI inference to production firmware, we turn complex embedded challenges into real, deployable solutions. Let's talk.