AI textile inspection: defect detection with 97% accuracy

Manual fabric inspection misses defects when the shift is tired or the fabric is running at speed. We develop and implement turnkey automatic fabric defect detection: we configure models for your assortment, train on your batch, and hand over a ready operating procedure. Inspection becomes objective, and defect escape to finishing becomes a manageable value.
Frequently Asked Questions

Fabric defect detection: where manual inspection breaks down

Manual textile quality control relies on one person's attention. The inspector guides the fabric over a light table and simultaneously monitors density, weft, pile, and selvedge — a decision on every meter is made in fractions of a second.

Attention does not last long: after forty to fifty minutes of a shift, the miss rate rises, and by the last roll, defects that were confidently caught at the start slip through.

The second reason is vague criteria. The boundary between an acceptable deviation and a defect is often described in words like “minor stripe,” and each inspector draws it differently.

Knots, punctures, mispicks, color shading — some of them are visible only at a certain angle and light, so the same roll receives a different verdict during re-inspection of the fabric.

A missed defect in a roll almost never remains local. It surfaces not during inspection but during cutting or at the customer — and then not one meter but the entire batch goes to waste: batch downgrading means return, re-sorting, and schedule slippage across the whole order. The customer starts checking incoming inspection themselves and builds in a time buffer.

Machine fabric defect detection addresses both points: it does not get tired by the end of a shift and maintains one threshold for all rolls.

Every meter passes through the same set of features, a defect gets a type and coordinate within the roll, and the decision remains verifiable — below we break down how this is structured and what it delivers.

What automated textile inspection delivers

Manual grading relies on the operator at the inspection frame: by the end of a shift, attention drops, the “acceptable / unacceptable” criterion shifts, and the same crease is accepted by one person and sent to reject by another.

Cameras on the line capture the fabric under stable illumination and record the position of each defect, so the result does not depend on the shift, fatigue, or who is on inspection today.

The classifier distinguishes standard classes — yarn break, weft defect, oil stains, punctures, stripes, pulls — and maps them to a 4-point scale.

Thresholds and acceptance rules are set once and align with the customer's requirements: ISO 2859-1 describes sampling and acceptance quality levels that the parties agree on in advance.

In this way, automated textile inspection turns “by eye” into uniform quality criteria applicable to any batch and any shift crew.

In numbers it looks like this. Grading speed increases severalfold: fabric passes at the line's operating speed, and packaging, not inspection, becomes the bottleneck.

The share of missed defects falls from 5-7% to fractions of a percent — along with it, the share of customer returns decreases, because a claim is usually resolved with a defect map for the roll before shipment.

A separate effect is accumulated statistics. For each batch, it is visible which defects predominate and at which meter, which suppliers produce more rejects, and how the picture changed after adjustments in weaving.

The process engineer stops arguing about preferences: there is labeling, there is dynamics, there is an argument for changing a mode or a supplier.

Inspection modes: from the grading table to the line

The inspection mode is selected for the article, not for the entire line.

Dense solid-color knitwear with isolated defects is reliably caught on moving fabric, while pile, fine patterns, and elastic fabrics produce false positives — there the image is stabilized for lighting and the confidence threshold is tightened.

For low-volume articles, it is more profitable not to chase full coverage but to separately recheck questionable rolls.

Mode When it fits What it does not cover
In-line inspection Large batches, stable line speed, defect readable in reflected light Pile, fine pattern, folds — false positive rate rises
Sampling inspection of rolls Small batches, prototypes, frequent changeovers A defect between sampling points remains unnoticed
Rechecking questionable rolls Any article: everything below the confidence threshold goes here Does not replace primary inspection; works only on top of it
Manual grading table New articles without accumulated labeling, comparison with a reference Throughput is limited by the operator and falls toward the end of the shift

We usually combine them as follows: in-line inspection filters out the bulk, questionable rolls receive a second assessment from the operator, and both labels merge into one sample for retraining.

