Training AI to Spot Danger Before It Happens — Without a Camera in Sight

A security camera watches an empty parking lot at 3 a.m. A lone figure enters, moves erratically, and lingers near parked cars. To a trained human eye, something is off. But to a surveillance AI that has only ever seen orderly, well-lit footage, the scene is noise. The system flags nothing. The moment passes.
This is the gap that a team of researchers across five UK universities is working to close, and their solution does not involve a single real-world camera.
The Data Cliff Nobody Talks About
Anomaly detection sits at the heart of modern AI safety systems. Whether a self-driving car needs to spot a child darting into the road, an industrial robot must catch a misaligned part on a conveyor belt, or a smart city camera must flag a crowd disturbance before it escalates, each of these systems depends on one fundamental capability: knowing what “normal” looks like so that deviations stand out.
The catch is that dangerous, rare, or unexpected events are, by definition, rare. You cannot train a reliable AI safety system on footage of things that almost never happen, and waiting around for genuine anomalies to occur is neither safe nor practical. Researchers describe this as a fundamental gap in data availability for neuromorphic vision. The AI needs to learn from the edge of that gap without anyone falling into it.
Consider how the aviation industry solved a similar problem. No airline puts a pilot in the cockpit and says, “Let us see how you handle an engine fire.” Instead, thousands of hours of simulator training expose that pilot to every catastrophic scenario imaginable, in a controlled environment, long before any real passenger boards. The muscle memory, the decision patterns, the ability to stay calm, all of it is built in simulation. The question researchers in neuromorphic computing have been wrestling with is this: who builds the equivalent simulator for computer vision AI? ANTShapes is the answer that a team across five UK universities has put forward.
The Hardware Bottleneck
Before diving into the software solution, it helps to understand why the hardware alone cannot solve the problem.
A standard video camera captures the world in frames, like a series of photographs taken in rapid succession. A Dynamic Vision Sensor, or DVS, works quite differently. Rather than recording everything simultaneously, it detects changes in light intensity at each pixel independently and asynchronously. When a pixel brightens or darkens beyond a set threshold, it fires an “event.” Nothing else is recorded. The result is an extraordinarily sparse, fast, and low-power data stream that captures motion with near-zero latency and high fidelity, even in challenging lighting conditions. In everyday terms, a DVS camera tracks only motion changes, like ripples in a pond, while ignoring the static background entirely.
These properties make DVS cameras exceptionally well-suited for safety-critical edge applications where power budgets are tight and response times must be near-instantaneous. The catch is that DVS hardware remains scarce, expensive, and largely absent from the kind of real-world surveillance infrastructure that generates the training data AI researchers need. Neuromorphic vision datasets for anomaly detection are particularly hard to come by, because DVS sensors are almost never deployed as security cameras.
Existing workarounds each carry their own costs.
- Frame interpolation. Researchers interpolate between frames from standard video footage to reconstruct what a DVS camera would have captured. This holds up reasonably well at high source frame rates, but degrades quickly when motion is fast or subtle, producing unreliable synthetic events.
- Monitor capture. A DVS camera is pointed at a screen replaying conventional video. The conversion is imperfect by nature, as any physical disturbance to the camera during recording injects noise into the data, and the method does not scale.
- Vehicle-first simulators. Environments like CARLA render detailed three-dimensional urban scenes, but they were designed for ego-motion in driving scenarios. That architecture is poorly suited to the fixed-perspective, stand-off view that a surveillance scenario requires. Defining what counts as an anomaly within those scenes also falls entirely to the user, leaving the labelling problem unsolved.
Each of these approaches is, at best, a workaround. None of them produces a controlled, scalable, automatically labelled dataset for the specific needs of fixed-camera anomaly detection. These shortfalls led the research team to build a full simulator from the ground up.
Enter ANTShapes
Researchers from the University of York, the University of Stirling, Cardiff University, the University of Manchester, and the University of Southampton have built a tool that sidesteps hardware dependency entirely. ANTShapes, short for Anomalous Neuromorphic Tool for Shapes, is a dataset generation framework built inside the Unity game engine. It produces synthetic neuromorphic datasets from scratch, complete with automatically generated ground-truth labels, without requiring any physical DVS hardware at all.
The framework populates a three-dimensional virtual scene with 12 distinct geometric agent classes: flat-faced geometries such as cuboids, isospheroids, pyramids, L-blocks and T-blocks; smooth-faced shapes including spheroids, cones, capsules, cylinders and toruses; and two classic reference models used in computer graphics, the Utah teapot and Blender’s Suzanne monkey head. Each agent is assigned randomised behaviours governed by statistical distributions, and each behaviour parameter can be sampled independently along the X, Y and Z axes, allowing the anomaly definition to span multiple behavioural dimensions at once. Translation speed, rotation rate, scale, starting position, and surface texture noise can all be parameterised this way. The camera perspective remains fixed, approximating the viewpoint of a CCTV installation.
The use of abstract shapes is deliberate. The goal is not visual realism but controlled experimentation: isolating how neuromorphic models learn patterns of motion and deviation before moving on to complex real-world scenes where variables are far harder to separate.
What makes ANTShapes genuinely useful for AI training is not just the visual output but the statistical backbone beneath it. Four parameters govern nearly everything a researcher needs to configure.
| Parameter | What It Controls |
|---|---|
| μ and σ per axis | Mean and spread of translation, rotation, and scale across X, Y, Z |
| Anomaly threshold v | The likelihood cutoff below which an agent is automatically labelled anomalous |
| Fuzziness z | Scales between standard normal sampling and the crowd-enhanced cubic curve |
| Temporal scale | Frame interval from one millisecond down to microsecond resolution |
A Statistical Definition of “Out of the Ordinary”
The core insight behind ANTShapes is that, in a large population of agents all performing a similar behaviour at varying magnitudes, that behaviour will naturally follow a normal distribution. A busy pedestrian crossing, for instance, will have most people walking at roughly similar speeds in roughly similar directions, with the occasional outlier. The same statistical logic applies to the virtual agents in ANTShapes.
Each agent behaviour is sampled from a normal distribution with a defined mean and standard deviation. The simulator then evaluates how typical an agent’s overall behaviour is by combining the probabilities of each individual behaviour parameter. A chi-squared transformation merges those probabilities into a single score reflecting how well the agent fits the population as a whole. In plain terms, the system scores each object’s behaviour automatically based on how well it matches the group’s pattern, without any human doing the labelling.
An anomaly, formally speaking, is any agent whose combined likelihood score falls below a user-defined threshold. This means the tool does not require a human researcher to manually label which agents are behaving oddly. The labelling emerges directly from the statistical model. For a computer vision engineer, this is a significant operational gain. Generating an arbitrarily large labelled dataset becomes a matter of adjusting a handful of parameters rather than weeks of manual annotation.
To give anomalous behaviour a more visually pronounced quality in the generated scenes, the researchers also introduced a crowd behaviour function. This function reshapes the normal distribution so that values near the mean collapse toward zero, while values in the tail of the distribution are amplified through a steep cubic curve. The effect is that normal agents cluster tightly in behaviour space while anomalous agents appear more exaggerated by comparison, making the contrast easier for a neural network to learn. A fuzziness coefficient z then lets users scale between the raw normal distribution and the cubic-enhanced version, tuning how sharply the boundary between ordinary and anomalous behaviour is drawn.
Simulating the Physics of an Event Camera
On the output side, ANTShapes generates synthetic event data by comparing consecutive simulated frames pixel by pixel. Events fire only when pixel intensity shifts beyond a threshold β in either direction. ANTShapes represents these events as a matrix where increases appear as 1, decreases as 0, and unchanged pixels as 0.5, producing a sparse event representation derived from those frame differences. This bipolar hysteresis gating closely replicates the physical mechanism by which real DVS sensors operate.
The temporal resolution of the simulation is also adjustable. By default, there is one millisecond between simulated frames, roughly consistent with high-frame-rate conventional cameras. Lowering the time-scale parameter produces microsecond-level resolution, bringing the synthetic output closer to the behaviour of genuine neuromorphic sensors. Crucially, agent behaviour within the simulation is decoupled from rendering frame rate, so results remain consistent across machines with different graphics capabilities.
Colour is deliberately excluded from the model. This is not an oversight. Current DVS hardware captures intensity changes rather than colour information, so modelling colour would add computational cost without adding anything a real sensor could use. Surface texture noise is included instead, applied via normal mapping to reduce the artificial flatness that curved meshes can exhibit when rendered as discrete polygon approximations.
What This Means in Practice
For a computer vision engineer building Spiking Neural Network models for anomaly detection, the value of ANTShapes is the ability to control the training distribution with precision. Rather than hoping that a captured dataset happens to contain a representative spread of anomalous events, the engineer can specify exactly how often anomalies should appear, how extreme they should be, and which behavioural dimensions should define them. Translation speed only? Rotation only? A combination of scale and position? All of these are configurable.
For a stakeholder or policy maker thinking about AI-powered safety infrastructure, the more relevant point is this: ANTShapes removes the dependency on rare real-world events as a prerequisite for training reliable safety systems. A detection model can be exposed to thousands of simulated incidents, at any severity level, before it is ever deployed in a real environment. The “test track” runs indefinitely, at any scale, with full control over what the AI encounters.
The dataset generator also exports accompanying label and frame data alongside the synthetic event streams, giving researchers everything they need to train, validate, and evaluate models without any additional annotation pipeline.
Where the Tool Stands Today
The authors are candid about where the project sits. ANTShapes is functional and publicly available as an open-source release for both Linux and Windows via GitHub, but synthesised datasets await extensive SNN testing before the tool’s practical value can be confirmed. That validation is the stated first priority before any further expansions, including causal crowd interactions, stereoscopic vision, or ego-motion camera support, are added. The statistical model, as it stands, assumes agent behaviours are independent of one another, a deliberate simplification. Real crowds are causally connected: one person stopping affects the flow of those behind them. ANTShapes agents, for now, can pass through each other without interaction.
The trajectory, however, is clear. As DVS hardware gradually becomes more accessible and as Spiking Neural Networks mature as a deployment-ready technology for edge computing, the bottleneck for researchers will increasingly be data rather than models. Tools that can generate that data parametrically, automatically, and at scale are going to matter. ANTShapes is an early and carefully considered entry in that space, built not around what looks impressive in a demo, but around what a researcher actually needs to run a controlled experiment.
The parking lot camera may still miss a great deal. But the AI behind the next generation of such cameras might learn to see it coming, trained not on footage of things that went wrong, but on a simulation that ran through every version of “wrong” thousands of times before anyone was ever at risk. Like pilots who train on every conceivable failure mode in a simulator long before they encounter one in the sky, detection models built with ANTShapes can practise infinite anomaly variations in complete safety.
As the field moves from reactive safety systems toward predictive ones, the open-source release of ANTShapes is not merely a dataset tool. It is a piece of infrastructure, a shared foundation on which the next generation of visual intelligence can be built, tested, and deployed before a single dangerous moment ever needs to occur in the real world.
For Those Who Want to Go Deeper
ANTShapes runs on Unity 6.1 and is available as a pre-built binary for both Linux and Windows, or as a full project with C# source code. No proprietary DVS hardware is required. The tool is currently in early-stage / BETA development, meaning the core simulator is functional but comprehensive validation against trained SNN architectures is still underway. Researchers familiar with event-based vision will find the bipolar hysteresis event generation model and the chi-squared anomaly scoring system accessible within the codebase. Those newer to the field can start with the parameter sliders for μ, σ, threshold v, fuzziness z, and temporal scale, then work backward into the underlying math as confidence grows. The repository is publicly accessible at github.com/EDGYOrganism/ANTShapes.
Citation
Middleton, M., Ali, T., Kayan, H., Sen Bhattacharya, B., Perera, C., Rhodes, O., Gheorghiu, E., Vousden, M., and Trefzer, M. A. (2026). Modelling and Simulation of Neuromorphic Datasets for Anomaly Detection in Computer Vision. arXiv preprint arXiv:2602.23514. https://arxiv.org/abs/2602.23514
This research is part of the Edgy Organism project, supported by an Engineering and Physical Sciences Research Council grant (EP/Y030133/1).
