Key takeaway
- Anomaly detection in images and videos: methods, where each fits, governance, EU AI Act dates and a 3 to 5 year outlook for enterprise leaders.
Anomaly detection in images and videos finds the frames, regions or sequences that do not fit what normal looks like, such as a scratched part on a line, an unusual scan or a person in a restricted zone. For an enterprise, the hard part is rarely the model. It is deciding what "normal" means, who reviews each alert, and what happens next. This guide covers the methods, where each fits, the controls leaders need and what is likely to change in the next 3 to 5 years.
If your data is a metric or log stream and not pictures, read our guides on real-time anomaly detection and anomaly detection in time series instead. For live camera estates, see agentic AI for real-time video analytics.
What is anomaly detection in images and videos?
It is the task of flagging visual data that deviates from a learned or defined normal. In images the unit is a picture or a pixel region. In video it adds time, so a movement, a sequence or a change in crowd flow can be the anomaly. Most real systems have few or no labelled examples of the anomaly, because faults and incidents are rare and differ every time. That is why modern methods learn what normal looks like and score distance from it.
Where do enterprises use it?
| Domain | What the system looks for | Typical decision it feeds |
|---|---|---|
| Manufacturing and packaging | Surface defects, missing parts, seal and label faults | Reject, rework or hold the batch |
| Security and public safety | Loitering, intrusion, fighting, accidents, crowd build-up | Alert an operator with a short clip as evidence |
| Healthcare imaging | Regions in X-ray, MRI or CT that differ from expected anatomy | Prioritise the study for a radiologist |
| Energy, utilities and infrastructure | Leaks, heat anomalies, damaged panels or lines in drone or camera images | Raise a maintenance work order |
| Retail | Theft patterns, shelf gaps, unusual queue or traffic flow | Dispatch staff or change layout |
| Transport | Unexpected objects or movement on roads and tracks | Warn the driver or control room |
Our own work with vision teams follows one pattern: an alert is only useful when it carries evidence, such as a short video clip and the camera, time and zone, so the person who reviews it can decide quickly. Where a defect or incident needs context, we link the detection to the batch, asset or site record it belongs to.
Which technique fits which problem?
| Approach | How it works | When it fits | Watch for |
|---|---|---|---|
| Statistical models (for example Gaussian mixtures, kernel density) | Model the distribution of normal features and flag low-probability samples | Small, stable scenes with well-understood features | Struggle with high-dimensional raw pixels |
| Supervised classifiers | Train on labelled normal and anomalous examples | Known, frequent defect types with enough labels | Rare classes bias the model towards normal |
| Unsupervised and reconstruction (clustering, autoencoders) | Learn normal structure; high distance or reconstruction error signals an anomaly | Few or no labelled anomalies | Can reconstruct some anomalies too well |
| Deep feature-memory methods | Compare patches against stored features of normal images (PatchCore is the best-known example) | Industrial inspection with only normal samples | Needs clean, representative normal data |
| Vision-language and foundation models | Use a pre-trained model such as CLIP with text prompts and a few or no normal images (WinCLIP) | Quick start on a new product or site | Test on your own images before trusting the score |
| Weakly supervised video models | Learn from video-level labels and score segments over time | Surveillance footage where clip-level labels are costly | Needs diverse footage and review of false alarms |
Two published results show how far the field has moved. PatchCore reports an image-level AUROC of up to 99.6% on the MVTec AD benchmark (Roth et al., arXiv 2106.08265). WinCLIP reports 91.8% image-level AUROC on MVTec AD with no task-specific training, and 93.1% with one normal image per class (arXiv 2303.14814). Benchmarks are cleaner than a factory floor. MVTec AD has over 5,000 images in 15 categories and is released under a non-commercial licence (MVTec), so treat these figures as a starting point and run your own pilot.
For video, an early and widely cited study used 1,900 untrimmed surveillance videos covering 128 hours and 13 anomaly classes, and trained a multiple instance ranking model from video-level labels only (Sultani, Chen and Shah, arXiv 1801.04264). Newer architectures such as vision transformers now sit alongside convolutional and recurrent networks for this work.
What makes it hard in production?
| Challenge | Why it happens | What helps |
|---|---|---|
| Shifting "normal" | Lighting, seasons, new products and camera moves change the baseline | Scheduled re-baselining and a human-approved update path |
| Few anomaly examples | Faults are rare and different each time | Learn from normal data; add synthetic anomalies cautiously |
| False alarms | A tight threshold floods reviewers; a loose one misses events | Tune per camera or line; route low-confidence cases to review |
| Real-time load | Video feeds are heavy and decisions are time-bound | Run inference near the camera; compress or prune models. See computer vision on the edge |
| Explainability | Deep models rarely say why a frame was flagged | Show the region heat map and the clip with each alert |
| Privacy and bias | Video of people is sensitive data | Data minimisation, retention limits and bias tests before go-live |
What should leaders decide before they deploy?
Governance, security and cost
Decide four things first: who owns each alert type, what the system may do on its own, how long footage is kept and who can see it. Biometric and some surveillance uses are regulated, so run an AI Act and data-protection screen before buying cameras. Cost is driven less by the model than by video storage, inference hardware and the people who review alerts, so size the review queue before scaling cameras. Elixir Govern (formerly AgentGRC) keeps autonomous agent actions inside policy, with the audit trail risk teams need.
Adoption sequence
- Pick one decision. Choose a case where a camera already exists and the action is clear, such as hold a batch or open a case.
- Collect normal data. Gather representative normal images or clips and agree what counts as an anomaly.
- Pilot against your own data. Compare two or three methods from the table above on your own images, not on public benchmarks.
- Set thresholds with reviewers. Agree acceptable false alarms and misses with the people who act on alerts.
- Connect the action. Send alerts to the system that acts, such as MES, ticketing or an agent workflow. NexaStack is an agentic operating platform for physical AI that runs across on-premises, cloud and hybrid environments, and ElixirClaw is an agentic OS platform to build, orchestrate and govern AI agents and automation workflows while keeping humans in control.
When not to use it
Do not use image anomaly detection where a simple rule, a sensor or a checklist already answers the question, where you cannot define normal, or where no one can act on an alert within the time it matters.
Watch: anomaly detection in product inspection
Video: Computer Vision Product Inspection: Catch Defect Clusters (XenonStack AI)
What will change in anomaly detection in images and videos over the next 3 to 5 years?
| Prediction | Why we expect it (evidence) | Timeframe | What leaders should do now |
|---|---|---|---|
| Regulation shapes camera and biometric use | The EU AI Act applies generally from 2 August 2026; high-risk Annex III systems (including biometrics) from 2 December 2027 and Annex I product systems from 2 August 2028, after the AI Omnibus (European Commission) | 2026 to 2028 | Classify each vision use and log decisions before the dates |
| Pre-trained vision-language models become the first try | WinCLIP showed zero-shot anomaly detection on MVTec AD and VisA (arXiv 2303.14814). Timing is XenonStack's view | By 2028, likely | Benchmark a foundation model on your own images before collecting large datasets |
| Agents review routine video; people approve exceptions | NVIDIA publishes reference architectures for vision agents and video analytics (NVIDIA VSS docs). Pace is XenonStack's view | By 2029, likely | Define which alerts an agent may close and which need a person |
| Camera analytics becomes easier to connect | ONVIF Profile M standardises analytics metadata and events for object, face, vehicle and plate data (ONVIF). Adoption speed is XenonStack's view | 2026 to 2029 | Ask vendors for Profile M support in tenders |
| Weak projects get cut | Gartner expects over 40% of agentic AI projects to be cancelled by the end of 2027, as reported by New Electronics | By end of 2027 | Tie each use case to one measured outcome and a named owner |
We would be wrong on the foundation-model point if public benchmark results keep failing on real factory or site images. Test that early.
What this means for you: if you are a CIO, CTO or plant or operations head, start with one camera and one decision, prove it on your own data, and build the review and policy path before adding cameras.
To map one visual anomaly decision your agents should make, and the context and policy it depends on, book a Context Workshop. See what happens in the workshop.
See agentic video intelligence on your own cameras. XenonStack Vision AI agents search, summarise and investigate video, then act within the decision boundaries you set. Explore xenonstack.ai
Frequently asked questions about anomaly detection in images and videos
What is anomaly detection in images and videos?
It is the task of flagging images, regions or video sequences that differ from a learned or defined normal, such as a defect on a production line, an unusual medical scan or unusual activity on camera. Most systems learn from normal data because anomalies are rare.
Which method should an enterprise start with?
Start with the problem. If you have only normal samples, use unsupervised or feature-memory methods such as PatchCore. If a new product or site needs a quick start, test a vision-language model such as WinCLIP. Compare two or three on your own images.
How accurate is it?
Published results are high on benchmarks: PatchCore reports up to 99.6% image-level AUROC on MVTec AD. Benchmarks are cleaner than real sites, so measure on your own data and agree acceptable false alarms with reviewers.
What are the main risks?
Shifting normal conditions, false alarms, real-time load, models that cannot explain a flag, and privacy and bias when video shows people. Biometric and some surveillance uses also fall under EU AI Act high-risk rules from 2 December 2027.
Do we need labelled anomalies?
Not always. Unsupervised, feature-memory and vision-language methods learn from normal images or a few examples. Supervised classifiers need labelled anomalies, which are rare.
What will change in anomaly detection over the next 3 to 5 years?
We expect tighter regulation (EU AI Act high-risk dates of 2 December 2027 and 2 August 2028), more use of pre-trained vision-language models as a first try, agents handling routine video review with people approving exceptions, and easier camera integration through standards such as ONVIF Profile M.
Follow XenonStack on LinkedIn: XenonStack on LinkedIn for new guides on agentic AI, data and platform engineering.
Explore the XenonStack platform family: ElixirData · ElixirClaw · ElixirHub · NexaStack · MetaSecure · Neural AI · AgentGRC · AgentSRE · AgentAnalyst · AgentInstruct · AgentRAI · AgentScrum · AgentSearch · AgentForce · AI Aviator · SAIF Aviator · CohortIQ · XenonStack AI · XenonStack UAE