SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.06354 · 2023

EventCLIP: Adapting CLIP for Event-based Object Recognition

arXiv · PDF · Open in the Atlas

Code that ran

9 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 9 have no contract verdict; 0 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2306.06354.json · badge: /api/ran/2306.06354.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
Wuziyi616/EventCLIP canonical (classifier label)
classifier basis: census
9 ran · 1 no recorded run
FunctionStatusWhere it lives
build_event2img_dataset Ran
ran on a synthesized input
Wuziyi616/EventCLIP/datasets/event2img.py
code served (permissive licence) · get_code("8aff5a54678b2041")
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 Event2ImageDataset. 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 torch
import torch.nn as nn
from torch.utils.data import Dataset
from torchvision import transforms
import numpy as np
from PIL import Image

torch.manual_seed(0)

# Stand-in for event dataset
class MockEventDataset(Dataset):
    def __init__(self, num_samples=2):
        self.num_samples = num_samples
        self.classes = ['class0', 'class1']
        self.resolution = (128, 128)
        self.max_t = 1000000
        self.max_n = 30000
        self.augmentation = False
        self.num_shots = None
        self.root = '/train'
    
    def __len__(self):
        return self.num_samples
    
    def __getitem__(self, idx):
        # Return mock event data
        events = np.random.rand(100, 4).astype(np.float32)
        return {
            'events': events,
            'label': idx % 2,
        }

# Stand-in for events2frames function
def events2frames(events, shape, max_imgs=2, split_method='event_count', 
                  convert_method='event_histogram', N=30000, grayscale=True, 
                  count_non_zero=False, background_mask=True, **kwargs):
    # Return dummy image data
    num_frames = min(max_imgs, 2)
    if grayscale:
        return np.random.randint(0, 256, (num_frames, *shape), dtype=np.uint8)
    else:
        return np.random.randint(0, 256, (num_frames, *shape, 3), dtype=np.uint8)

# Stand-in for hflip_events
def hflip_events(events, resolution, p=1.0):
    return events.copy()

# Stand-in for tflip_events
def tflip_events(events, p=1.0):
    return events.copy()

# Stand-in for RandAugment
class RandAugment:
    def __init__(self, num_ops=2, interpolation=None, fill=None):
        self.num_ops = num_ops
        self.interpolation = interpolation
        self.fill = fill
    
    def __call__(self, imgs):
        return imgs

# Stand-in for InterpolationMode
class InterpolationMode:
    BICUBIC = 'bicubic'

# Params object with data_transforms and quantize_args
class MockParams:
    def __init__(self):
        self.data_transforms = transforms.Compose([
            transforms.ToTensor(),
        ])
        self.quantize_args = {
            'max_imgs': 2,
            'split_method': 'event_count',
            'convert_method': 'event_histogram',
            'N': 30000,
            'grayscale': True,
            'count_non_zero': False,
            'background_mask': True,
        }

# Create mock event dataset
event_dataset = MockEventDataset(num_samples=2)

# Create mock params
params = MockParams()

