Can fabric defect detection be done with cameras?
Yes: fabric defect detection with line-scan cameras, the right lighting angle and software that looks for breaks in the fabric's regular structure can find holes, broken ends, stains and slubs in moving fabric and record each one with its metre position. In most mills an inspector watches fabric run over an inspection table, marks defects and grades the roll, usually with the 4-point system; fatigue and inspector-to-inspector variation let some defects escape and return as customer claims.
Automated fabric inspection does not remove the inspector. It looks at every metre with the same attention and brings suspect areas to the inspector, who still decides borderline cases. The useful question is not "can a camera see defects?" but "on our fabrics, which defects does it find, at what speed, and with how many false alarms?"
Which fabric defects do cameras catch, and which are hard?
Cameras catch defects that disturb the regular weave or knit and show contrast under light; shade, defects hidden inside a pattern and faults you can only feel or see under tension are hard. A study on real-time defect detection in denim published in El-Cezeri reports that a set-up with a high-resolution camera and Shearlet-transform features detected warp breaks, weft breaks, holes, tears and stains.
- Caught well: Holes and tears, missing or broken ends and picks, slubs and thick or thin places, knots, stains and oil marks, needle lines and barre in knits, clear creases.
- Hard: Shade variation and side-to-centre shading (separate colour measurement), defects hidden in jacquard or print, hand and stiffness, open places visible only under stretch.
- Easily confused: Intended irregularities such as slub yarn, melange and wash effects, which must be defined per style.
Where should fabric be inspected: on the machine or at the inspection table?
For most mills the best start is the inspection machine that fabric already passes through; cameras on the loom catch defects earlier but are needed on every machine. On a loom or circular knitting machine a camera can catch a repeating defect as it forms and stop the machine, but it must cope with vibration and lint. The greige inspection table sees many machines' output at one point, but only after the roll is finished. Inspection after finishing sees what the customer will see; some greige defects disappear there, and finishing stains and creases appear.
The technical data sheet for Uster's automatic fabric inspection system lists in-line installation after a coating, dyeing or finishing line and off-line installation at final quality control or incoming warehouse inspection. It also says light sources are applied at different angles depending on the fabric, that inspection width is fabric width plus lateral movement, and that an encoder (length meter) is included.
What camera and lighting does a fabric inspection machine need?
Moving fabric is usually imaged with a line-scan camera, and resolution is chosen from the smallest defect that must be caught. Teledyne's line scan primer explains that a single line of pixels builds a two-dimensional image line by line as the object moves past, that fast-moving objects are imaged without smear, and that illumination must be reasonably uniform across the field of view and intense, because exposure times are very short.
A practical sizing rule: the smallest defect should cover at least three pixels, so a 1 mm defect needs a pixel of about 0.33 mm. A 180 cm fabric plus a margin for lateral movement is about 190 cm, roughly 5,700 pixels: one 8k camera or two overlapping 4k cameras. At 60 m/min the fabric moves 1,000 mm per second, so 0.33 mm line spacing needs about 3,000 lines per second. Triggering lines from the encoder rather than a clock keeps pixels square when speed changes and gives correct metre positions.
- Front light (reflected): Stains, oil marks, colour and print defects.
- Back light (transmitted): Holes, missing ends and picks, open places, density variation. The fabric must let light through; it does not help on heavy or coated fabric.
- Side or low-angle light: Surface relief: slubs, knots, creases, floats.
Classic texture analysis or a learned model?
On plain, single-colour fabric, classic texture analysis is often enough; on patterned fabric and in mills with many styles, learned models and anomaly detection become more useful. Woven and knitted fabrics are regular structures, so deviations can be measured. Kumar's survey of computer-vision-based fabric defect detection groups about 160 references into statistical, spectral and model-based approaches, notes that the vagueness and ambiguity of defect classes make the task difficult, and concludes that combining approaches can give better results than any single one.
On patterned fabric the defect has to be found inside a repeating motif. Koulali and Eskil's motif-based unsupervised textile anomaly detection paper extracts the pattern period automatically, needs a single defect-free sample for training, and is evaluated on the Patterned Fabrics benchmark. With few labelled defect images, anomaly detection trained on good fabric is a sound start; thresholds and false-alarm measurement are covered in our article on anomaly detection without defect labels. Classifying the defect (hole or stain) still needs labelled examples.
| Fabric type | Fit for cameras | Main difficulty | Suggested starting point |
|---|---|---|---|
| Plain greige woven (sheeting, poplin) | High | Lint, selvedge wander | Back light and classic texture analysis |
| Denim | High | Slub yarn and wash effects mistaken for defects | Thresholds per style, front and side light |
| Single jersey, rib (circular knit) | Medium to high | Tension changes, faint barre | Low-angle light, take-up that keeps tension steady |
| Yarn-dyed and check wovens | Medium | Defects blend into the pattern | Anomaly detection aligned to the pattern repeat |
| Jacquard and printed fabric | Low to medium | Large, irregular pattern | Measure in a pilot first; compare against a pattern reference if needed |
| Velvet, raised and pile fabric | Low | Pile direction changes the image | Inspector first, camera only for selected defects |
How does the fabric defect map feed 4-point grading and the ERP?
The main output is a roll defect map giving each defect's metre position, position across the width, length, class and image; grading, cutting and stop decisions come from it. According to its catalogue page, ASTM's D5430 standard for visually inspecting and grading fabrics can be used for acceptance of individual rolls and shipments when purchaser and seller agree; it also warns that the same rolls can receive very different penalty points under the different point assignment options, so the same option should be used when the parties disagree.
In the common 4-point system a defect earns 1 to 4 points by length (up to 3 inches is 1 point, over 9 inches is 4), holes are scored separately, and the total is normalised to 100 square yards or 100 square metres. A camera gets this arithmetic right only if it reports defect length and position correctly; point rules that differ by customer must be set up per customer.
- Encoder: The machine's length meter feeds the camera system; roll start, roll end and seams are recorded.
- ERP: The map is written to the roll record under the roll number; points, grade and net metres fill in automatically.
- Cutting: The map feeds cut optimisation, which cuts out defective sections or splits the roll.
- Stop signal: A repeating defect or large hole stops the inspection machine and shows the image on the inspector's screen.
- Uncertain detections: Detections near the threshold are not graded automatically; the inspector confirms or rejects them, and the decision is logged.
Decide early what happens when a new style arrives: a few hundred metres of good fabric teach the normal appearance, the threshold is tuned with the inspector on the first rolls, and only then does the style move to automatic grading.
What data and access does the mill need to provide?
What is needed is real rolls of each style, the inspectors' grading of those same rolls and a defect catalogue; thousands of labelled images are not needed up front. In practice: the pilot styles and their monthly metres; a photographed definition and point rule per defect class; the machine's speed, width, encoder signal and mounting space; the ERP roll record fields; and a named quality person for borderline cases. If the existing machine's fabric path and tension suit cameras, a new machine is usually unnecessary.
How should a pilot be measured?
Measure a pilot by running the same rolls past both the camera system and the inspectors and comparing results per fabric type and per defect class. Inspectors miss defects too, so every disagreement is rechecked at its metre position by a second person; that builds the list of confirmed defects.
- Recall: Of 100 confirmed defects, how many the system found; the rest are escapes.
- False alarms: How many non-defects are flagged per 100 metres; this sets the inspector's workload.
- Position accuracy: The difference between the metre on the map and the real location.
- Grade agreement: The difference between system points and inspector points per roll, and the number of rolls whose quality grade changes.
- Speed: Results at the machine's normal and maximum speed.
Report results by style, defect class, shift and speed, not as one average, and keep test rolls out of threshold tuning. Targets come from your own cost of escapes and claims and today's measured baseline, not a vendor brochure. We explain how to write the criteria before training in our article on acceptance tests for a visual inspection pilot.
Hypothetical example: how do you read a pilot across three fabric styles?
The following example is hypothetical; the numbers only illustrate the method. A weaving mill adds two cameras, back light and side light to its greige inspection machine. In the pilot, 2,000 metres of each of three styles, 6,000 metres in total, are checked by both cameras and inspectors, and disagreements are reviewed together.
| Style | Confirmed defects | Found by system | Recall | False alarms | False alarms per 100 m |
|---|---|---|---|---|---|
| Greige poplin | 80 | 74 | 92.5% | 16 | 0.8 |
| Classic denim | 90 | 81 | 90% | 24 | 1.2 |
| Slub denim | 70 | 49 | 70% | 70 | 3.5 |
| Total | 240 | 204 | 85% | 110 | 1.8 |
For poplin, 74 / 80 = 0.925: recall is 92.5% and the escape rate 7.5%. For slub denim, 70 false alarms / 2,000 m × 100 = 3.5 per 100 metres. The totals of 85% and 1.8 look reasonable but hide the slub denim problem: intended slubs are flagged, while real thick places get lost among them. The mill moves poplin and classic denim to automatic grading with inspector confirmation, and keeps slub denim on manual inspection until it is remeasured with a style-specific threshold.
What drives the cost, and what should a quote itemise?
Cost is driven mainly by fabric width, speed, the smallest defect to be caught, the number of styles and patterns, and how deep the integration goes. A wider web and smaller defects need more cameras, higher speed needs stronger light and computing, and jacquard and print need more data; extra lighting set-ups and retrofitting add work. A quote should itemise: cameras, lenses, lighting and computers; data collection and labelling; software and models; machine, encoder and ERP integration; commissioning and inspector training; new-style support and monitoring.
Why do these projects fail, and what should be settled first?
Failures usually come from the fabric and the measurement design, not from the camera:
- Not defining slub, melange and wash effects per style.
- Wrinkles and changing tension on the table, so every wrinkle looks like a defect.
- Leaving lint on the back-light glass out of the cleaning plan.
- Encoder slip that corrupts metre positions, so defects cannot be found at cutting.
- Basing the list of true defects on one inspector's judgement.
- Expecting the camera to judge shade, a separate colour measurement task.
Before starting, write down the pilot styles, defect catalogue, point rules, inspection point and acceptance criteria. Hatson Tech builds this kind of set-up, cameras, lighting, software and ERP integration on the fabric inspection machine, within our computer vision quality control service; the first meeting and the discovery work on your fabric styles are free.