Source-linked AI summary

AI Visual Inspection for Garment Production

Ray Wai Man Kong, Ding Ning, Theodore Ho Tin Kong

arXiv:2608.21426v1cs.CVcs.RO

TL;DR

Garment sewing-line inspection is difficult to perform consistently manually because fatigue and subjective judgment affect defect detection. This study develops and validates a CNN-based AI inspection system trained on black fabric and thread samples. It detected jump sewing-line defects on black, red, and dark green materials, but showed limitations for broken defects and visually different fabrics, underscoring the importance of diverse training data.

  • Problem

    Manual sewing-line inspection is affected by fatigue, subjectivity, and inconsistency, while CNN feature-map application to garment stitch-defect detection remains relatively unexplored.

  • Method

    The study develops and tests a CNN-based AI visual inspection system for garment sewing-line defects using black fabric and black sewing-thread training samples.

  • Results

    The system successfully detected jump sewing-line defects on black, red, and dark green materials, but failed for broken defects and several visually different fabrics.

  • Takeaways & Limitations

    The findings validate the technical viability of AI visual inspection while indicating that broader training data and continued model development are needed for industrial applicability.

  • Takeaways & Limitations

    Training primarily on black fabric limited reliable generalization to light blue, silver, and fluorescent yellow fabrics and to broken sewing-line defects on dark green fabric.

Abstract

from arXiv · show

The garment manufacturing industry is under increasing pressure to improve product quality, reduce costs, and accelerate digital transformation toward Industry 4.0. One of the most challenging quality-control activities is sewing-line inspection, where defects such as broken stitches and skipped stitches are difficult to detect consistently through manual inspection. Human-based inspection is often affected by fatigue, subjective judgement, and inconsistent performance, resulting in defect leakage, rework, and reduced production efficiency. This study presents the development and validation of an Artificial Intelligence (AI)-based visual inspection system for garment sewing-line quality control. The system utilizes Convolutional Neural Networks (CNNs) to detect sewing defects and was initially trained using black fabric and black sewing thread samples. Experimental testing was conducted on black, red, dark green, light blue, silver, and fluorescent yellow fabrics. The results demonstrated successful detection of jump sewing-line defects on black, red, and dark green materials, while performance limitations were observed for broken sewing-line defects and fabrics with significantly different visual characteristics, including light blue, silver, and fluorescent yellow colours. These findings indicate that model accuracy is strongly influenced by the diversity of training data and the ability to generalize across different fabric and thread colours.

1 Adjunct Professor, City University of Hong Kong, Hong Kong

Garment manufacturing is moving toward AI-enabled inspection as manual quality control struggles with rising demands for quality, cost reduction, and digital transformation. CNN-based visual inspection addresses this gap, but generalization across sewing defects and production materials remains limited.

  • The proposed integration of LLMs with CNN-based inspection is intended to improve learning capability, adaptability, and defect recognition across a wider range of garment materials.
  • Manual garment inspection is tedious and physically taxing, leading to inconsistencies and inaccuracies associated with inspector fatigue and stress.
  • Existing defect-detection systems often depend on task-specific expert-crafted features, limiting generalized and adaptable inspection when production conditions change.
  • CNNs have achieved strong performance in computer-vision tasks, but their application to sewing-stitch defect detection in garment manufacturing remains relatively unexplored.
  • The study explores AI-based garment inspection using CNN feature representations from early convolutional layers of a pretrained VGG-16 network to detect broken stitches.
  • AI-powered inspection could support real-time quality monitoring, reduce dependence on manual inspectors, improve defect detection, and shorten production lead times.

II. LITERATURE REVIEW FOR AI INSPECTION

AI inspection research frames visual quality control as a supervised, learning-based alternative to manual and rule-based inspection. CNNs extract visual features, while classification and anomaly-detection methods support defect decisions, although data availability, environmental variation, and explainability remain challenges.

  • AI inspection addresses fatigue, inconsistency, subjective judgment, and scalability limitations associated with traditional inspection methods.
  • Supervised AI inspection learns a mapping from input image or sensor data X to an output label Y representing a defect category or inspection result.
  • CNNs learn hierarchical visual features through convolution operations, enabling automatic detection of edges, shapes, textures, and surface defects without manual feature engineering.
  • Softmax converts network outputs into class probabilities, allowing the system to classify products using the highest predicted probability.
  • Anomaly detection can classify products as defective when reconstruction error exceeds a predefined threshold, especially when defective samples are scarce.
  • AI inspection remains constrained by limited labelled defect data, environmental variation, and the black-box nature of many deep learning models.

III. METHODOLOGY AND PROJECT DEVELOPMENT

