Efficient Compression of Vision–Language Patch Features for Zero-Shot Segmentation
摘要
Large-scale vision–language models such as CLIP and DINOv2 produce high-dimensional patch features that enable powerful zero-shot segmentation, but their memory and computational demands limit deployment in real-time and resource-constrained scenarios. We conduct a study of unsupervised compression for patch-level vision–language features, benchmarking six approaches: principal component analysis (PCA), Johnson–Lindenstrauss random projection, learned linear projection, shallow and deep auto-encoders, and similarity-preserving knowledge distillation. Across multiple types of training data and both DINOv2 and CLIP backbones, we find that parameter-free PCA offers the best speed–accuracy trade-off for most settings, with 32-dimensional PCA retaining up to 90% of segmentation quality for DINOv2 at a fraction of the computational cost. Importantly, compressibility depends on the training data: DINOv2 features are more compressible when compressors are trained on text embeddings, while CLIP features are more compressible when trained on image patches. While shallow auto-encoders can achieve the highest accuracy, they are prone to overfitting and less robust to distribution shifts compared to PCA. Our results provide actionable guidelines for selecting compression methods and establish PCA as a robust baseline for efficient zero-shot segmentation. The code is available at https://github.com/Titrom025/FeatureCompression .