SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.07110 · 2020

Online Anomaly Detection in Surveillance Videos with Asymptotic Bounds on False Alarm Rate

arXiv · PDF · Open in the Atlas

Code that ran

6 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 1 failure of our instrument; 4 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2010.07110.json · badge: /api/ran/2010.07110.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
kevaldoshi17/Prediction-based-Video-Anomaly-Detection- canonical (classifier label)
classifier basis: census
6 ran · 4 no recorded run
FunctionStatusWhere it lives
flow_loss Ran
ran on a synthesized input
kevaldoshi17/Prediction-based-Video-Anomaly-Detection-/loss_functions.py
code served (permissive licence) · get_code("4894714bdb782835")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned EagerTensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf

# Create small tensor dictionaries
gen_flows = {
    'flow': tf.constant([[[[1.0, 2.0, 3.0, 4.0],
                           [5.0, 6.0, 7.0, 8.0],
                           [9.0, 10.0, 11.0, 12.0]],
                          [[13.0, 14.0, 15.0, 16.0],
                           [17.0, 18.0, 19.0, 20.0],
                           [21.0, 22.0, 23.0, 24.0]]]], dtype=tf.float32)
}

gt_flows = {
    'flow': tf.constant([[[[1.1, 2.1, 3.1, 4.1],
                           [5.1, 6.1, 7.1, 8.1],
                           [9.1, 10.1, 11.1, 12.1]],
                          [[13.1, 14.1, 15.1, 16.1],
                           [17.1, 18.1, 19.1, 20.1],
                           [21.1, 22.1, 23.1, 24.1]]]], dtype=tf.float32)
}

