Image Quality and the Reliability of Fabric-Density Measurement: Counting Threads from Smartphone Photos Through a Pick Glass
Organizations: Indian Institute of Technology Madras
Abstract
Thread density, the threads per inch along and across a woven fabric, is a basic specification that buyers check whenever fabric is sold. Without laboratory instruments, inspectors count it slowly, by eye, through a pick glass, a folding 10 magnifier with a one-inch window. A smartphone photo through that glass could make the check faster and leave a record. We judge such a photo by what it is used for, as in task-based image quality: it is good if the thread count from it is within 5% of the true count, a common tolerance in fabric specifications. We introduce PickGlass-TPI: 76 factory scenes of 44 fabric patches, each counted in an open annotation tool by a textile-trained annotator, whose counts are the reference. On it we benchmark frontier and open vision-language models, CNNs, counting specialists and a training-free spectral counter (PG-Lattice). No method agrees with the reference within the tolerance. The best methods are off by about a quarter: a small open model that we tuned only on synthetic images (Molmo2-4B, 25%) is level with the best frontier model, GPT-6.1-sol (27% when asked directly, 25% given four magnified close-ups of the window). Both err less than a non-expert annotator (37%), but only the tuned model also beats, on both error measures, a baseline that guesses each scene's density as the average of the others. PG-Lattice most often repeats its count within 5% across two photos of the same patch, but its misses, like GPT-6.1-sol's errors, are often a factor of two. Even the reference repeats a count across such re-shoots only to a median 9%, so one photo cannot yet be shown to meet 5%; the image quality that matters is reliability across re-shoots. Generic no-reference quality scores chosen before labeling do not rank PG-Lattice's error, and generative enhancement raises perceptual scores but does not reliably improve the count.
Figures & tables
| MAPE | % of counts | Both | ||
| Method | [95% CI] | 5% | 10% | 5% |
| Non-expert annotator | 37.3 [31, 44] | 24 | 34 | 4 |
| Leave-one-out mean | 33.2 [28, 40] | 8 | 20 | 1 |
| Log-Gabor bank | 37.7 [32, 44] | 30 | 36 | 7 |
| PG-Lattice (ours) | 34.8 [28, 41] | 28 | 39 | 6 |
| Combined (PG-Lattice + log-Gabor) | 34.4 [28, 41] | 33 | 41 | 8 |
| Re-shoots (41 pairs) | MAPE (%) | |||
| Counts from | median | 5% | 2 | against |
| (%) | (pairs) | (pairs) | reference | |
| Reference (textile-trained) | 8.9 | 12 | 2 | – |
| Non-expert annotator | 20.5 | 8 | 12 | 37.3 |
| PG-Lattice (ours) | 1.8 | 24 | 8 | 34.8 |
| Molmo2-4B + LoRA (ours) | 14.3 | 11 | 1 | 25.2 |
| Degradation, levels | Stable scenes (%) | |
|---|---|---|
| (1 u 0.001 inch) | PG-Lattice | FFT peak |
| None (clean) | 100 | 100 |
| JPEG, =50 / 20 | 96 / 83 | 96 / 88 |
| Noise, =10 / 40 | 93 / 82 | 92 / 86 |
| Shadow, 25 / 50% area | 96 / 95 | 95 / 93 |
| Glare, 5 / 30% area | 88 / 59 | 82 / 63 |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Method (P1 unless noted) | MAPE [95% CI] | 5% | 10% | s/img | $/img |
| Leave-one-out mean | 32.5 [25.6, 39.6] | 3/26 | 5/26 | – | 0 |
| PG-Lattice (CPU) | 11.6 [3.1, 23.1] | 19/26 | 21/26 | 3.5 | 0 |
| Log-Gabor bank (CPU) | 9.2 [3.9, 15.2] | 18/26 | 21/26 | 4.0 | 0 |
| FFT max near-axis peak (CPU) | 18.2 [6.0, 32.8] | 17/26 | 20/26 | 1.8 | 0 |
| CNN, synthetic only | 16.0 [10.8, 21.8] | 4/26 | 10/26 | 4.4 | 0 |
| CNN, + pseudo-labels (B0, V4) | 10.7 [7.0, 14.9] | 11/26 | 16/26 | – | 0 |
| Two annotators (A1, A2), from scratch | (TPI) | (TPI) |
|---|---|---|
| Screening r2: legacy hand count | 99 | 69 |
| answers of A1 / A2 | 97 / 99 | 69 / 68 |
| Screening a5: legacy hand count | 47 | 49 |
| answers of A1 / A2 | 46 / 48 | 50 / 49 |
| Scenes counted by both | 76 | |
| MAE between annotators | 27.75 | 25.99 |
| Non-generative degradations of the 13 hand-counted legacy crops | Generative restorations | ||||||
| PG-Lattice error, 247 crops | GPT-6.1-sol P1 | No method | PG-Lattice, within | PG-Lattice, R-LEG | IQA up | ||
| Quality signal | AUROC | AUROC, 117 | within 5%, 117 | fabric, 247 | AUROC, 191 | vs bicubic | |
| PG-Lattice confidence | 0.40 [ 0.64, 0.05] | 0.74 [0.54, 0.90] | 0.75 [0.59, 0.91] | 0.74 [0.55, 0.88] | 0.67 [0.52, 0.84] | 0.73 [0.50, 0.91] | – |
| Resolvability | 0.53 [ 0.72, 0.25] | 0.71 [0.54, 0.87] | 0.67 [0.51, 0.78] | 0.64 [0.48, 0.81] | 0.80 [0.65, 0.92] | – | – |
| Cascade gate (frozen) | 0.35 [ 0.55, 0.13] | 0.63 [0.54, 0.72] | 0.58 ∗ [0.49, 0.68] | 0.57 ∗ [0.49, 0.70] | 0.71 [0.59, 0.83] | – | – |
| BRISQUE † | 0.36 [ 0.55, 0.09] | 0.63 [0.46, 0.80] | 0.65 [0.53, 0.74] | 0.63 [0.48, 0.77] | 0.70 [0.57, 0.83] | 0.48 [0.28, 0.67] | 18/27 |
| px per yarn | area | Bayer at pitch | phone at pitch | phone + messaging |
|---|---|---|---|---|
| 2.0 | 51 / 98 | 54 / 100 | 63 / 100 | 51 / 94 |
| 2.5 | 1.5 / 41 | 29 / 66 | 38 / 74 | 2.2 / 45 |
| 3.0 | 1.3 / 14 | 2.4 / 44 | 25 / 58 | 1.7 / 20 |
| 3.5 | 0.7 / 11 | 1.3 / 29 | 2.9 / 43 | 1.3 / 17 |
| 4.0 | 0.8 / 6.2 | 1.0 / 19 | 1.2 / 25 | 0.8 / 12 |
| 5.0 | 0.4 / 4.5 | 0.8 / 16 | 0.8 / 17 | 0.5 / 9.0 |
| MAPE (%), vs. degraded | |||||||
| Set | Restoration | PG-Lattice | log-Gabor | CNN | novel-peak energy | LPIPS | MUSIQ |
| R-LEG | Degraded (LR, no restoration) | 7.6 | 12.7 | 12.4 | 0.0% | – | – |
| R-LEG | Bicubic | 301.7 (+294.1) ↑ | 13.6 (+0.9) | 12.2 (-0.2) ↓ | 9.9% | 0.44 | 34 |
| R-LEG | SwinIR-M 4 | 28.2 (+20.6) | 9.0 (-3.6) ↓ | 12.3 (-0.1) | 0.0% | 0.22 | 50 |
| R-LEG | Real-ESRGAN 4plus | 23.4 (+15.9) | 11.5 (-1.2) | 28.1 (+15.7) ↑ | 13.3% | 0.44 | 56 |
| R-LEG | SeedVR2-3B | 24.1 (+16.5) | 9.6 (-3.1) | 21.5 (+9.0) ↑ | 2.0% | 0.23 | 52 |
| MAPE | % of counts | Both | ||||
| Method | MAE | [95% CI] | 5% | 10% | 5% | Weave |
| Leave-one-out mean | 19.1 | 28.7 [24.2, 33.6] | 9 | 24 | 0 | – |
| Log-Gabor bank | 29.7 | 38.3 [33.9, 42.9] | 14 | 18 | 2 | – |
| PG-Lattice (spectral) | 26.1 | 35.1 [30.7, 39.6] | 11 | 20 | 2 | 60 |
| Combined (PG-Lattice + log-Gabor) | 25.9 | 34.8 [30.3, 39.2] | 13 | 19 | 2 | – |
| PG-Lattice, ruler crop 75/76 | 26.9 | 35.9 [31.2, 40.8] | 11 | 20 | 2 | – |
| MAPE (%) [95% CI] against | against A2 (rule 5) | against the mean (rule 5) | ||||||
| Method | A1 | A2 (Tab. 1) | mean ( Tab. S6 ) | mean, undisputed (rule 2) | 0.5 (%) | 0.5 (%) | ||
| The other annotator | 40.9 [32, 51] | 37.3 [31, 44] | – | – | 0.52 | 47 | – | – |
| Leave-one-out mean | 41.2 [35, 48] | 33.2 [28, 40] | 28.7 [24, 34] | 25.6 [21, 30] | 0.43 | 32 | 0.38 | 27 |
| Log-Gabor bank | 41.6 [37, 46] | 37.7 [32, 44] | 38.3 [34, 43] | 35.0 [29, 41] | 0.77 | 55 | 0.77 | 60 |
| PG-Lattice (spectral) | 41.7 [36, 48] | 34.8 [28, 41] | 35.1 [31, 40] | 29.9 [25, 35] | 0.57 | 43 | 0.59 | 50 |
| Combined (PG-Lattice + log-Gabor) | 41.4 [36, 47] | 34.4 [28, 41] | 34.8 [30, 39] | 29.6 [24, 35] | 0.57 | 43 | 0.58 | 50 |
| Scene | ax | A1 | A2 | A2/A1 | PG-Lattice | GPT | Scene | ax | A1 | A2 | A2/A1 | PG-Lattice | GPT |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 91 | 44 | 0.48 | 45 | 44 | 55 | 52 | 156 | 2.99 | 26 | 52 | ||
| 3 | 101 | 60 | 0.59 | 62 | 96 | 55 | 41 | 123 | 3.00 | 20 | 41 | ||
| 3 | 124 | 68 | 0.55 | 70 | 72 | 56 | 54 | 159 | 2.94 | 27 | 52 | ||
| 4 | 132 | 64 | 0.48 | 64 | 62 | 56 | 41 | 121 | 2.95 | 21 | 40 | ||
| 4 | 135 | 67 | 0.50 | 129 | 70 | 59 | 106 | 59 | 0.55 | 120 | 60 | ||
| 5 | 99 | 49 | 0.49 | 51 | 50 | 59 | 54 | 79 | 1.46 | 19 | 40 |
Image Quality Assessment
Image Quality Assessment measures perceived image quality, distortion, and usefulness with computational metrics and human-aligned evaluation.
See all 190 papers