Install the required packages:
pip install -r requirements.txt
Download the checkpoint for ViT-H SAM model and put in the checkpoint folder.
Run the script for few-shot protocal:
python evaluation.py --module_path model_ensemble_few_shot --category CATEGORY --dataset_path DATASET_PATH
Run the script to compute coreset for full-data scenarios:
python compute_coreset.py --module_path model_ensemble --category CATEGORY --dataset_path DATASET_PATH
Run the script for full-data protocol:
python evaluation.py --module_path model_ensemble --category CATEGORY --dataset_path DATASET_PATH
We are grateful for the following awesome projects when implementing LogSAD:
If you find our paper is helpful in your research or applications, generously cite with
@inproceedings{zhang2025logsad,
title={Towards Training-free Anomaly Detection with Vision and Language Foundation Models},
author={Jinjin Zhang, Guodong Wang, Yizhou Jin, Di Huang},
year={2025},
booktitle={IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
}