Publication Note
This article is Part 1 of AI-Innovate’s publication of the review paper ‘Evolution of AI-Based Fabric Defect Detection: From Classical Vision to Foundation Models’. The manuscript has been divided into multiple articles solely to improve readability on the AI‑Innovate website. Apart from this publication note, article navigation, and editorial transitions, the research content remains unchanged.
Evolution of AI-Based Fabric Defect Detection: From Manual Inspection to Feature-Based AI
Executive Summary
Ensuring consistent fabric quality is one of the most critical challenges in modern textile manufacturing. Surface defects such as broken yarns, holes, stains, weaving faults, and color inconsistencies directly influence product quality, customer satisfaction, and manufacturing costs. Traditionally, defect inspection has relied on skilled human operators. However, manual inspection is inherently limited by operator fatigue, subjective judgment, and the increasing production speeds of modern textile factories. As a result, many defects remain undetected, leading to unnecessary waste, customer complaints, and reduced production efficiency.
The rapid advancement of computer vision and artificial intelligence has transformed automated fabric inspection into one of the most active research areas in industrial quality control. While early machine vision systems relied on handcrafted image processing techniques, recent years have witnessed a transition toward deep learning-based anomaly detection methods capable of learning complex visual representations directly from data. Nevertheless, practical deployment remains challenging because defective samples are naturally scarce, highly diverse, and expensive to annotate. Consequently, most modern research has shifted from supervised classification toward unsupervised one-class learning, where models are trained exclusively on defect-free samples and identify anomalies as deviations from learned normality.
This paper presents a comprehensive review of the major technological developments that have shaped modern AI-based fabric defect detection. Rather than discussing individual research papers in isolation, it follows the evolution of the field, illustrating how each generation of methods emerged to overcome the limitations of its predecessors. The discussion begins with feature-based embedding methods, followed by teacher–student learning and reverse distillation frameworks. It then examines anomaly synthesis strategies designed to compensate for limited defect data, frequency-domain approaches that exploit the periodic structure of textiles, and several complementary methods developed for specialized industrial scenarios.
Beyond summarizing existing techniques, this paper analyzes their practical advantages, limitations, computational requirements, and suitability for real-world manufacturing environments. The overall evolution reveals a clear trend: industrial anomaly detection is progressively moving toward systems that combine robust visual representations, efficient learning from normal data, rapid deployment, and real-time performance. Although substantial progress has been achieved, reliable detection of extremely subtle defects, complex textile patterns, and previously unseen anomalies remains an open challenge, motivating the next generation of intelligent inspection systems.
1. Introduction
For decades, quality inspection has been one of the most critical stages in textile manufacturing. Regardless of how advanced the spinning, weaving, or dyeing processes become, the commercial value of a fabric ultimately depends on the quality of its visible surface. Even a single defect, such as a broken yarn, a hole, a stain, or a weaving irregularity, can downgrade an otherwise premium product or render it unsuitable for sale. Consequently, reliable defect detection is not merely a quality assurance task; it directly influences manufacturing cost, production efficiency, customer satisfaction, and brand reputation.
Traditionally, this responsibility has rested entirely on experienced human inspectors. Positioned alongside high-speed production lines, operators continuously examine moving fabrics in search of visual imperfections. While experienced inspectors possess remarkable expertise, manual inspection is inherently constrained by human limitations. Fatigue, distraction, inconsistent judgment, and the repetitive nature of the task inevitably reduce detection accuracy over time. These challenges become even more pronounced as modern production lines continue to increase in speed, making it increasingly difficult for operators to identify small or low-contrast defects before they leave the factory.
The need for greater consistency and higher throughput naturally led to the adoption of computer vision systems. Early automated inspection methods relied on handcrafted image processing algorithms that measured properties such as brightness, edges, textures, or frequency characteristics to identify abnormal regions. These techniques performed well under carefully controlled imaging conditions and for fabrics with relatively simple, repetitive patterns. However, real industrial environments are rarely so predictable. Variations in illumination, fabric texture, yarn density, camera noise, and production conditions often caused handcrafted algorithms to generate either excessive false alarms or missed detections. As textile products became increasingly diverse, it became clear that manually designing rules for every possible defect type was neither practical nor scalable.
The rapid success of deep learning fundamentally changed this landscape. Instead of relying on manually engineered features, convolutional neural networks demonstrated an unprecedented ability to learn complex visual representations directly from images. Their success across numerous computer vision applications naturally encouraged researchers to apply the same principles to industrial inspection. Initially, supervised deep learning approaches achieved impressive performance by learning to classify defective and defect-free samples from large annotated datasets. Under laboratory conditions, these models often produced highly accurate defect localization and classification results.
However, textile manufacturing presents a very different reality from conventional computer vision benchmarks. In a typical production line, the overwhelming majority of manufactured products are defect-free, while defective samples occur only occasionally. Even when defects appear, they vary considerably in shape, size, texture, and severity. Some defects consist of obvious structural failures, whereas others may differ from the surrounding fabric by only a few pixels. Collecting sufficiently diverse examples of every possible defect is therefore extremely difficult. More importantly, producing pixel-level annotations for thousands of high-resolution industrial images is both time-consuming and prohibitively expensive.
These practical constraints gradually shifted the focus of research away from traditional supervised learning toward unsupervised anomaly detection, often referred to as one-class learning. Rather than attempting to learn every possible defect, one-class methods learn only the characteristics of normal, defect-free fabrics. During deployment, any significant deviation from this learned representation of normality is treated as a potential anomaly. This paradigm aligns naturally with industrial manufacturing, where normal samples are abundant while defective examples are scarce. As a result, one-class learning has become the dominant research direction in modern fabric defect detection.
Despite its promise, unsupervised anomaly detection introduces a new set of technical challenges. Fabrics possess highly repetitive yet often intricate textures, making it difficult to distinguish genuine defects from natural variations in the weave. Many industrial defects are extremely small, exhibit very low contrast, or occupy only a few pixels, requiring models capable of preserving fine-grained structural information throughout the detection process. At the same time, reconstruction-based models may inadvertently learn to reconstruct defective regions as if they were normal, suppressing the anomaly signal and reducing detection sensitivity. Real production environments introduce additional complications, including illumination changes, moiré patterns, sensor noise, and variations between different fabric types, all of which can further increase the likelihood of false detections.
These challenges have driven the rapid evolution of anomaly detection algorithms over the past decade. Rather than following a single research direction, the field has progressed through several complementary paradigms, each attempting to overcome the limitations of its predecessors.