ARGS = {
    'gen_flows': gen_flows,
    'gt_flows': gt_flows
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_dir Ran
ran; our contract draft was wrong, not the code
kevaldoshi17/Prediction-based-Video-Anomaly-Detection-/constant.py
code served (permissive licence) · get_code("d227904aef822759")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import tempfile

ARGS = {
    "directory": tempfile.mkdtemp()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
gradient_loss Ran
ran on a synthesized input
kevaldoshi17/Prediction-based-Video-Anomaly-Detection-/loss_functions.py
code served (permissive licence) · get_code("695074a0b51574cc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned EagerTensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf
import numpy as np

# Set random seed for reproducibility
np.random.seed(0)
tf.random.set_seed(0)

# Create small test tensors
batch_size = 2
height = 4
width = 3
channels = 2

# Generate random frames as TensorFlow tensors
gen_frames = tf.constant(
    np.random.randn(batch_size, height, width, channels).astype(np.float32)
)

gt_frames = tf.constant(
    np.random.randn(batch_size, height, width, channels).astype(np.float32)
)

# Alpha parameter for the power term
alpha = 1.0

ARGS = {
    "gen_frames": gen_frames,
    "gt_frames": gt_frames,
    "alpha": alpha,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
intensity_loss Ran
ran on a synthesized input
kevaldoshi17/Prediction-based-Video-Anomaly-Detection-/loss_functions.py
code served (permissive licence) · get_code("a6169bbd2ef6639e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned EagerTensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tensorflow as tf

# Create small distinct-sized tensors for predicted and ground truth frames
# Using shape (2, 4, 3) for batch_size=2, height=4, width=3
gen_frames = tf.constant([
    [[1.0, 2.0, 3.0], [4.0, 5.0, 6.0], [7.0, 8.0, 9.0], [10.0, 11.0, 12.0]],
    [[2.0, 3.0, 4.0], [5.0, 6.0, 7.0], [8.0, 9.0, 10.0], [11.0, 12.0, 13.0]]
], dtype=tf.float32)

gt_frames = tf.constant([
    [[1.1, 2.1, 3.1], [4.1, 5.1, 6.1], [7.1, 8.1, 9.1], [10.1, 11.1, 12.1]],
    [[2.1, 3.1, 4.1], [5.1, 6.1, 7.1], [8.1, 9.1, 10.1], [11.1, 12.1, 13.1]]
], dtype=tf.float32)

l_num = 1

ARGS = {
    "gen_frames": gen_frames,
    "gt_frames": gt_frames,
    "l_num": l_num
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_psnr Ran
ran on a synthesized input
kevaldoshi17/Prediction-based-Video-Anomaly-Detection-/evaluate.py
code served (permissive licence) · get_code("ff47ae3a330cd1a0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import pickle
import tempfile
import os

# Create a temporary file with pickle data containing PSNR results
temp_dir = tempfile.mkdtemp()
loss_file = os.path.join(temp_dir, "loss.pkl")

# Create sample results dictionary with PSNR values
results = {
    'psnr': [25.5, 26.3, 27.1, 28.0]
}

# Write the pickle file
with open(loss_file, 'wb') as f:
    pickle.dump(results, f)

ARGS = {
    'loss_file': loss_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
np_load_frame Ran
ran on a synthesized input
kevaldoshi17/Prediction-based-Video-Anomaly-Detection-/utils.py
code served (permissive licence) · get_code("c467f28b44dd1bf9")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 3, dtype family float, shape (5, 4, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import cv2
import tempfile
import os

# Create a temporary image file for testing
temp_dir = tempfile.mkdtemp()
temp_image_path = os.path.join(temp_dir, "test_image.jpg")

# Create a simple 10x8 BGR image (height=10, width=8, 3 channels)
test_image = np.random.randint(0, 256, (10, 8, 3), dtype=np.uint8)
cv2.imwrite(temp_image_path, test_image)

ARGS = {
    "filename": temp_image_path,
    "resize_height": 5,
    "resize_width": 4,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (5, 4, 3) — shape (5, 4, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_psnr_gt Not yet run
unverified (harvested, no recorded run)
kevaldoshi17/Prediction-based-Video-Anomaly-Detection-/evaluate.py
code served (permissive licence) · get_code("226e3b38ed7c4285")
How it ran

no invocation recorded.

load_psnr_gt_flow Not yet run
unverified (harvested, no recorded run)
kevaldoshi17/Prediction-based-Video-Anomaly-Detection-/evaluate.py
code served (permissive licence) · get_code("3c24a532ddbf58ef")
How it ran

no invocation recorded.

log10 Not yet run
unverified (harvested, no recorded run)
kevaldoshi17/Prediction-based-Video-Anomaly-Detection-/utils.py
code served (permissive licence) · get_code("b90fe0b15e5bd7de")
How it ran

no invocation recorded.

psnr_error Not yet run
unverified (harvested, no recorded run)
kevaldoshi17/Prediction-based-Video-Anomaly-Detection-/utils.py
code served (permissive licence) · get_code("b36305a3b733c689")
How it ran

no invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 0 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
get_dir 1 other paper
1 dated earlier
1511.05440 (2015-11)
Deep multi-scale video prediction beyond mean square error
load_psnr 1 other paper
1 dated earlier
1812.04960 (2018-12)
Object-centric Auto-encoders and Dummy Anomalies for Abnormal Event Detection in Video
load_psnr_gt 1 other paper
1 dated earlier
1812.04960 (2018-12)
Object-centric Auto-encoders and Dummy Anomalies for Abnormal Event Detection in Video
load_psnr_gt_flow 1 other paper
1 dated earlier
1812.04960 (2018-12)
Object-centric Auto-encoders and Dummy Anomalies for Abnormal Event Detection in Video

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Anomaly detection in surveillance videos is attracting an increasing amount of attention. Despite the competitive performance of recent methods, they lack theoretical performance analysis, particularly due to the complex deep neural network architectures used in decision making. Additionally, online decision making is an important but mostly neglected factor in this domain. Much of the existing methods that claim to be online, depend on batch or offline processing in practice. Motivated by these research gaps, we propose an online anomaly detection method in surveillance videos with asymptotic bounds on the false alarm rate, which in turn provides a clear procedure for selecting a proper decision threshold that satisfies the desired false alarm rate. Our proposed algorithm consists of a multi-objective deep learning module along with a statistical anomaly detection module, and its effectiveness is demonstrated on several publicly available data sets where we outperform the state-of-the-art algorithms. All codes are available at https://github.com/kevaldoshi17/Prediction-based-Video-Anomaly-Detection-.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2010.07110")
get_code_for_paper("2010.07110")
have("2010.07110")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2010.07110.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2010.07110.svg)](https://syntology.ai/paper/2010.07110)

Connect an agent — have() is free.