The methodology is framed around applied research, intelligent manufacturing principles, and industrial implementation experience. It treats AI deployment as an industrial transformation rather than a purely technical exercise.

  • The research and development approach incorporates applied research philosophy, intelligent manufacturing principles, and industrial implementation experience.
  • AI deployment in manufacturing is presented as an industrial transformation rather than a purely technical exercise.

A. Phase 1: Requirements Gathering and Feasibility Study

Phase 1 begins by analysing manufacturing operations and defining requirements before developing the AI model. The feasibility study evaluates factory constraints and involves relevant industrial stakeholders.

  • The first phase analyses production processes, quality-control procedures, machine capabilities, and business objectives before AI model development.
  • A comprehensive defect taxonomy should cover known garment defects and support requirements definition.
  • Feasibility assessment considers floor space, camera locations, production speed, lighting, network infrastructure, and system integration requirements.
  • Early engagement includes production managers, quality engineers, operators, and information technology personnel.

B. Phase 2: Data Acquisition and Annotation

Phase 2 establishes a broad and reliable image dataset and treats annotation as a critical quality activity. Images should represent acceptable products and defective conditions, with experienced inspectors supporting consistent labelling.

  • Training data should be quantitatively sufficient, high quality, and diverse because CNN effectiveness depends directly on these properties.
  • Image acquisition should cover acceptable garments and a broad range of defective conditions.
  • Experienced quality inspectors should participate in annotation to improve labelling consistency and reliability.
  • Defects should be classified and localised using bounding boxes, segmentation masks, or image-level classification labels.

C. Phase 3: Model Development and Validation

Model development should proceed iteratively, combining transfer learning with repeated training, validation, testing, refinement, and stress testing against difficult production conditions.

  • Model development: Transfer learning with pre-trained CNNs can reduce development time and computational requirements when labelled defect datasets are limited.The approach leverages existing image-recognition capabilities for industrial applications.
  • Model development: Development cycles should include training, validation, testing, and refinement rather than relying on a single modelling pass.
  • Model validation: Evaluation should combine precision, recall, F1-score, false positive rate, false negative rate, and processing speed instead of accuracy alone.Manufacturing assessment must balance defect detection effectiveness with operational efficiency.
  • Model validation: Stress testing should cover wrinkled garments, fabric distortion, overlapping materials, unusual lighting, operator handling variation, and partial defect visibility.These edge cases represent important implementation challenges in production environments.

D. Phase 4: Pilot Deployment

Pilot deployment should run AI inspection alongside manual inspection, using threshold optimization and inspector feedback to validate performance before broader implementation.

  • Pilot operation: Shadow-mode pilot operation enables direct comparison between AI decisions and inspector judgments without introducing production risk.The pilot also helps identify operational challenges under actual factory conditions.
  • Pilot operation: Detection thresholds should be continuously optimized to balance defect sensitivity against false-alarm generation.Excessive false positives can create bottlenecks, while excessive false negatives may compromise product quality.
  • Pilot operation: Inspector feedback on incorrect classifications supplies new training examples for subsequent model improvement.
  • Performance benchmarking: AI and human inspection should be benchmarked on detection accuracy, inspection speed, consistency, labour utilization, and defect escape rates.These comparisons inform business investment and full-scale deployment planning.
  • Deployment transition: Phased rollout incorporates lessons from initial installations into later deployments, reducing operational risk and accelerating organizational learning.
  • Deployment transition: Successful deployment requires workforce training on system operation, recommendation interpretation, exception management, and AI-assisted decision-making.Operators, supervisors, maintenance personnel, and quality engineers are identified as relevant personnel.

B. Technical Architecture of AI Visual Inspection Systems

The proposed inspection architecture combines image acquisition, preprocessing, CNN-based inference, decision control, and data management for automated sewing-line quality control.

  • System architecture: An AI visual inspection system comprises image acquisition, preprocessing, an AI inference engine, decision and control, and data management subsystems.These subsystems cover sensing, image preparation, defect analysis, production-line interaction, and information handling.
  • System architecture: The inspection setup includes a schematic workflow, garment sewing-line samples, computer hardware, and CNN architecture.
  • Experimental system: The experiment used AI inspection to detect broken and jumped sewing lines on fabric pieces.The system was developed specifically to check fabric sewing lines.
  • CNN processing: The CNN transforms irregular sewing lines into a rounded shape through multiple image-analysis layers.

2. Image Acquisition Considerations