After several batches, the threshold is calibrated for the specific article — the false positive rate falls, and fewer rolls require manual rechecking.

How implementation is structured on a real fabric batch

Implementation of an inspection system begins not with equipment but with a fabric batch on which the solution will operate. We ask for 300–500 linear meters from real production — with and without defects, captured under the same light and at the same line speed as in the shop.

These frames show which defects actually occur: weft break, oil stains, pulls, color shading. Then the work proceeds step by step, and each next step builds on the previous one.

Work procedure

  1. Sample collection. We fix the capture conditions and sort the material by fabric type and article — they cannot be mixed in one sample, as different structures produce different backgrounds.
  2. Labeling reference samples. Each defect is outlined with a bounding box and assigned a class; questionable frames — a shadow from a fold, a knot, pile — are labeled separately. These are the ones that most often cause false positives.
  3. Sensitivity tuning. We select the threshold based on the cost of error: a missed defect is more critical than an extra trigger, so we bias the setting toward recall rather than strict precision.
  4. Validation on a holdout batch. From 20 to 30% of samples do not participate in training. On them we check that accuracy holds on new rolls, not only on familiar frames.
  5. Line integration. We determine what happens on a trigger: light indication, a mark in the roll, a stop, or a log entry. We agree the procedure with process engineers before launch.
  6. Handover and operator shift training. We show all shifts how to read the signal, how to mark questionable triggers, and whom to contact in case of a failure.
  7. Support during the first weeks. Questionable frames are returned to labeling — the model is retrained on what actually passed through the line.

After handover, the shift works according to the ready procedure, and we stay in touch on metrics and updates.

Set of documentation, procedures, and models

After launch, the customer is left not with a demonstration but with a working set: models trained on their articles, their lighting, and their fabric types, and documents according to which the shift works without us.

Below is what is physically handed over in the project folder and what we check together with the process engineer at acceptance.

We verify completeness by scenario, not by a file list: if the shift cannot start the line and sort out a questionable section without calling us, the item is not closed. Each document has an owner on the customer's side.

  • Defect catalog — types and subtypes of defects for each article, reference images, the boundaries of “defect or tolerance,” and analysis of questionable cases with the process engineer's decision.
  • Configured models — weights for the customer's articles, trigger thresholds by fabric zones, rejection rules, and separate logic for selvedges and joins.
  • Operator action procedure — what to do on a trigger: stop, select the section, mark in the log, escalation procedure for a questionable case.
  • Shift instructions — system startup, camera and lighting checks, a control run on a reference sample, actions for false positives.
  • Trigger log — time, article, defect type and location, operator confirmation or rejection, a per-shift export for analysis.
  • Retraining procedure — how to add new articles, who labels questionable frames, how often accuracy is checked on a validation set.
  • Operational documentation — equipment map, line connection diagram, model backups, and recovery procedure after a failure.
  • Acceptance protocol — accuracy on the holdout set, error matrix, list of known limitations and modes where the model is not applied.

Case study: reducing missed defects in finishing

Finishing is the last barrier before shipment: bleaching, dyeing, and finishing treatment are already behind, and a defect that gets into the roll will only be seen by the customer during cutting.

Before the project, inspection was visual at line speed — an inspector cannot maintain attention across the entire fabric width, and some defects went into the batch.

We installed cameras above the fabric and trained the model on the inspectors' own labeling: punctures, weft defects, creases, and stains are separate classes, while the Four-point system remained the common conversion scale.

Sensitivity thresholds were tuned by article — light fabric, pile, and dark shades produce different contrast, and a single threshold caused either misses or false positives.

Metric Before After
Missed defect at shipment 9 rolls out of 100 2-3 out of 100
Questionable rolls per month about 40 6-8
Resolution of a roll claim 2-3 days within a shift

The main change is not detection itself but the evidence base for a questionable roll.

The system writes a defect map tied to the fabric meter and a frame for each triggered class, so claims are resolved based on facts, not correspondence, and questionable batches stopped returning for rewinding.

