# AI Fabric Defect Detection: How to Automate Fabric Inspection with Cameras and Machine Learning

> AI fabric defect detection uses cameras to catch holes, stains and weft faults metre by metre. Learn where to install it, the data, a 6-step pilot and limits.

Source: https://digitalbridge.com.tr/en/blog/ai-fabric-defect-detection.html
Publisher: Digital Bridge Teknoloji (https://digitalbridge.com.tr)
Topic: Artificial Intelligence
Published: 2026-10-25 · Updated: 2026-10-25

AI fabric defect detection is the automatic finding and logging of faults in woven or knitted fabric, such as holes, stains, broken picks, broken ends and yarn faults. An industrial camera images the fabric as it runs through the inspection machine or production line, a model classifies each defect, and a metre-by-metre defect map is produced for every roll.

## Key takeaways

- AI fabric defect detection uses an industrial camera to find holes, stains and broken picks, producing a metre-by-metre defect map for every roll.
- The easiest place to start is your existing inspection machine: the speed is steady and the lighting can be controlled.
- The system does not replace the inspector; it flags suspect points, and the inspector makes the call on borderline defects.
- Patterned fabric needs more labelled data, and lot-to-lot shade approval is a job for a spectrophotometer, not a camera.
- Roughly 61% of Türkiye's 2025 apparel exports went to the EU (İHKİB, January 2026); in that market a metre-by-metre quality record is a commercial argument.

## How is fabric inspection done today?

In most mills, fabric inspection depends on the eyes of an inspector standing at a lit inspection frame. The fabric runs at a steady speed; when the inspector spots a defect, they stop the machine, mark it and write it on a form. At the end of the roll the points are added up and the fabric is graded.

Visual fabric inspection has worked for decades, but its limits are well known. Two inspectors score the same defect differently; attention fades towards the end of a shift; a fault that is easy to see on fine, light fabric slips through on dark fabric. The paper form usually stays with that roll and never shows which loom, which yarn lot or which finishing recipe caused the problem.

A defect missed at fabric inspection shows its cost at the most expensive point: after cutting and sewing. A hole found in a cut panel puts the fabric, the labour spent on that panel and the delivery date at risk together. We explain how orders are tracked through the line in our [textile production tracking](https://digitalbridge.com.tr/en/blog/textile-production-tracking.html) guide; fabric inspection is the first link in that chain.

## What do missed fabric defects cost?

Turkish textile and apparel makers are working with shrinking exports and a falling workforce in markets with high quality expectations. According to the [İHKİB Apparel and Ready-to-Wear Sector Update (January 2026)](https://www.ihkib.org.tr/content/files/uploads/4170/hazir-giyim-ve-konfeksiyon-sektoru-2025-aralik-ihracat-bilgi-notu.pdf), Türkiye's apparel exports fell 6.3% to $16.77 billion in 2025.

The same report shows that $10.16 billion of 2025 apparel exports went to the European Union, roughly 61% of the total. EU brands often pass the cost of returns and delays caused by faulty fabric back to their suppliers, so a reliable quality record becomes a commercial argument.

> According to SGK (Turkish social security) data cited by İHKİB, registered employment in textiles and apparel fell to 860,359 in October 2025, a loss of 105,686 jobs in one year. ([İHKİB Apparel and Ready-to-Wear Sector Update, January 2026](https://www.ihkib.org.tr/content/files/uploads/4170/hazir-giyim-ve-konfeksiyon-sektoru-2025-aralik-ihracat-bilgi-notu.pdf))

With a shrinking workforce, experienced inspectors are harder to find. Automating fabric defect detection is less about replacing the inspector and more about focusing their attention on the suspect points the system flags.

## Which fabric defects can AI detect?

In [computer vision](https://digitalbridge.com.tr/en/glossary.html#computer-vision)-based fabric inspection, defects are grouped by origin. Each group leaves a different signature in the image, and that signature determines how the camera and lighting should be set up.

| Defect group | Examples | How it appears in the image | Difficulty for the camera |
|---|---|---|---|
| Weaving | Broken pick, broken end, double pick, uneven pick density | A linear break in continuity along the yarn direction | Low–medium |
| Knitting | Holes, needle lines, dropped elastane, loop faults | A spot or vertical line | Medium |
| Yarn | Thick and thin places, neps, foreign fibre | Small, irregular marks | Medium–high |
| Dyeing and finishing | Stains, oil marks, side-to-centre shading, barré | A change in colour or brightness | High for shade variation |
| Mechanical | Tears, crease marks, selvedge faults | Clear distortion of shape | Low |

Two limits of AI fabric inspection are worth knowing from the start. First, on patterned, printed or jacquard fabric the model must also learn to tell the pattern itself from a defect, which takes more labelled examples. Second, measurements such as lot-to-lot shade variation are the job of a spectrophotometer; a camera alone does not replace that measurement.

## How to set up AI fabric defect detection in six steps

1. **Choose the installation point.** The easiest place to start is your existing inspection machine: the speed is steady and the lighting can be controlled. Mounting at the stenter exit or on the loom catches defects earlier but brings tougher conditions.
2. **Install camera, lighting and position tracking.** A line-scan camera covering the full width, front lighting for surface defects, back lighting for density defects and an encoder to record the metre position are the core components.
3. **Write the defect dictionary and scoring.** Agree which defect is recorded under which name and with how many points. The 4-point system (ASTM D5430), used by many mills and buyers, is a good common language.
4. **Collect and label the data.** Real images of defective and defect-free fabric are collected for each quality and labelled together with experienced inspectors. We explain the method in detail in our guide to [data labelling for AI](https://digitalbridge.com.tr/en/blog/data-labelling-for-ai.html).
5. **Run it alongside the inspector.** During the pilot, the system and the inspector assess the same rolls independently. Missed defects and false alarms are reviewed class by class and thresholds are tuned accordingly.
6. **Connect the defect map to production.** Each roll's metre-by-metre defect map, grade and defect images are stored; the cutting room uses the map when planning lays, and production tracks defects by loom and lot. Linking roll labels to your [barcode-based production traceability](https://digitalbridge.com.tr/en/industry-40/production-traceability-barcode.html) set-up ensures each map stays matched to the right roll.

The general architecture of vision-based inspection and its use in other industries is covered in [computer vision quality inspection](https://digitalbridge.com.tr/en/blog/computer-vision-quality-inspection.html). Why you need a model trained on your own fabrics rather than a generic one is explained in our [custom AI model training guide](https://digitalbridge.com.tr/en/blog/custom-ai-model-training-guide.html).

## How is fabric defect data used for root-cause analysis?

The real value of automated fabric inspection goes beyond catching individual defects: it makes visible why they happen, feeding data into [root cause analysis](https://digitalbridge.com.tr/en/glossary.html#root-cause-analysis). Recurring broken picks on rolls from the same loom point to a maintenance need; neps concentrated in one yarn lot point to a supplier issue; stains that rise after a particular recipe point to the finishing process.

Linking a defect to its root cause requires a record of which loom, yarn lot and recipe produced each roll. We explain how to set up lot and batch tracking in our [production traceability guide](https://digitalbridge.com.tr/en/blog/production-traceability-guide.html). For a structured root-cause analysis of recurring defects, the [8D problem-solving](https://digitalbridge.com.tr/en/blog/8d-problem-solving.html) method offers a sound framework.

## Manual versus AI-assisted fabric inspection compared

When choosing between manual and AI-assisted inspection, it helps to set the two methods side by side against the same criteria. The table below summarises where the differences arise; which one performs better on your fabric is shown by the pilot measurements.

| Criterion | Manual inspection | AI-assisted inspection |
|---|---|---|
| Attention | Varies with fatigue over a shift | Scans every metre with the same rules |
| Scoring consistency | Can differ between inspectors | Scores against one defect dictionary and set of thresholds |
| Record | Paper form, usually confined to the roll | Metre-by-metre defect map and defect images |
| Root-cause analysis | Hard without compiling forms by hand | Can be linked to loom, lot and recipe |
| Final decision | With the inspector | Still with the inspector on borderline cases |

## How do you measure the value of automated fabric inspection?

To show the return on automated fabric inspection, take a baseline before the pilot starts. The following metrics give you solid ground for judging the pilot and deciding on roll-out:

- **Escape rate:** defects that passed inspection but were found in cutting, sewing or by the customer.
- **False alarm rate:** the share of flags the system raises that the inspector does not count as defects. If this is high, inspectors stop trusting the system.
- **Inspection speed:** inspection time per metre and the number of machine stops.
- **Customer returns and complaints:** the number and value of fabric-related returns and discount claims.
- **Recurring defect share:** the proportion of defects that can be traced to the same loom, yarn lot or recipe.

Tracked weekly, these metrics show clearly in which fabric qualities the system can be trusted on its own and where inspector confirmation should continue. The method for weighing that return against the investment is set out in our article on [measuring AI project ROI](https://digitalbridge.com.tr/en/blog/measuring-ai-project-roi.html).

## Common mistakes in fabric defect detection projects

The first mistake in fabric defect detection projects is underestimating lighting and mechanics. No model performs well on poorly lit or vibrating images; in practice, a large share of problems stem not from software but from camera position, lighting angle and fabric tension. The second is trying to bring every fabric quality online at once. Expanding a system that already works well on one quality is both faster and safer than starting with dozens.

The third is leaving inspectors out of the process. They know the defects best, and a team that has no part in labelling, threshold setting or pilot review will not trust the system's flags. The fourth is using defect data only for roll grading and never feeding it back into production. Defect records kept per batch can also supply durability and quality information once the requirements of the EU's [digital product passport for textiles](https://digitalbridge.com.tr/en/blog/digital-product-passport-textiles.html), still being defined under the [Ecodesign for Sustainable Products Regulation (ESPR, 2024/1781)](https://eur-lex.europa.eu/eli/reg/2024/1781/oj), are settled.

## How we deliver fabric defect detection at Digital Bridge

At Digital Bridge we do not sell a box off the shelf; our own team builds both hardware and software around your fabrics. Within our [textile and apparel solutions](https://digitalbridge.com.tr/en/industry-solutions/textile-apparel.html), the path looks like this:

- **Discovery and feasibility:** we examine the inspection machine, fabric types, speeds and the most troublesome defects on site. Technical feasibility for the hardware is free of charge.
- **Hardware:** our electronics and mechanical team adapts the camera, lighting, encoder and enclosure design to your inspection machine. On the [computer vision](https://digitalbridge.com.tr/en/technology-hardware/computer-vision.html) side, we train the model on your own fabrics.
- **Pilot:** we start with one inspection machine and a limited number of fabric qualities, comparing results side by side with the inspectors' assessments.
- **Integration:** we connect the roll defect map and grade to your [quality management system](https://digitalbridge.com.tr/en/industry-40/quality-management-system.html) and [MES production management](https://digitalbridge.com.tr/en/industry-40/mes-production-management.html) layer, and match roll labels to your existing barcode infrastructure.

If you want to share quality reports and defect images for customers across departments in an orderly way, [SmartFiles](https://digitalbridge.com.tr/en/smart360/smartfiles.html) (SmartFiles.com.tr) in the [Smart360](https://digitalbridge.com.tr/en/smart360.html) family groups files into department or project areas and lets you grant separate read, write and delete permissions per person or department.

To track line efficiency alongside quality, see [how to calculate OEE](https://digitalbridge.com.tr/en/blog/how-to-calculate-oee.html), and for all related guides visit [Artificial Intelligence](https://digitalbridge.com.tr/en/blog/topic/yapay-zeka.html).

## Next step

Count the fabric defects returned by customers or found in cutting over the last three months by type, and photograph the three most frequent. That list decides which fabric and which defect the pilot starts with. To review it with us, use our [contact page](https://digitalbridge.com.tr/en/contact.html).

## Frequently Asked Questions

### Can AI fabric defect detection be fitted to our existing inspection machine?

In most cases, yes. The inspection machine is the best place to start because its speed is steady and its lighting can be controlled. The camera, lighting and encoder are chosen to suit the machine's width and speed, and the mechanical mounting is designed on site. Suitability is confirmed during discovery by examining the machine and fabric types.

### Will AI replace fabric inspectors?

No; the aim is not to remove inspectors but to direct their attention to the right places. The system scans every metre with the same attention and flags suspect points; the inspector confirms them and makes the call on borderline cases. During the pilot both work side by side, and measurement shows which defects the system handles reliably.

### Does it work on patterned and printed fabrics?

It can, but it needs more preparation. The model must learn to distinguish the pattern itself from a defect, so enough defective and defect-free examples must be labelled for each pattern family. Starting with plain, solid-coloured fabrics and then extending to patterned products makes the pilot shorter and more predictable.

### Can a camera measure shade variation?

A camera can flag clear shade changes within a roll and side-to-centre variation. Precise measurements such as lot-to-lot shade approval, however, belong to colour measurement instruments working under controlled light. The camera system does not replace them; it shows where to measure by flagging the suspect areas of each roll.

### What does an AI fabric defect detection system cost?

Cost depends on the number of cameras and lights needed for your fabric width and line speed, whether the system sits on the inspection machine, the stenter or the loom, how many defect types and fabric qualities are targeted, and how far it integrates with quality or MES systems. That is why the actual figure is set in a written proposal covering scope and phases after discovery.

### How much data does a fabric defect detection pilot need?

The exact amount depends on fabric variety and the defect types targeted. A pilot usually starts with a single fabric quality and a few of the most frequent defects, collecting and labelling real examples from different shifts and lots. Once the model is trained, the dataset grows by relabelling the cases it gets wrong.
