VAAS (Vision-Attention Anomaly Scoring) is a dual-module vision framework for image anomaly detection and localisation.
Project description
VAAS — Vision-Attention Anomaly Scoring
VAAS is a research-driven, inference-first dual-module vision framework for image anomaly detection and localisation.
It integrates global attention-based reasoning with patch-level consistency analysis to produce:
- A continuous hybrid anomaly score (
S_H) - Dense spatial anomaly maps
- Interpretable attention overlays
The output is spatially grounded, explainable, and suitable for research and prototyping workflows.
This package provides the runtime inference pipeline only.
Pretrained model weights are hosted separately on Hugging Face.
Research Paper | GitHub | Hugging Face Models
Installation
pip install vaas
Optional dependency: PyTorch
VAAS uses lazy loading for PyTorch.
- Importing
vaasdoes not require PyTorch - PyTorch is required only when running inference
If PyTorch is not installed, VAAS will raise a clear runtime error when inference is invoked.
Install PyTorch (CPU, CUDA, or ROCm) from:
https://pytorch.org/get-started/locally/
Quick Start
from vaas.inference.pipeline import VAASPipeline
from PIL import Image
pipeline = VAASPipeline.from_pretrained(
repo_id="OBA-Research/vaas",
device="cpu",
alpha=0.5,
model_variant="v2-base-df2023" # v2-medium-df2023 and v2-large-df2023 are also available
)
image = Image.open("image.jpg").convert("RGB")
result = pipeline(image)
print(result["S_H"])
Output format
{
"S_F": float,
"S_P": float,
"S_H": float,
"anomaly_map": ndarray # shape (224, 224)
}
Visualisation
Generate qualitative visual explanations combining:
- Patch-level anomaly heatmaps
- Global attention overlays
- A hybrid anomaly score gauge
pipeline.visualize(
image="image.jpg",
save_path="vaas_visualization.png",
mode="all",
threshold=0.5,
)
Model Variants
VAAS models are versioned by architecture, scale, and dataset.
Current (v2)
- v2-base-df2023
- v2-medium-df2023
- v2-large-df2023
Legacy (v1)
- v1-base-df2023
- v1-medium-df2023
- v1-large-df2023
Each variant is stored as a versioned branch on Hugging Face.
See:
Reproducibility
Each published model variant contains structured metadata:
- Architecture version
- Dataset
- Dataset fraction
- Runtime defaults
- Backbone configuration
This ensures reproducible loading and transparent model lineage.
Intended Use
VAAS is intended for:
- Image anomaly detection
- Visual integrity assessment
- Explainable inspection of irregular regions
- Research on attention-based anomaly scoring
- Digital forensics research
- Prototyping anomaly-aware vision systems
Supports CPU-only inference and GPU acceleration.
Limitations
- Trained on a single dataset
- Does not classify anomaly types
- Performance may degrade on out-of-distribution imagery
VAAS should not be used as a standalone decision-making system in high-stakes applications.
Citation
If you use VAAS in your research, please cite both the software and the associated paper.
Software Citation
@software{vaas,
title = {VAAS: Vision-Attention Anomaly Scoring},
author = {Bamigbade, Opeyemi and Scanlon, Mark and Sheppard, John},
year = {2025},
publisher = {Zenodo},
doi = {10.5281/zenodo.18064355},
url = {https://doi.org/10.5281/zenodo.18064355}
}
Paper Citation
@article{BAMIGBADE2026302063,
title = {VAAS: Vision-Attention Anomaly Scoring for image manipulation detection in digital forensics},
journal = {Forensic Science International: Digital Investigation},
volume = {56},
pages = {302063},
year = {2026},
note = {DFRWS EU 2026 - Selected Papers from the 13th Annual Digital Forensics Research Conference Europe},
issn = {2666-2817},
doi = {https://doi.org/10.1016/j.fsidi.2026.302063},
url = {https://www.sciencedirect.com/science/article/pii/S266628172600020X},
author = {Opeyemi Bamigbade and Mark Scanlon and John Sheppard},
keywords = {Digital forensics, Image manipulation detection, Tamper localisation, Explainable AI, Vision transformers, Segmentation, Attention mechanisms, Anomaly scoring},
abstract = {Recent advances in AI-driven image generation have introduced new challenges for verifying the authenticity of digital evidence in forensic investigations. Modern generative models can produce visually consistent forgeries that evade traditional detectors based on pixel or compression artefacts. Most existing approaches also lack an explicit measure of anomaly intensity, which limits their ability to quantify the severity of manipulation. This paper introduces Vision-Attention Anomaly Scoring (VAAS), a novel dual-module framework that integrates global attention-based anomaly estimation using Vision Transformers (ViT) with patch-level self-consistency scoring derived from segmentation embeddings. The hybrid formulation provides a continuous and interpretable anomaly score that reflects both the location and degree of manipulation. Evaluations on the DF2023 and CASIA v2.0 datasets demonstrate that vaas achieve competitive F1 and IoU performance, while enhancing visual explainability through attention-guided anomaly maps. The framework bridges quantitative detection with human-understandable reasoning, supporting transparent and reliable image integrity assessment. The source code for all experiments and corresponding materials for reproducing the results are available open source.}
}
Contributing
We welcome contributions that improve the usability, robustness, and extensibility of VAAS.
See: https://github.com/OBA-Research/VAAS/blob/main/CONTRIBUTING.md
License
MIT License
Maintainers
OBA-Research
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 vaas-0.2.0.tar.gz.
File metadata
- Download URL: vaas-0.2.0.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf0d11eb7ddbc8f27b117a5fa133aed11b1a7303aabcd6e1543c31c99eb5c1d0
|
|
| MD5 |
4f4759b04b7289467eb0cbaf22579b59
|
|
| BLAKE2b-256 |
cd0fa5c33432f705a421220c3d23861e28d46e0e168b3b1dd8afd907953362e3
|
File details
Details for the file vaas-0.2.0-py3-none-any.whl.
File metadata
- Download URL: vaas-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccd467c2cd0b21203010701e69b3f7da0dc1a03c2ed6b6ebcdcf903877ea2888
|
|
| MD5 |
3900a92c6f639fa733df851888978625
|
|
| BLAKE2b-256 |
d2d86bcec62785307bdac45119e6df994fb117e0cc2d4aeab1b616ef0ddf49aa
|