TL;DR
This paper explores automating fabric thread counting using smartphone photos taken through a standard 10$\times$ "pick glass" magnifier. By introducing the PickGlass-TPI dataset, the authors demonstrate that while modern AI models (like tuned VLMs) can outperform non-expert humans, they still struggle to meet the strict $\pm$5% industry tolerance due to inherent visual ambiguities and the "octave error" (counting half or double).
What Problem Does This Paper Address?
In the textile industry, "thread density"—the number of warp and weft threads per inch (TPI)—is a critical quality specification. Traditionally, inspectors count these threads manually using a pick glass (a folding magnifier with a 1-inch window). This process is slow, tedious, and prone to human error.
While laboratory instruments exist for this, they are too expensive for small-scale weavers in regions like India. A smartphone-based solution would be revolutionary, but it faces significant challenges: factory environments introduce glare, shadows, and varying focus. The authors ask: Can we define "task-based image quality" for this problem? In other words, what makes a photo "good enough" to yield an accurate count?
Methods
The authors benchmarked several distinct approaches:
- PG-Lattice: A novel, training-free spectral counter. it analyzes the 2D power spectrum of the image to identify the underlying yarn lattice. It's lightweight enough to run offline on a laptop.
- Vision-Language Models (VLMs): They tested frontier models (like GPT-6.1-sol) and open-weight models.
- Synthetic Tuning (Molmo2-4B): They fine-tuned a small, open-weight VLM (Molmo2-4B) using LoRA on 12,000 purely synthetic images. This model was never shown a real fabric image during training.
- CNNs: Standard residual networks trained to regress thread counts from image tiles.
- Image Quality Assessment (IQA): They evaluated whether standard no-reference quality metrics (like BRISQUE or NIQE) could predict how much a model would struggle with a particular photo.
Datasets
- PickGlass-TPI (New): The primary benchmark, consisting of 76 factory scenes of 44 fabric patches. Each was annotated from scratch by a textile-trained expert (the reference) and a non-expert human.
- Legacy Hand Counts: 13 hand-counted crops from a previous project used for initial design choices.
- Synthetic Dataset: A large-scale set of analytically rendered fabric images used for training the CNNs and tuning the Molmo VLM.
Key Insights and Ideas
- The "Octave Error": A recurring failure mode where models count exactly half or double the true number of threads. This happens because yarns often have sub-structures (plies) or group together in ways that look like single, thicker yarns.
- Task-Based Quality vs. Perceptual Quality: Standard image quality scores (which favor "pretty" images) do not correlate with counting accuracy. A photo can look sharp to a human but be useless for a spectral counter if it has subtle motion blur that destroys the high-frequency lattice information.
- The Reliability Gap: Even the human expert's counts varied by a median of 9% when looking at different photos of the exact same fabric patch. This suggests that the $\pm$5% industry tolerance might be impossible to guarantee from a single photo alone.
- Enhancement is Counter-Productive: Using generative AI to "enhance" or super-resolve blurry photos often makes the count worse. These models tend to hallucinate textures or "clean up" the periodic patterns that counters rely on.
Key Results
- No method met the $\pm$5% tolerance. The best-performing methods had a Mean Absolute Percentage Error (MAPE) of approximately 25%.
- Molmo2-4B (Tuned) and GPT-6.1-sol (given magnified insets) were the top performers, both significantly beating the non-expert human baseline (37.3% MAPE).
- PG-Lattice was the most consistent across re-shoots (repeating counts within 5% most often) but was highly susceptible to the "octave error," frequently halving or doubling the count.
- Capture Guidelines: The authors found that for reliable counting, a capture system needs at least 7 pixels per yarn. Anything below 3 pixels per yarn leads to a total collapse of the measurement.
Limitations and Future Work
The study is limited by its relatively small real-world dataset (one mill, one type of pick glass). The current models also struggle with complex weaves like jacquards or knits, as they primarily assume a regular lattice structure.
Future work should focus on multi-photo fusion—combining information from several shots of the same patch to resolve ambiguities—and developing better "octave-aware" loss functions to penalize factor-of-two errors more effectively. The authors also suggest that a deployed system should always show the yarns it thinks it counted, allowing a human to quickly spot and correct "half or double" errors.
Summary updated