The first major family of approaches focuses on feature-based representations, where pre-trained deep neural networks extract robust visual embeddings that allow anomalies to be identified as deviations from the learned distribution of normal features. Building upon these ideas, teacher–student distillation methods introduced a different perspective, teaching a lightweight student network to reproduce the behavior of a frozen teacher so that discrepancies naturally reveal anomalous regions. Researchers subsequently observed that conventional distillation could unintentionally reconstruct defective patterns too well, motivating the development of reverse distillation, which constrains information flow through carefully designed bottleneck representations to improve anomaly discrimination.
A parallel line of research approached the problem from a different angle. Instead of relying solely on normal samples, anomaly synthesis methods generate artificial defects during training, enabling models to learn more discriminative decision boundaries despite the scarcity of real defective data. At the same time, another research community revisited one of the most fundamental properties of textiles, their periodic structure. This gave rise to frequency-based approaches, which analyze fabrics in the spectral domain using Fourier and wavelet representations, exploiting the fact that structural defects naturally disrupt regular frequency patterns. Alongside these mainstream directions, several alternative approaches have combined saliency analysis, handcrafted features, clustering techniques, and comprehensive benchmarking studies to address specialized industrial requirements that remain challenging for deep learning alone.
Each of these research directions contributes a different perspective on the same fundamental objective: learning what constitutes a normal fabric and reliably identifying any deviation from it. Some prioritize detection accuracy, others emphasize computational efficiency or memory consumption, while others focus on rapid adaptation to new products or deployment on resource-constrained industrial hardware. Together, they illustrate how anomaly detection has evolved from handcrafted signal processing techniques into sophisticated learning systems capable of operating in real-world manufacturing environments.
The remainder of this paper follows this evolutionary journey. Rather than reviewing individual research papers independently, each section explains how successive generations of algorithms emerged in response to unresolved challenges, highlighting the motivations behind their development, the innovations they introduced, and the industrial problems they were designed to solve. By examining these developments as a continuous progression, the paper provides a comprehensive understanding of the current state of AI-based fabric defect detection and the technological directions that are likely to shape the next generation of intelligent textile inspection systems.
2. Feature-Based Methods

