HiAD
HiAD: A General Framework for High-Resolution Anomaly Detection(通用的高分辨率异常检测框架)
Install / Use
/learn @cnulab/HiADREADME
Current anomaly detection methods are primarily designed for low-resolution images. However, in modern industrial production, anomalies often appear as subtle and hard-to-detect defects, making them difficult to identify effectively under low-resolution conditions. To address the industry challenge of large images with small defects, we conducted a systematic study focusing on high-resolution industrial image anomaly detection. We thoroughly analyzed the key challenges of this task, established a comprehensive evaluation benchmark, and proposed HiAD, a practical and efficient high-resolution anomaly detection framework. This framework can accurately detect subtle anomalies in images ranging from 1K to 4K resolution, while ensuring fast inference speeds on mainstream consumer-grade GPUs. If you are a researcher in this field, we invite you to read our paper for more technical details.
<div align="center">| 2048 × 2048 | 4096 × 4096 | | :------------------------------: | :-------------------------------: | | <img src="assets/demo2K.gif" width="330"/> | <img src="assets/demo4K.gif" width="330"/> |
</div>News
- [09.2025]: Updated DINOv3-based Dinomaly and INP-Former.
- [01.2026]: Updated HiAD v0.2 to support online inference and deployment.
🔧 Installation
$ pip install hiad[cuda11] # for Linux with cuda11
$ pip install hiad[cuda12] # for Linux with cuda12
$ pip install hiad[cuda] # for Linux with other cuda versions
$ pip install hiad # for Windows
<sub><em>Since faiss-gpu is not supported on Windows, some features of HiAD may be limited on Windows systems.</em></sub>
📖 Tutorial
<table> <tr><td align="center"><a href='tutorial/quick_start.md'>Quick Start</a></td><td align="center">Quickly understand how HiAD works through a simple example.</td></tr> <tr><td align="center"><a href='tutorial/advanced.md'>Advanced Settings</a></td><td align="center">Learn about HiAD's advanced features.</td></tr> <tr><td align="center"><a href='tutorial/customized_detectors.md'>Custom Detector</a></td><td align="center">Integrate more anomaly detection algorithms with HiAD.</td></tr> <tr><td align="center"><a href='tutorial/online_inference.md'>Online Inference</a></td><td align="center">Efficient inference and deployment.</td></tr> </table>🚀 Datasets
| Datasets | <img src="https://huggingface.co/front/assets/huggingface_logo-noborder.svg" alt="🤗" width="20"/> Hugging Face | ☁️Google Drive | |:------:|:--------:|:-------:| | MVTec-2K | XimiaoZhang/MVTec-2K | MVTec-2K.zip | | VisA-2K | XimiaoZhang/VisA-2K | VisA-2K.zip | | MVTec-4K | XimiaoZhang/MVTec-4K | MVTec-4K.zip |
🌞 Experiments
If you would like to reproduce our experiments, please clone our repository and install:
$ git clone https://github.com/cnulab/HiAD.git
$ cd HiAD
$ pip install -e .[cuda11] # for Linux with cuda11
$ pip install -e .[cuda12] # for Linux with cuda12
$ pip install -e .[cuda] # for Linux with other cuda versions
$ pip install -e . # for Windows
Refer to data/README for dataset preparation.
The experiment scripts are located in the runs directory. Run them using the following command:
# taking PatchCore as an example, for 2 GPUs
python runs/run_patchcore.py --data_root data/MVTec-2K --category bottle --gpus 0,1
💌 Acknowledgement
If you encounter any issues during usage, feel free to open an issue and reach out to us.
If you find it useful, consider giving us a ⭐, we’d really appreciate it!
📌 Citation
@inproceedings{zhang2025towards,
title={Towards High-Resolution Industrial Image Anomaly Detection},
author={Ximiao Zhang, Min Xu, and Xiuzhuang Zhou},
year={2025},
eprint={2508.12931},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
Related Skills
node-connect
352.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
