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
Metadata
Release files for vaas 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vaas-0.2.0.tar.gz | 16.1 kB | Without provenance | Details for vaas-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vaas-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for vaas-0.2.0-py3-none-any.whl |
Total release size: 32.2 kB
Release files / vaas-0.2.0.tar.gz
| Download URL | vaas-0.2.0.tar.gz |
|---|---|
| Size | 16.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf0d11eb7ddbc8f27b117a5fa133aed11b1a7303aabcd6e1543c31c99eb5c1d0
|
|
BLAKE2b-256 checksum How to use checksums |
cd0fa5c33432f705a421220c3d23861e28d46e0e168b3b1dd8afd907953362e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / vaas-0.2.0-py3-none-any.whl
| Download URL | vaas-0.2.0-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ccd467c2cd0b21203010701e69b3f7da0dc1a03c2ed6b6ebcdcf903877ea2888
|
|
BLAKE2b-256 checksum How to use checksums |
d2d86bcec62785307bdac45119e6df994fb117e0cc2d4aeab1b616ef0ddf49aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for vaas 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.