Lean GLASS: Efficient Edge-Deployable Visual Anomaly Detection with a MobileNetV2 Backbone and Learnable Feature-Stream Gating
Muhammad BilalVisual anomaly detection has achieved very high accuracy on standard benchmarks, yet state-of-the-art synthesis-based detectors such as GLASS rely on heavy backbones (e.g., WideResNet-50) that are ill-suited for deployment on resource-constrained edge platforms. This study investigates whether a lightweight convolutional neural network (CNN) backbone can retain such accuracy at much lower computational cost. To this end, the heavy backbone within the GLASS anomaly detection framework is replaced with the lightweight MobileNetV2 backbone. The experimental findings demonstrate that this particular choice of feature representation, namely the expanded depthwise features of MobileNetV2 rather than compressed bottleneck outputs, recovers the accuracy otherwise lost by a naive lightweight substitution. A lightweight learnable per-stream gating mechanism is further introduced, adaptively weighting feature streams on a per-category basis and yielding a measurable and consistent improvement at negligible parameter cost. On the MVTec AD benchmark, the proposed model attains a 0.992 mean image-level AUROC, matching or exceeding the ResNet-18 configuration reported by the GLASS authors under an identical training budget, while using 3.3× fewer backbone parameters and 4.7× fewer FLOPs. On a Jetson Nano, it runs 2.4× faster per frame than the ResNet-18 baseline (approximately 19 frames per second), confirming that the efficiency gains translate to usable speed on low-cost edge hardware. The findings are further corroborated on the more challenging VisA benchmark, where the proposed model matches the ResNet-18 configuration on image-level detection and improves pixel-level AUROC. Additionally, the proposed approach experimentally generalizes without modification to two further datasets from different domains, i.e., concrete crack and pharmaceutical pill inspection. A systematic negative result is additionally reported, demonstrating that the handcrafted complementary feature streams (PCA reconstruction-residual and wavelet high-frequency descriptors) do not improve accuracy, and the residual performance gap on difficult categories is attributed to the training schedule rather than to feature representation. This study therefore provides experimental evidence that careful backbone-feature selection, rather than architectural augmentation, is the key to efficient edge-deployable anomaly detection at a minimal cost in accuracy. These findings indicate that high-accuracy visual anomaly detection can be brought within reach of low-cost embedded hardware, lowering the barrier to automated inspection in smaller-scale industrial settings where a dedicated computing workstation is impractical. The source code is made publicly available to support this use.