LUMIN: Lightweight Universal Manufacturing Inspection Network for Anomaly Detection
Organizations: Intelligent Precision Instrument, Shenzhen, Guangdong, China
Abstract
Industrial anomaly detection faces two engineering bottlenecks: memory bank construction latency and inference efficiency. Traditional sampling algorithms (Farthest Point Sampling, K-Means, etc.) rely on numerous backbone forward passes and iterative distance computations, with construction times ranging from minutes to hours; heavy computation components such as multi-scale feature extraction struggle to meet the millisecond-level real-time requirements of production lines. This paper focuses on sampling efficiency and inference optimization for industrial deployment with two core contributions: (1) PSP (Plugin Sampler Pipeline)---a four-stage adaptive memory bank sampling pipeline based on 18-dimensional pixel metadata and five complementary visual plugins. PSP completes all sampling with zero backbone forward passes; coarse filtering is sub-second numerical sorting, and metadata extraction is a one-time offline cost. PSP supports progressive deployment and incremental updates. (2) Two engineering optimization strategies---parallel memory bank similarity computation (reducing inference memory and latency by over 95%) and stratified pixel sampling for large-scale evaluation (reducing computation time by 20 while keeping metrics stable). As a vehicle for validation, we introduce LUMIN (Lightweight Universal Manufacturing Inspection Network) with extreme segmentation-head compression, systematically exploring the accuracy-efficiency frontier against strong baselines. Experiments on five benchmarks demonstrate that PSP matches state-of-the-art sampling accuracy at near-random construction cost (341 faster than FPS), while inference optimizations reduce evaluation time by 20 with negligible accuracy loss.
Figures & tables
| Component | UniADet | UniADet_seg | LUMIN |
|---|---|---|---|
| Fusion | (Post-) Scores | (Post-) Scores | (Pre-) Features |
| Segmentation Head | Multiple | Multiple | Single |
| Trainable Parameters | 16K ( ) | 8K ( ) | 2K ( ) |
| Size of .pth File | 72KB | 37KB | 11KB |
| Category | D | Description |
|---|---|---|
| Basic attributes | 3 | width, height, aspect ratio |
| Color statistics | 6 | mean and standard deviation of RGB three channels |
| Gradient magnitude | 3 | Sobel gradient mean, standard deviation, P90 quantile |
| Local entropy | 2 | mean and standard deviation over 5 5 window |
| Frequency-domain energy | 3 | FFT low/mid/high-frequency energy ratios |
| Global contrast | 1 | RMS mean of RGB channel variances |
| Rule | If | Then |
|---|---|---|
| R1 | High RGB variance | ColorPlugin |
| R2 | High gradient variance | TexturePlugin (HOG) |
| R3 | High local entropy variance | TexturePlugin (LBP) |
| R4 | High scale/contrast variance | ResizePatchPlugin |
| R5 | High high-frequency energy | FrequencyPlugin |
| R6 | High brightness dynamic range | ContrastPlugin |
| Parameter | Default | Stage | Description |
| work_size | 256 | Stage 1 | Image resize resolution for metadata extraction. The 16–512 range has minimal impact on P-AUPR (fluctuation 0.2%); 256 balances efficiency and statistical stability. |
| coarse_keep_ratio | 5.0 | Stage 2 | Retention ratio for coarse filtering: . At , retains 100 candidates. Setting to 1.0 enables zero-overhead minimal sampling. |
| prior_strength | 0.3 | Stage 3 | Fusion ratio between dataset prior and adaptive score; constrains adaptive weight fluctuation and improves cross-scenario stability. |
| n_clusters | 0 | Stage 4 | Number of clustering constraints after fusion scoring. 0 disables clustering, selecting Top- directly by composite score for stable industrial scenarios. |
| manual_weights | None | Stage 3/4 | Manually specified five-plugin fusion weights. If not None, overrides adaptive weights for on-demand plugin priority customization. |
| Datasets | Metrics | Anomaly -CLIP | VisualAD (CLIP) | UniADet (CLIP) | UniADet (DINOv3) | LUMIN (CLIP) | LUMIN (DINOv3) |
|---|---|---|---|---|---|---|---|
| MVTec | AUROC | 72.6/78.0 | 88.1/89.8 | 89.7 / 90.0 | 91.6 / 90.4 | 56.3/78.6 | 87.4/89.3 |
| MVTec | AUPR | 86.8/ 77.8 | 94.8/40.1 | 95.2 /43.5 | 96.2 /46.7 | 79.0/12.2 | 94.2/ 47.7 |
| MVTec | F1max | 87.8/18.3 | 91.4/42.6 | 91.6 /44.8 | 93.3 / 47.2 | 84.6/18.0 | 88.8/ 47.7 |
| VisA | AUROC | 40.4/83.6 | 47.7/83.9 | 86.9 /94.2 | 89.8 / 95.6 | 58.4/80.5 | 79.8/ 95.6 |
| VisA | AUPR | 11.2/ 84.0 | 17.0/2.8 | 61.3 /21.9 | 69.6 / 25.1 | 21.5/0.9 | 53.6/22.2 |
| VisA | F1max | 22.1/2.5 | 25.8/4.2 | 58.9 /26.4 | 66.9 / 30.1 | 28.5/2.0 | 52.6/ 27.0 |
| Datasets | Shots | Metrics | UniADet (CLIP) | UniADet (DINOv3) | LUMIN (CLIP) | LUMIN (DINOv3) |
|---|---|---|---|---|---|---|
| MVTec | 1 | AUROC | 93.2 /94.8 | 93.5 / 96.6 | 91.9/92.0 | 93.1/ 96.2 |
| AUPR | 96.9 /52.1 | 97.1 / 56.9 | 95.8/48.7 | 96.3/ 57.1 | ||
| F1max | 92.8/53.0 | 93.0 / 56.6 | 94.0 /52.0 | 92.3/ 55.6 | ||
| 2 | AUROC | 93.4/95.2 | 93.8 / 96.9 | 95.0 /92.3 | 93.3/ 96.5 | |
| AUPR | 97.1 / 53.5 | 97.3 / 57.6 | 97.0/52.0 | 96.4/ 57.6 | ||
| F1max | 92.9/54.5 | 93.4 / 57.4 | 94.7 /54.3 | 92.4/ 55.9 |
| shot | Metrics | Anomaly -CLIP | VisualAD | UniADet (CLIP) | UniADet (DINOv3) | LUMIN (CLIP) | LUMIN (DINOv3) |
|---|---|---|---|---|---|---|---|
| model_mem | 1.64/1.64 | 1.59/1.59 | 1.60/1.60 | 1.14/1.14 | 1.60/1.60 | 1.14/1.14 | |
| 0 | infer_mem | 0.39/3.20 | 1.98/2.00 | 0.11/0.83 | 0.14/1.09 | 0.10/0.78 | 0.14/1.09 |
| 1 | infer_mem | — | — | 0.16/0.87 | 0.17/1.12 | 0.15/0.83 | 0.17/1.12 |
| 2 | infer_mem | — | — | 0.20/0.92 | 0.20/1.15 | 0.19/0.87 | 0.20/1.15 |
| 4 | infer_mem | — | — | 0.29/1.00 | 0.26/1.22 | 0.28/0.96 | 0.26/1.22 |
| 0 | time/img | 927/894 | 129/115 | 93/88 | 77/74 | 92/88 | 75/75 |
| max_pixel | ratio | time | I-AUROC | P-AUROC | P-AUPR | P-F1max |
|---|---|---|---|---|---|---|
| 50,000 | 0.23% | 1.0 | 98.65 | 97.75 | 76.33 | 69.31 |
| 100,000 | 0.46% | 1.0 | 98.65 | 97.78 | 76.61 | 69.49 |
| 200,000 | 0.92% | 1.1 | 98.65 | 97.71 | 75.69 | 68.70 |
| 2,000,000 | 9.19% | 2.3 | 98.65 | 97.71 | 75.71 | 68.66 |
| 21,800,000 | 100% | 20.1 | 98.65 | 97.70 | 75.71 | 68.66 |
| work_size | meta_time | mem_build_time | total_time | P-AUPR |
|---|---|---|---|---|
| 512 | 175.2 | 24.1 | 199.3 | 57.99 |
| 256 | 126.7 | 23.9 | 150.6 | 57.95 |
| 128 | 120.4 | 24.6 | 145.0 | 57.91 |
| 64 | 114.5 | 23.5 | 138.0 | 58.09 |
| 32 | 113.3 | 23.5 | 136.8 | 57.99 |
| 16 | 113.1 | 23.9 | 137.0 | 58.04 |
| ratio | meta_time | feat_extract _time | filter_time | mem_build _time | total_time | P-AUPR |
|---|---|---|---|---|---|---|
| 1.0 | 114.6 | 0 | 0 | 3.12 | 117.7 | 58.24 |
| 2.0 | 114.6 | 7.63 | 2.43 | 13.31 | 127.9 | 58.01 |
| 3.0 | 114.3 | 11.35 | 2.06 | 16.71 | 131.2 | 58.02 |
| 5.0 | 114.5 | 18.26 | 2.19 | 23.50 | 138.0 | 58.09 |
| 8.0 | 115.6 | 30.00 | 2.32 | 35.70 | 151.3 | 58.15 |
| 10.0 | 114.6 | 37.32 | 2.23 | 42.91 | 157.5 | 58.05 |
| Category | 5-plugin | 2-plugin | |
|---|---|---|---|
| bottle | 77.67 | 77.75 | +0.08 |
| cable | 27.21 | 27.05 | -0.16 |
| capsule | 51.23 | 51.23 | +0.00 |
| carpet | 80.68 | 80.71 | +0.03 |
| grid | 56.22 | 56.25 | +0.03 |
| hazelnut | 64.64 | 64.41 | -0.23 |
| Category | ratio=1 | ratio=5 | ratio=10 | max-min |
|---|---|---|---|---|
| bottle | 77.66 | 77.67 | 77.67 | 0.01 |
| cable | 27.07 | 27.21 | 27.25 | 0.18 |
| capsule | 51.07 | 51.23 | 51.40 | 0.33 |
| carpet | 80.64 | 80.68 | 80.61 | 0.07 |
| grid | 56.17 | 56.22 | 56.32 | 0.15 |
| hazelnut | 64.22 | 64.64 | 64.25 | 0.42 |
| Metric | CLIP 2L | CLIP 4L | CLIP 5L | DINOv3 2L | DINOv3 4L | DINOv3 5L | |
|---|---|---|---|---|---|---|---|
| 0 | I-AUROC | 53.7 / 85.4 | 54.4 / 87.0 | 51.9 / 87.6 | 81.6 / 86.0 | 82.2 / 85.0 | 81.4 / 86.2 |
| 0 | I-AUPR | 51.3 / 82.6 | 51.2 / 82.6 | 49.9 / 82.5 | 71.1 / 81.1 | 71.6 / 76.9 | 70.7 / 77.6 |
| 0 | I-F1max | 58.5 / 80.3 | 58.3 / 80.9 | 57.6 / 80.3 | 71.0 / 78.2 | 71.6 / 76.8 | 71.0 / 77.2 |
| 0 | P-AUROC | 79.8 / 94.5 | 79.1 / 94.3 | 78.4 / 94.7 | 94.9 / 95.4 | 94.5 / 95.3 | 94.9 / 96.0 |
| 0 | P-AUPR | 4.4 / 31.8 | 4.2 / 32.0 | 4.0 / 32.9 | 34.5 / 35.9 | 34.8 / 35.5 | 34.5 / 37.8 |
| 0 | P-F1max | 8.2 / 36.3 | 7.6 / 36.8 | 7.5 / 37.5 | 38.5 / 39.3 | 39.0 / 39.1 | 38.6 / 41.1 |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Methods | =0 | =1 | =4 | =10 | =20 | mean_aupr / sum_time |
|---|---|---|---|---|---|---|
| RS (seed 0) | 48.56/0 | 56.73/1.10 | 57.94/3.06 | 58.48/7.55 | 58.64/14.96 | 57.95/26.67 |
| RS (seed 42) | 48.56/0 | 56.60/1.11 | 57.85/3.05 | 58.24/7.48 | 58.48/15.21 | 57.79/26.85 |
| FPS_FF | 48.56/0 | 56.71/2.1 | 57.90/745.3 | 58.23/2300.5 | 58.34/5112.8 | 57.80/8160.6 |
| FPS_MF | 48.56/0 | 56.71/2.1 | 57.86/712.5 | 58.08/2110.9 | 58.33/4367.7 | 57.74/7193.2 |
| SFPS_FF | 48.56/0 | 56.75/246.2 | 58.02/275.5 | 58.24/512.1 | 58.46/1436.7 | 57.87/2470.5 |
| SFPS_MF | 48.56/0 | 56.75/242.3 | 57.93/242.0 | 58.33/246.7 | 58.57/251.5 | 57.90/982.5 |
| Abbreviation | # feature extractions | Filtering computation complexity | Storage overhead | Core description |
|---|---|---|---|---|
| RS | 0 | O(N) shuffle | None | No selection logic, lowest cost |
| FPS_FF | N | O(K N H W D) | O(N H W D) | High accuracy but poor deployability |
| FPS_MF | N | O(K N D) | O(N D) | Mean pooling reduces complexity |
| SFPS_FF | K N | O(K 2 N H W D) | O(K H W D) | Streaming avoids storage, sacrifices time |
| SFPS_MF | K N | O(K 2 N D) | O(K D) | Streaming with mean pooling |
| KM_FF | N | O(K N I) | O(N H W D) | High-dimensional clustering, high cost |