Advanced Anomaly Detection Environment - Deep learning library for state-of-the-art anomaly detection algorithms
Project description
AnomaVision: Edge-Ready Visual Anomaly Detection
Lightweight, fast, and production-ready anomaly detection powered by PaDiM. Deploy anywhere: edge devices, servers, or the cloud.
Overview
AnomaVision delivers state-of-the-art visual anomaly detection optimized for real-world deployment. Built for speed and efficiency, it outperforms existing solutions while maintaining a small footprint perfect for edge devices.
Key Features
- ๐ฏ Superior Performance โ Higher AUROC across MVTec AD and Visa datasets
- โก 3ร Faster Inference โ Optimized for both CPU and GPU deployment
- ๐ฆ Smaller Models โ 30MB models with lower memory footprint
- ๐ Multi-Backend Export โ PyTorch, ONNX, TorchScript, OpenVINO, TensorRT, INT8 Quantization
- ๐ฅ๏ธ Production Ready โ Python API, CLI tools, C++ runtime, and REST API
- ๐จ Rich Visualizations โ Heatmaps, bounding boxes, and ROC curves
- ๐ฎ Interactive Demo โ Streamlit web interface for instant testing
Why Choose AnomaVision?
Performance Advantages Over Anomalib
CPU Inference:
| Metric | AnomaVision | Anomalib | Improvement |
|---|---|---|---|
| Training Time (s) | 8.38 | 13.07 | -35.9% |
| Inference FPS | 43.41 | 13.03 | +233% |
| ms / image | 23.0 | 76.7 | -70% |
GPU Inference (CUDA):
| Metric | AnomaVision | Anomalib | Improvement |
|---|---|---|---|
| Training Time (s) | 8.38 | 13.07 | -35.9% |
| Inference FPS | 547.46 | 355.72 | +53.9% |
| ms / image | 1.83 | 2.81 | -35.0% |
Accuracy:
- MVTec AD: Image AUROC 0.85 vs 0.81 | Pixel AUROC 0.96 vs 0.94
- Visa: Image AUROC 0.81 vs 0.78 | Pixel AUROC 0.96 vs 0.95
๐ก Download Full Performance Analysis (PDF) | Detailed Benchmarks
Quick Start
Installation
Using Poetry (Recommended):
git clone https://github.com/DeepKnowledge1/AnomaVision.git
cd AnomaVision
poetry install
poetry shell
Using pip:
pip install AnomaVision
๐ Detailed Installation Guide
Basic Usage
Training:
python train.py --config config.yml
# Outputs: padim_model.pt, padim_model.pth, config.yml
Detection:
python detect.py --config config.yml
Evaluation:
python eval.py --config config.yml
Export:
python export.py --config export_config.yml
๐ Complete Quick Start Guide
Interactive Demo
Real-time anomaly detection with explainable heatmaps
Experience AnomaVision through our intuitive web interface:
- โก Real-time anomaly detection
- ๐ฏ Explainable AI with visual heatmaps
- ๐ Interactive threshold controls
- ๐ Batch processing support
- ๐พ Export results as JSON
- ๐ฎ No coding required
Launch the Demo
# Start FastAPI backend
uvicorn apps.api.fastapi_app:app --host 0.0.0.0 --port 8000
# Launch Streamlit demo (new terminal)
streamlit run apps/ui/streamlit_app.py -- --port 8000
Open http://localhost:8501 in your browser.
๐ Streamlit Demo Guide
Deployment Options
| Method | Best For | Key Benefits |
|---|---|---|
| ๐จ Streamlit Demo | Testing, demonstrations | Zero-code UI, instant feedback |
| ๐ FastAPI Backend | Production APIs | REST endpoints, scalable |
| ๐ฅ๏ธ C++ Runtime | Edge devices | No Python dependency, ultra-fast |
| ๐ป Python CLI | Batch processing | Scriptable, configurable |
| ๐ฆ PyPI Package | Custom integration | Import as library |
REST API Example
import requests
with open("test_image.jpg", "rb") as f:
response = requests.post(
"http://localhost:8000/predict",
files={"file": f},
params={"include_visualizations": True}
)
result = response.json()
print(f"Anomaly Score: {result['anomaly_score']}")
print(f"Is Anomaly: {result['is_anomaly']}")
๐ FastAPI Setup Guide
C++ Inference
Deploy without Python using our ONNX Runtime + OpenCV implementation:
- ๐ผ๏ธ Complete pipeline from preprocessing to visualization
- ๐ฆ Modular architecture
- ๐ Perfect for edge devices
๐ C++ Inference Guide
Use Cases
- ๐ญ Manufacturing QC โ Real-time defect detection on production lines
- ๐ฌ Medical Imaging โ Anomaly identification in X-rays, MRIs, microscopy
- ๐๏ธ Infrastructure โ Crack and corrosion detection
- ๐ฑ PCB Inspection โ Soldering defects and component issues
- ๐พ Agriculture โ Plant disease and crop monitoring
- ๐ Automotive โ Paint defects and assembly quality
Documentation
- ๐ Installation
- ๐ Quick Start
- ๐จ Streamlit Demo
- ๐ FastAPI Backend
- ๐ป CLI Reference
- ๐ API Reference
- โ๏ธ Configuration
- ๐ Benchmarks
- ๐ง Troubleshooting
- ๐ค Contributing
Community & Support
- ๐ฌ GitHub Discussions
- ๐ Issue Tracker
- ๐ง Email Support
Citation
@software{anomavision2025,
title={AnomaVision: Edge-Ready Visual Anomaly Detection},
author={DeepKnowledge Contributors},
year={2025},
url={https://github.com/DeepKnowledge1/AnomaVision},
}
Acknowledgments
Built on the foundation of Anodet. We thank the original authors for their contributions to open-source anomaly detection research.
License
Released under the MIT License.
Ready to get started? Follow our Quick Start Guide and build your first anomaly detection pipeline in 5 minutes!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file anomavision-3.1.0.tar.gz.
File metadata
- Download URL: anomavision-3.1.0.tar.gz
- Upload date:
- Size: 52.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.11.0 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f115278e6717955dd967497a08359ba46b32abdd464687df1f1b4b503dad2070
|
|
| MD5 |
0afd485b5e82696ea5470941bcc906d4
|
|
| BLAKE2b-256 |
27936fd51e0c2e92cfbc14d1d67c341468b79bda02647ff76481a7d0e48a3d6a
|
File details
Details for the file anomavision-3.1.0-py3-none-any.whl.
File metadata
- Download URL: anomavision-3.1.0-py3-none-any.whl
- Upload date:
- Size: 72.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.11.0 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
074d557e59b10f55a6709575ccf3bf042401519fdf0770c4bc24616a55d8df79
|
|
| MD5 |
fcc7f3d949fad6a15762391160c38be1
|
|
| BLAKE2b-256 |
e085fb44b35bad26ba2fcf9eef9921403276a27adc71b01e043d02893824aeec
|