Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

298 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AnomaVision banner

🚀 AnomaVision: Edge-Ready Visual Anomaly Detection

Python 3.9–3.12 PyTorch 2.0+ ONNX Ready OpenVINO Ready TorchScript TensorRT Quantization

PyPI Version PyPI Downloads License: MIT

🔥 Lightweight, fast, and production-ready anomaly detection — powered by PaDiM. Deploy anywhere: edge devices, servers, or the cloud.


✨ Features

  • 📦 Multi-backend exports: PyTorch, ONNX, TorchScript, OpenVINO, TorchRT,INT8 Quantization
  • 🎨 Visualizations: anomaly heatmaps, bounding boxes, ROC curves
  • 🖥️ Unified Python + CLI workflows
  • 🌍 Edge-first design with compact .pth models
  • C++ inference runtime for edge deployment

🆚 Why AnomaVision over Anomalib?

  • 3× faster inference on CPU (MVTec & Visa benchmarks)
  • 📦 Smaller models (30 MB vs 40 MB) with lower memory usage
  • 🎯 Higher AUROC across most classes on both MVTec AD and Visa datasets
  • 🌍 Edge-first design → optimized for ONNX, TorchScript, and OpenVINO
  • 🛡️ Production-ready with clean API, CLI, and deployment options

Speed Comparison (CPU Mode)

Metric 🟢 AnomaVision 🔵 Anomalib 🔺 Difference 🏆 Winner
🧮 Training Time (s) 8.38 13.07 -35.9% 🟢 AV
🚀 Inference FPS 43.41 13.03 +233% 🟢 AV
⏱️ ms / image 23.0 76.7 -70% 🟢 AV

AnomaVision trains faster, infers over 3× quicker, and processes each image in 70% less time — making it ideal for real-time CPU deployment.

Speed Comparison (CUDA Mode)

Metric 🟢 AnomaVision 🔵 Anomalib 🔺 Difference 🏆 Winner
🧮 Training Time (s) 8.38 13.07 -35.9% 🟢 AV
🚀 Inference FPS 547.46 355.72 +53.9% 🟢 AV
⏱️ ms / image 1.83 2.81 -35.0% 🟢 AV

AnomaVision runs over 1.5× faster — ideal for real-time edge inspection.

👉 See detailed results in Benchmarks.

👉 Download: AnomaVision vs Anomalib — A Comprehensive Performance Analysis (PDF)


🖥️ C++ Inference with ONNX

AnomaVision isn’t just Python 🚀 — it also provides a C++ implementation for ONNX Runtime + OpenCV.

  • 🖼️ Full pipeline: preprocessing → inference → postprocessing → visualization
  • 📦 Modular design (Config, Preprocessor, ONNXModel, Postprocessor, Visualizer, App)
  • 🌍 Perfect for edge devices and production environments without Python

👉 See full guide: Quickstart — C++ Inference


📚 Documentation

📖 Full docs are available in the /docs folder.


Installation

Quick Install: using Pyenv and Poetry

git clone https://github.com/DeepKnowledge1/AnomaVision.git
cd AnomaVision
poetry install
poetry shell

From PYPI: PYPI Video

pip install AnomaVision

➡ For detailed installation options, see Installation Guide.

⚡ Quick Example

Train with a config file:

python train.py --config config.yml

## Save:
# Full model → padim_model.pt
# Compact stats-only model → padim_model.pth
# Config snapshot → config.yml

Run detection:

python detect.py --config config.yml

Evaluate performance:

python eval.py --config config.yml

Export to ONNX:

python export.py --config export_config.yml

➡ For more examples, see Quick Start.


📊 Benchmarks (Summary)

MVTec AD (15 classes)

  • Image AUROC: AV 0.85 ↑ vs AL 0.81
  • Pixel AUROC: AV 0.96 ↑ vs AL 0.94
  • FPS: AV 43 ↑ vs AL 13

Visa (12 classes)

  • Image AUROC: AV 0.81 ↑ vs AL 0.78
  • Pixel AUROC: AV 0.96 ↑ vs AL 0.95
  • FPS: AV 45 ↑ vs AL 13

📊 Full tables & plots → Benchmarks


🤝 Contributing

We welcome contributions!


🙏 Acknowledgments

AnomaVision is built on top of the excellent Anodet repository. We thank the original authors for their contributions to open-source anomaly detection research, which laid the foundation for this work.


📜 Citation

If you use AnomaVision in your research, please cite:

@software{anomavision2025,
  title={AnomaVision: Edge-Ready Visual Anomaly Detection},
  author={DeepKnowledge Contributors},
  year={2025},
  url={https://github.com/DeepKnowledge1/AnomaVision},
}

💬 Community & Support


👉 Start with Quick Start and build your first anomaly detection pipeline in 5 minutes!

About

Optimized PaDim based on Anodet

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages