A computer vision system for recognition and defect detection for reusable containers

Vincent Wahyudi, Cedric C. Ziegler, Matthias Frieß, Stefan Schramm, Congyan Lang, Lars Eberhardt, Fabian Freund, Alexander Dobhan, Martin StorathMachine 2025 · DOI

TL;DR

Researchers have developed an end-to-end computer vision system to automate the sorting and quality control of Small Load Carriers (SLCs)—the ubiquitous plastic crates used in industrial logistics. By combining a custom-built, cost-effective camera portal with state-of-the-art deep learning models, the system achieves 100% accuracy in identifying container types and provides a robust baseline for detecting structural defects like cracks and surface contamination.

What Problem Does This Paper Address?

In modern manufacturing, millions of reusable plastic containers (SLCs) circulate through supply chains. Before being reused, they must be cleaned and inspected for damage—such as cracks, broken edges, or leftover adhesive residue—that could compromise automated handling systems or damage goods.

Currently, this inspection is largely a manual process. Human operators must identify the specific container type (out of dozens of variations) and judge its condition. This is not only unscalable but also highly subjective and prone to "fatigue errors." While computer vision has excelled in controlled benchmarks, real-world industrial environments present challenges like reflective surfaces, varying lighting, and the fact that even "normal" used containers are rarely in pristine condition.

Methods

The authors propose a two-stage automated pipeline:

  1. Hardware (The Camera Portal): A modular frame equipped with five industrial RGB cameras (four side views and one top view) and diffused LED lighting to minimize shadows and reflections.
  2. Classification: They fine-tuned a ConvNeXt model—a modern evolution of the ResNet architecture that incorporates design elements from Vision Transformers—to identify the specific SLC type.
  3. Anomaly Detection (AD): Since defects are rare and unpredictable, the authors treated quality control as an "unsupervised anomaly detection" problem. They evaluated eight state-of-the-art models from the Anomalib library, focusing on PatchCore (which uses a memory bank of "normal" features) and DRAEM (which learns to reconstruct images from simulated defects).
  4. Preprocessing: They utilized $U^2$-Net for background removal to ensure the models focused strictly on the container surfaces rather than the conveyor system.

Datasets

The study introduced a substantial new industrial dataset:

  • Total Images: 17,530 images across 34 different SLC types.
  • Annotations: Labeled for both container type and defect status (OK/NOK).
  • Public Contribution: A subset of 9,260 images covering 18 SLC types has been made publicly available on Hugging Face to encourage further research in industrial anomaly detection.

Key Insights and Ideas

  • Classification is "Solved": Achieving 100% accuracy with ConvNeXt suggests that identifying standardized industrial objects is a mature task, even with limited training data.
  • The "Used" Baseline Challenge: Unlike standard benchmarks (like MVTec AD) where "normal" objects are perfect, real-world SLCs are "dirty" by nature. Normal containers often have minor scuffs or water spots from washing. This makes distinguishing a "normal used" crate from a "defective" one significantly harder for AI.
  • PatchCore vs. DRAEM: PatchCore proved more effective at localizing structural defects (like cracks) because it compares local image patches against a "gold standard" memory bank. DRAEM, while good at surface anomalies like dirt, struggled with structural breakage.
  • Background Matters: Interestingly, the authors found that models often performed better without the $U^2$-Net background removal, suggesting that the contrast between the crate and the conveyor might actually provide helpful spatial context for the models.

Key Results

  • Type Recognition: 100% accuracy using the ConvNeXt model.
  • Defect Detection (AUROC): The best-performing model was PatchCore, achieving an Area Under the Receiver Operating Characteristic (AUROC) of 0.811.
  • Secondary Performer: DRAEM followed with an AUROC of 0.748.
  • Inference Speed: On a consumer-grade GPU (RTX 3090), the system can process a 5-image set in roughly 0.10 seconds, making it more than fast enough for high-speed industrial conveyor lines.

Limitations and Future Work

While the system is a major step forward, the authors highlight several areas for improvement:

  • The AUROC Gap: An AUROC of 0.811 is respectable but not yet high enough for fully "lights-out" automation without some human oversight.
  • Hardware Constraints: High-performance models like PatchCore require significant VRAM, which can be a bottleneck for deployment on low-cost edge computing devices.
  • Multi-View Fusion: Currently, the system evaluates five images independently. Future work could involve "image stacking" or 3D reconstruction to allow the model to understand the container as a single holistic object, potentially reducing false positives.
  • Granular Labeling: The current dataset only labels images as OK/NOK. Adding pixel-level masks for defects during training could significantly boost the performance of supervised or semi-supervised models.

Summary updated

Abstract

Abstract Small load carriers (SLCs) are standardized reusable containers used to transport and protect customer goods in many manufacturers. Throughout the life cycle of the SLCs, they will be collected, manually checked for defects (wear, cracks, and residue on the surface), and cleaned by specialized logistic companies. Human operators in small to medium-sized companies manually evaluate the defects due to the variety and degree of possible defects and varying customer needs. This manual evaluation is not scalable and prone to errors. This work aims to fill this gap by proposing a computer vision system that can recognize the SLC type for inventory management and perform defect detection automatically. First, we develop a camera portal, consisting of standard components, that capture the relevant surfaces of the SLC. A labeled dataset of 17,530 images of 34 different SLCs with their defect status was recorded using this camera portal. We trained a classification model (ConvNeXt) using our dataset to predict the different types of SLCs achieving 100% class prediction accuracy. For defect detection, we explore eight state-of-the-art (SOTA) anomaly detection models that achieved high rankings in the MVTec industrial anomaly detection benchmark. These models are trained using default hyperparameters and the two highest-scoring models were chosen and fine-tuned. The best-fine-tuned models based on “Area under the Receiver Operating Characteristic Curve (AUROC)” are PatchCore (0.811) and DRAEM (0.748). These results indicate that there is still potential for improvement in the automation of defect detection of SLCs.
BibTeX
@inproceedings{wahyudi2025computer,
  author = {Vincent Wahyudi and Cedric C. Ziegler and Matthias Frieß and Stefan Schramm and Congyan Lang and Lars Eberhardt and Fabian Freund and Alexander Dobhan and Martin Storath},
  title = {{A computer vision system for recognition and defect detection for reusable containers}},
  booktitle = {Machine},
  year = {2025},
  doi = {10.1007/s00138-024-01636-x},
}
Figure