The first generation of modern anomaly detection methods began with a deceptively simple question:
If defective samples are extremely rare, is it really necessary to learn every possible defect? Or is it sufficient to learn what a normal fabric looks like and treat every significant deviation as an anomaly?
This question fundamentally changed the direction of industrial anomaly detection. Instead of viewing defect detection as a conventional classification problem, researchers started to formulate it as a problem of modeling normality. The objective was no longer to recognize individual defect categories such as holes, broken yarns, stains, or weaving faults. Instead, the goal became learning a compact representation of defect-free fabrics and measuring how far an unseen sample deviates from this learned representation.
This seemingly small conceptual change produced one of the most influential families of industrial anomaly detection algorithms: feature-based methods.
Unlike reconstruction-based approaches, feature-based methods never attempt to regenerate the input image. Instead, they rely on powerful convolutional neural networks that have already learned rich visual representations from large-scale datasets such as ImageNet. Although these networks were originally trained to recognize everyday objects rather than industrial materials, their intermediate feature representations capture surprisingly general characteristics including edges, textures, local structures, and spatial patterns. The challenge therefore shifted from learning features to determining how normal features should be represented and compared.
The earliest solutions approached this problem statistically. The underlying assumption was straightforward: although every defect may appear different, defect-free fabrics belonging to the same production process should produce feature vectors that occupy a relatively compact region of the feature space. If this normal distribution can be accurately modeled, then any feature lying sufficiently far from it is likely to correspond to an anomaly.
This statistical interpretation gave rise to probabilistic feature modeling, where the feature extracted at every spatial location is represented by a multivariate Gaussian distribution estimated only from normal training images. During inspection, every feature vector from the test image is compared with its corresponding Gaussian model using the Mahalanobis distance. Regions producing unusually large distances are considered anomalous because they deviate from the learned distribution of normal features.
This idea represented an important milestone. Rather than memorizing specific defects, the detector learned the variability of normal fabric itself. As a result, it became capable of identifying previously unseen anomalies without requiring defective training examples.
However, practical deployment soon exposed an important limitation. The probabilistic model assumed that normal features could be adequately described by Gaussian distributions. While this assumption often held for relatively simple industrial textures, it became increasingly restrictive for complex materials exhibiting rich structural variations. Furthermore, estimating covariance matrices for every spatial location required substantial memory and computational resources, making inference slower as image resolution increased. More importantly, compressing the entire normal distribution into statistical parameters inevitably discarded some of the diversity present in real manufacturing data.
Researchers therefore began asking a different question:
Instead of summarizing normal features statistically, why not preserve the actual normal features themselves?
This shift in perspective led to memory-based anomaly detection. Rather than estimating a probability distribution, the detector stores representative feature embeddings extracted from normal samples inside a memory bank. During inference, every feature extracted from a test image searches for its nearest neighbors within this collection of normal embeddings. Features that closely resemble previously observed normal patterns receive low anomaly scores, whereas features with no close neighbors are identified as potential defects.
This nearest-neighbor formulation dramatically improved anomaly localization because it preserved the richness and diversity of real normal textures instead of compressing them into Gaussian statistics. Even subtle structural variations that might be averaged away in probabilistic models could now be represented explicitly inside the memory bank.
Nevertheless, this improvement introduced a new engineering challenge. As more normal samples were collected, the memory bank continued to grow. Larger memory banks generally improved detection accuracy because they represented a wider variety of normal appearances, but they also increased storage requirements and slowed nearest-neighbor search. For large industrial datasets, storing millions of feature vectors quickly became impractical.
To overcome this limitation, representative feature selection techniques were introduced. Instead of preserving every extracted feature, only a carefully selected subset was retained. These representative embeddings covered the normal feature space while eliminating redundant samples, dramatically reducing memory consumption without sacrificing detection performance. This optimization transformed memory-based methods into practical solutions for industrial inspection, where both detection accuracy and inference speed are critical.
Although memory-based approaches significantly advanced anomaly detection, another limitation gradually became apparent.
Almost all feature-based methods relied on convolutional backbones originally trained for image classification. While these networks captured rich semantic information, they often produced feature maps with limited spatial resolution. For industrial inspection, this became a serious issue because many textile defects consist of only a few abnormal pixels. Broken fibers, tiny holes, loose yarns, and small stains may disappear after repeated pooling operations inside conventional convolutional networks.
Consequently, researchers began searching for feature representations capable of preserving both semantic understanding and fine spatial details.
The emergence of self-supervised Vision Transformers provided exactly this opportunity.
Unlike convolutional networks, transformer-based models represent images as collections of patches while maintaining long-range interactions between them through self-attention. Self-supervised pretraining further enables these models to learn rich visual representations without relying on manually annotated datasets. As a result, transformer features capture global contextual information while simultaneously preserving subtle local structures, an ideal combination for anomaly detection in textured materials.
Building upon these capabilities, the latest generation of feature-based methods abandoned the assumption that all image regions contribute equally to anomaly detection. Instead, they introduced explicit mechanisms that allow the model to identify the most informative patches before anomaly scoring is performed.
This evolution is particularly important for fabric inspection. Large homogeneous regions often contain little useful information, whereas anomalies almost always appear as localized disruptions within otherwise repetitive textures. By automatically emphasizing informative patches and suppressing redundant background regions, transformer-based feature extraction improves both localization accuracy and computational efficiency. Moreover, because these representations are inherently more discriminative, only a small number of normal training images are often sufficient to achieve strong performance.
Looking back, the evolution of feature-based anomaly detection reveals a consistent pattern.
The earliest generation focused on modeling the statistical distribution of normal features. The second generation shifted toward preserving representative normal examples inside memory banks, allowing richer representations of industrial textures. The latest generation further enhanced this idea by introducing self-supervised transformer representations together with patch-level attention mechanisms, enabling the detector to focus on the most informative regions while preserving both global context and fine structural details.
Throughout this progression, the central philosophy has remained unchanged: rather than attempting to learn every possible defect, learn normality as accurately as possible. What has evolved is the sophistication with which normality is represented, from probability distributions, to memory banks, and finally to context-aware transformer embeddings capable of capturing the subtle irregularities that define real-world textile defects.
This feature-centric philosophy established the foundation for the next major breakthrough in industrial anomaly detection. Once researchers recognized that powerful pre-trained networks already possessed rich representations of normal structures, the natural next question emerged: instead of storing or modeling these representations, could another network simply learn to imitate them?
This question gave rise to the teacher–student paradigm, which forms the next stage in the evolution of anomaly detection.
Next in the Series
Feature-Based Methods established the principle that modern anomaly detection systems can learn the characteristics of normal fabrics instead of attempting to model every possible defect. In Part 2, the discussion continues with Teacher–Student Distillation Methods, showing how researchers replaced memory-intensive feature representations with knowledge transfer to build more efficient and scalable inspection systems for industrial deployment.
Series Navigation
✓ Part 1 – From Manual Inspection to Feature-Based AI (Current)
Part 2 – Teacher–Student Distillation Methods
Part 3 – Reverse Distillation Methods
Part 4 – Anomaly Synthesis Strategies
Part 5 – Frequency-Based and Complementary Methods
Part 6 – Comparative Analysis and Future Directions
Related AI-Innovate Resources
• AI Defect Detection
• Computer Vision in Fabric Inspection
• Automated Visual Inspection for Manufacturing
Applying AI to Industrial Inspection?
Explore how AI‑Innovate develops machine vision and anomaly detection solutions for automated quality control across manufacturing industries.
About AI-Innovate
AI‑Innovate develops AI and machine vision solutions for industrial inspection, automated quality control, and manufacturing optimization. The company also publishes expert-authored technical resources to support engineers, researchers, and manufacturers.


