Cloud-Edge Collaborative Defect Detection Based on Efficient Yolo Networks and Incremental Learning

Zhenwu Lei, Yue Zhang, Jing Wang, Meng Zhou2024

TL;DR

This paper introduces SGRS-YoloV5n, a lightweight yet accurate defect detection model for resource-constrained edge devices, integrated into a cloud-edge collaborative system. This approach enhances detection accuracy and efficiency by leveraging both edge and cloud processing, while an incremental learning mechanism allows the system to adapt to new defect types without full retraining.

What Problem Does This Paper Address?

In modern manufacturing, especially in electronics, ensuring product quality through defect detection is paramount. Traditional manual inspection is slow and error-prone. While deep learning, particularly YOLO models, offers high accuracy and speed, deploying these powerful models on resource-limited edge devices (like those on a factory floor) is challenging due to computational and storage constraints. Lightweight models often sacrifice accuracy for efficiency. Furthermore, relying solely on edge devices might miss complex defects, while relying solely on the cloud introduces latency and bandwidth issues. This paper tackles the challenge of achieving both high accuracy and real-time defect detection on edge devices, while also addressing the need for adaptability to new, unseen defect types.

Methods

The core of this work is the development of a novel lightweight YOLOv5 model, dubbed SGRS-YoloV5n. This model incorporates several efficiency-enhancing modules:

  • GhostConv and C3Ghost: These modules reduce computational load and parameter count by generating "ghost" feature maps from a smaller set of initial feature maps, improving feature extraction efficiency.
  • SCDown: This module reduces channel dimensions using 1x1 convolutions and 3x3 depthwise convolutions, preserving detailed features during downsampling.
  • RepNCSPELAN4: This module combines concepts from CSPNet and ELAN for improved feature fusion and multi-scale feature extraction.
  • ScalSeq: This module ensures comprehensive and consistent feature representations through multi-scale fusion and attention mechanisms, enhancing important features and suppressing irrelevant ones.

To further boost performance and address the limitations of edge-only or cloud-only approaches, a cloud-edge collaborative defect detection system is proposed. This system works as follows:

  1. Edge Devices (Raspberry Pi A): Perform initial, rapid defect detection using the SGRS-YoloV5n model. High-confidence detections are processed locally.
  2. Edge Devices (Raspberry Pi B): Low-confidence samples from Pi A are sent to Pi B for further analysis, potentially using more advanced small-target detection techniques.
  3. Cloud Server: Uncertain or critical samples from Pi B are sent to the cloud for a final, high-precision inspection using a more powerful model (e.g., Faster R-CNN).
  4. Edge Device (Raspberry Pi C): Receives sorting signals from the cloud to manage the physical sorting of defective components.

Crucially, an incremental learning mechanism is integrated. This allows the model to adapt to new, previously unseen defect categories without requiring a complete retraining of the entire model. It involves:

  • Feature Extraction and Similarity Calculation: New defect features are extracted and compared to a library of known defect features using cosine similarity. Samples with low similarity are flagged as new categories.
  • Fine-Tuning Strategy: When new defect categories are identified, the model is fine-tuned by selectively updating only the later layers, preserving knowledge of existing categories while learning new ones. This includes a "forgetting" mechanism to mitigate knowledge conflict.

Datasets

The paper utilizes a public synthetic PCB dataset from the Open Laboratory for Intelligent Robotics at Peking University. This dataset initially contained 1386 images with 6 defect types (Missing-hole, Mouse-bite, Open-circuit, Short, Spur, and Spurious-copper). The dataset was expanded to 6237 images through augmentation (brightness, contrast, rotation, flipping) and balanced to a 1:1:1:1:1:1 ratio for defect types. For the incremental learning experiments, an additional defect type, "Pad-damage," was introduced.

Key Insights and Ideas

  • Modular Efficiency: The combination of GhostConv, C3Ghost, SCDown, RepNCSPELAN4, and ScalSeq modules effectively balances model size, computational load, and feature extraction capability, making it suitable for edge deployment.
  • Synergistic Cloud-Edge Collaboration: The tiered approach of initial edge detection, followed by cloud-based refinement for uncertain cases, significantly improves overall accuracy and real-time performance by leveraging the strengths of both environments.
  • Adaptive Learning: The incremental learning mechanism is a critical innovation, enabling the system to evolve and adapt to new defect types in dynamic production environments without the prohibitive cost of full model retraining. This is crucial for long-term system viability.
  • Selective Forgetting: The proposed fine-tuning strategy for incremental learning addresses the challenge of knowledge conflict between old and new defect categories, ensuring that the model doesn't "forget" previously learned information while acquiring new knowledge.

Key Results

  • The SGRS-YoloV5n model achieved a high mAP of 0.935 with only 2.7 GFLOPS and a size of 2.2 MB, outperforming other YoloV5 variants in terms of size and computational cost.
  • In the cloud-edge collaborative system, the edge devices (Raspberry Pi A) achieved a detection confidence score greater than 0.6 for most defective samples, demonstrating efficient initial screening.
  • The incremental learning experiment showed that the proposed method could adapt to a new defect category ("Pad-damage") with an [email protected] of 0.338 after simple training, validating its effectiveness in handling new defect types.
  • Confusion matrix analysis indicated that SGRS-YoloV5n, while slightly less accurate in some categories compared to Yolov5n, maintained acceptable performance for resource-constrained real-time detection.

Limitations and Future Work

  • Accuracy Trade-offs: While SGRS-YoloV5n achieves good performance, the paper notes that in some categories, its accuracy and miss rate are slightly lower than the base Yolov5n model. The incremental learning approach also requires further optimization to perfectly balance the detection capabilities of new and old categories.
  • Dynamic Environments: The authors suggest that future research could explore more sophisticated incremental learning techniques to further enhance the system's adaptability to even more dynamic and complex industrial environments.
  • Model Optimization: Further optimization of the model structure and the collaborative framework could be explored to address even more complex industrial inspection tasks.

Summary updated

BibTeX
@misc{lei2024cloud,
  author = {Zhenwu Lei and Yue Zhang and Jing Wang and Meng Zhou},
  title = {{Cloud-Edge Collaborative Defect Detection Based on Efficient Yolo Networks and Incremental Learning}},
  year = {2024},
  doi = {10.3390/s24185921},
}

Loading related content...

Figure