Inspection performance depends on suitable image acquisition, CNN processing, and architecture choices matched to the defect-detection task and production environment.

  • Image acquisition: Input-image quality depends on camera resolution, production-matched frame rates, spectral range, and lighting design.At least 5 megapixels is suggested for detailed defects, while 12+ megapixels is suggested for microscopic defects; typical frame rates are 30–60 fps.
  • Hardware configuration: The system configuration uses an NVIDIA GeForce RTX 4060 GPU, 16G bytes of storage, and 31G bytes of shared space to support over 2000 CNN frames.
  • CNN processing: CNN input preserves RGB image structure as a three-dimensional volume defined by width, height, and depth.The passage gives 32 × 32 × 3 as an example configuration.
  • CNN processing: Convolutional filters extract edges, textures, and shapes into feature maps, while pooling reduces spatial dimensions and computational demands.Pooling also reduces memory usage and can help prevent overfitting.
  • Software implementation: TensorFlow supports CNN operations and Matplotlib supports visualization during programming tests.The complete Python code is not shared because of a non-disclosure agreement.
  • Architecture selection: CNNs suit localized defect classification, whereas object-detection networks identify defect locations and types using bounding-box coordinates.Examples include ResNet, EfficientNet, MobileNet, YOLO, Faster R-CNN, and SSD.

4. Practical Implementation Considerations

The system was trained on black fabric and thread, then tested across multiple fabric colors using the same trained model. It detected jump sewing-line defects on black, red, and dark green, but showed limitations for broken lines and substantially different visual conditions.

  • Training and test setup: The model was trained using black fabric and black sewing thread samples before validation across other color conditions.The same trained model was evaluated on red, silver, fluorescent yellow, light blue, and dark green materials.
  • Validation results: Repeated black-material testing consistently identified jump sewing-line defects and produced Pass results.The result indicates reliable skip-stitch detection under the trained condition.
  • Validation results: Red and dark green materials produced Pass results for jump sewing-line defects despite not being the original black training condition.Dark green testing maintained recognition across another dark-colored fabric variation.
  • Validation results: The system failed to recognize a broken sewing-line defect during the first dark green test.The passage attributes this outcome to potentially insufficient training data or unoptimized algorithms for broken-line defects across conditions.
  • Validation results: Jump sewing-line detection failed on light blue, silver, and fluorescent yellow materials, whose visual characteristics differed substantially from the black training samples.The cited explanations identify unrepresented light colors, reflective surfaces, and extreme brightness or saturation as relevant challenges.
  • Practical implication: The current model does not account for all fabric colors, creating a need to train each color of fabric and thread before production.The study links the limitation to the model's restricted color coverage rather than solely to black fabric.

B. Analysis of Results

The AI Inspection System detected jump sewing-line defects across black, red, and dark green fabrics, but performance varied by defect type and material characteristics. Results indicate that broader training data are needed for reliable deployment across production conditions.

  • The model failed to detect broken sewing-line defects on dark green material, indicating a need for additional defect-specific training.
  • Jump sewing-line defects were not correctly identified on light blue, silver, and fluorescent yellow fabrics.These materials suggest that the current training data do not represent the full range of production colour variations.
  • The results suggest sensitivity to fabric and thread colour contrast, image lighting conditions, and colour saturation variations.These factors are identified as potential sources of performance variation in the table summary.
  • Additional training images should cover broader fabric colours, sewing-thread combinations, reflective and fluorescent materials, and more broken sewing-line examples.The recommendation targets improved robustness and inspection reliability across production conditions.
  • Successful detection of jump sewing-line defects on black, red, and dark green fabrics demonstrates limited colour generalisation from black training samples.The model performed well when test materials were visually similar to the original black training dataset.

VI. CONCLUSION

The study demonstrates the practical feasibility and industrial value of CNN-based AI visual inspection for garment sewing lines. Although the system transferred jump-defect recognition across several dark fabrics, broader data and further development remain necessary for reliable performance across materials and defect categories.

  • AI, computer vision, and CNN technologies were shown to be practically feasible for garment sewing-line inspection in manufacturing.
  • The system detected jump sewing-line defects on black, red, and dark green fabrics after training with black fabric and black thread samples.The transfer indicates learning of some structural and geometric defect features beyond colour-specific characteristics.
  • The model failed reliably on light blue, silver, and fluorescent yellow fabrics and did not identify broken sewing-line defects on dark green fabric.These results define the current generalisation boundary.
  • Model performance depends strongly on the representativeness and diversity of training data.The current system was developed primarily with black fabric samples for proof-of-concept validation.
  • AI inspection could support continuous operation, standardized decisions, real-time defect detection, and digital traceability in garment production.These capabilities are linked in the paper to Industry 4.0 and smart manufacturing initiatives.
  • Continuous retraining and data accumulation provide a framework for inspection systems to adapt to changing production requirements and product variations.
  • The results validate the technical viability and industrial value of AI visual inspection, while additional development is required across colours, thread types, and defect categories.
Loading 2608.21426v1…