We retrain the model on new articles and on analysis of questionable cases — the miss rate does not grow when the assortment changes and stays below 3%.

How does inspection of pile and smooth fabrics differ?

Pile and smooth fabric scatter light differently, so the same sensitivity threshold produces an incomparable picture on them. In pile fabrics, the surface texture is non-uniform by itself: fibers create noise that can easily be mistaken for a defect.

In smooth fabrics, the background is even, but the yarn direction and highlights from the light source produce extended gradients similar to a crease.

Defect selection rules diverge precisely here. On pile, a single fiber or a short pile track is not considered a defect — the decision is made by a stable region confirmed across neighboring frames.

On smooth fabric, the key is the geometry and orientation of the spot: everything that coincides with the yarn direction or a highlight gradient goes into rejection. Without this, false positives grow severalfold and the operator stops trusting the signal.

We align class boundaries with the four-point scale ASTM D5430: it separates a critical defect from one acceptable for a specific batch.

We tune thresholds and selection rules to the customer's requirements, not to abstract accuracy — that is why one model maintains a stable result across different articles.

Questions usually asked before starting

Before starting, customers ask the same set of questions: how the model will handle an article change, what will happen with lighting fluctuations, and how many false marks the operator will receive.

How critical are lighting conditions in the shop?

The model is trained on frames from your line and under the same light, so it is tuned for the specific area rather than “on average.” Differences between shifts or across zones are compensated with frames from different conditions and periodic camera calibration.

What should be done when launching a new article?

There is no need to retrain from scratch: the article is added as a separate set of references and fine-tuned on several dozen samples, after which it is validated on a holdout batch of that specific article.

How many false positives will there be?

We tune the sensitivity threshold to the cost of error: first we work for recall so as not to miss a defect, then we raise the threshold to the target precision. Marks confirmed or rejected by the operator are returned to training — the false positive rate falls.

Will the line have to be stopped?

No. Cameras and lighting are mounted on the frame of existing equipment and combined with scheduled maintenance. First the model runs in observation mode; you enable the rejection signal.

Do you train on our defects?

Yes, on your samples: several hundred labeled frames per defect class produce a model that knows your specific defects. If there are few defects, we supplement part of the cases with synthesis, but acceptance is performed on your sample.

Where to start: let's discuss the task and send a plan

The first conversation is about production, not technology.

It is enough to describe which defects are critical (weft break, pulls, stains, scuffs, color shading), at which processing stage they appear, and how inspection is currently organized — sampling inspection at the output or manual fabric grading.

So that the estimate and work plan are based on real data rather than assumptions, to start it is enough to have:

  • samples of good and defective product with labeling — several dozen cases for each defect class;
  • capture conditions: line speed, lighting, angle, height, and camera type;
  • current defect statistics and rejection rules used by quality control;
  • acceptance criteria — what share of missed defects is acceptable and what false positive rate does not hinder the operator;
  • access to the site to record a video stream during a working shift;
  • a contact for a process engineer or line operator to label questionable cases.

We fix the scope of the audit before work begins: we check whether there is enough data for training, whether there is drift between batches, and how consistent labeling is between shifts.

The output is a plan with stages, an acceptance point for each defect class, and pilot timelines — usually from several weeks to two months, depending on the number of classes and the stability of capture conditions.

Describe the task in free form — we will come back with an estimate and a work plan for your processing stage.

AI Development Areas

Latest works

  • Development of a web application for FEEDME
    Development of a web application for FEEDME
    1393
  • Development of an online store for the company FURNORO
    Development of an online store for the company FURNORO
    1368
  • B2B Advance company logo design
    B2B Advance company logo design
    815
  • Development of a web application for Enviok
    Development of a web application for Enviok
    1139
  • AIDER company logo development
    AIDER company logo development
    1057
  • CRM development for Chasseurs
    CRM development for Chasseurs
    1152