# Build ARGS dictionary
ARGS = {
    'params': params,
    'event_dataset': event_dataset,
    'augment': False,
    'tta': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Event2ImageDataset — a Event2ImageDataset output has no array shape of its own; none is 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
build_lora_merged_proj Ran
ran on a synthesized input
Wuziyi616/EventCLIP/models/lora.py
code served (permissive licence) · get_code("ced40880df80f9a6")
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 LoraInjectedMergedProj. 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create a merged projection weight
# Shape should be (3*d_model, in_dim) where d_model and in_dim are distinct
d_model = 4
in_dim = 3
d_model_3 = 3 * d_model  # 12

merged_proj = nn.Parameter(torch.randn(d_model_3, in_dim))

# LoRA rank - must be <= min(d_model, in_dim)
r = 2

# Flag for whether to include LoRA for key projection
lora_k = True

ARGS = {
    "merged_proj": merged_proj,
    "r": r,
    "lora_k": lora_k,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LoraInjectedMergedProj — a LoraInjectedMergedProj output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LoraInjectedMergedProj 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
build_lora_proj Ran
ran on a synthesized input
Wuziyi616/EventCLIP/models/lora.py
code served (permissive licence) · get_code("8db8291e6f0c223c")
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 LoraInjectedProj. 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create a small projection weight tensor
# Shape: (d_model=8, in_dim=6) - distinct dimensions for probing
proj = nn.Parameter(torch.randn(8, 6))

# LoRA rank must be <= min(d_model, in_dim) = min(8, 6) = 6
r = 4

ARGS = {
    "proj": proj,
    "r": r,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type LoraInjectedProj — a LoraInjectedProj output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a LoraInjectedProj 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
denormalize Ran
ran on a synthesized input
Wuziyi616/EventCLIP/method.py
code served (permissive licence) · get_code("8f7ff725c27a34c8")
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 Tensor, ndim 4, dtype family float, shape (2, 3, 4, 4) 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 torch

torch.manual_seed(0)

# Create a normalized input tensor with shape (batch=2, channels=3, height=4, width=4)
# This represents a batch of 2 images with 3 color channels, 4x4 spatial dimensions
x = torch.randn(2, 3, 4, 4)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 3, 4, 4) — shape (2, 3, 4, 4) 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
find_key_from_value Ran
ran on a synthesized input
Wuziyi616/EventCLIP/gen_data.py
code served (permissive licence) · get_code("8f09a1a21e5e373e")
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 torch

torch.manual_seed(0)

# The function find_key_from_value takes a dictionary d and a value v,
# and searches through d.items() to find the key whose value equals v.
# It uses: d.items() iteration, equality comparison (==), and returns a key or None.

# Create a simple dictionary with some string keys and various values
d = {
    "key_one": 42,
    "key_two": "hello",
    "key_three": 3.14,
    "key_four": [1, 2, 3]
}

# Create a value that exists in the dictionary
v = "hello"

ARGS = {
    "d": d,
    "v": v
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — 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
get_folder_and_fn Ran
ran on a synthesized input
Wuziyi616/EventCLIP/gen_data.py
code served (permissive licence) · get_code("58255d56af8ce2ce")
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.path as osp

# The function get_folder_and_fn takes a path string and returns a string
# constructed from the basename of the parent directory and the basename of the file.
# It uses osp.join, osp.basename, and osp.dirname which all work with string paths.

# Create a valid file path for testing
test_path = "/home/user/documents/myfile.txt"

ARGS = {
    "path": test_path
}
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
get_real_path Ran
ran on a synthesized input
Wuziyi616/EventCLIP/gen_data.py
code served (permissive licence) · get_code("c3e86ebaae72bca0")
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 os.path as osp
import tempfile

# Create a temporary directory for testing
temp_dir = tempfile.mkdtemp()

# Create a regular file
regular_file = osp.join(temp_dir, "regular_file.txt")
with open(regular_file, "w") as f:
    f.write("test")

# Create a symlink pointing to the regular file
symlink_path = osp.join(temp_dir, "symlink.txt")
os.symlink(regular_file, symlink_path)

# The function get_real_path takes a single parameter: path
# It follows symlinks until it reaches a non-symlink path
# We'll test it with the symlink path

ARGS = {
    "path": symlink_path
}
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
get_real_path Ran
ran on a synthesized input
Wuziyi616/EventCLIP/datasets/caltech.py
code served (permissive licence) · get_code("89cdfb6c9efa1bae")
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

# Create a temporary directory and files for testing
temp_dir = tempfile.mkdtemp()

# Create a real file
real_file = os.path.join(temp_dir, "real_file.txt")
with open(real_file, "w") as f:
    f.write("test content")

# Create a symbolic link pointing to the real file
link_file = os.path.join(temp_dir, "link_file.txt")
os.symlink(real_file, link_file)

# Test with a regular path (not a symlink)
regular_path = os.path.join(temp_dir, "regular.txt")
with open(regular_path, "w") as f:
    f.write("regular file")

# The function expects a path string
ARGS = {
    "path": regular_path
}
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
load_event Ran
ran on a synthesized input
Wuziyi616/EventCLIP/datasets/imagenet.py
code served (permissive licence) · get_code("a3370a1b6b0ac33c")
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 2, dtype family float, shape (100, 4) 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 tempfile
import os

# Create a temporary npz file with event data
temp_dir = tempfile.mkdtemp()
event_path = os.path.join(temp_dir, "test_event.npz")

# Create sample event data with the expected structured array format
num_events = 100
event_data = np.zeros(num_events, dtype=[('x', np.float32), ('y', np.float32), ('t', np.int64), ('p', np.int32)])
event_data['x'] = np.random.randint(0, 640, num_events).astype(np.float32)
event_data['y'] = np.random.randint(0, 480, num_events).astype(np.float32)
event_data['t'] = np.arange(0, num_events * 1000, 1000, dtype=np.int64)  # microseconds
event_data['p'] = np.random.randint(-1, 2, num_events).astype(np.int32)  # -1 or 1

# Save to npz file
np.savez(event_path, event_data=event_data)

ARGS = {
    "event_path": event_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (100, 4) — shape (100, 4) 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
build_lora_mha Not yet run
unverified (harvested, no recorded run)
Wuziyi616/EventCLIP/models/lora.py
code served (permissive licence) · get_code("dac43eb982742334")
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, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 10 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.

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-23.

Repositories linked to this paper

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

Abstract

Recent advances in zero-shot and few-shot classification heavily rely on the success of pre-trained vision-language models (VLMs) such as CLIP. Due to a shortage of large-scale datasets, training such models for event camera data remains infeasible. Thus, adapting existing VLMs across modalities to event vision is an important research challenge. In this work, we introduce EventCLIP, a novel approach that utilizes CLIP for zero-shot and few-shot event-based object recognition. We first generalize CLIP's image encoder to event data by converting raw events to 2D grid-based representations. To further enhance performance, we propose a feature adapter to aggregate temporal information over event frames and refine text embeddings to better align with the visual inputs. We evaluate EventCLIP on N-Caltech, N-Cars, and N-ImageNet datasets, achieving state-of-the-art few-shot performance. When fine-tuned on the entire dataset, our method outperforms all existing event classifiers. Moreover, we explore practical applications of EventCLIP including robust event classification and label-free event recognition, where our approach surpasses previous baselines designed specifically for these tasks.

For agents

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

get_harvested_code_for_paper("2306.06354")
get_code_for_paper("2306.06354")
have("2306.06354")

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

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

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

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

Connect an agent — have() is free.