Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringclasses
5 values
static
static
distractor
static
threat
threat
threat
threat
translating
translating
threat
threat
threat
threat
receding
distractor
translating
threat
threat
threat
translating
static
static
threat
static
static
translating
receding
static
translating
threat
static
static
threat
receding
receding
threat
threat
threat
threat
distractor
threat
receding
threat
threat
threat
translating
threat
static
translating
threat
receding
distractor
static
receding
distractor
static
translating
distractor
threat
static
threat
receding
static
distractor
threat
distractor
threat
distractor
translating
threat
distractor
translating
threat
threat
threat
static
threat
distractor
threat
threat
translating
static
threat
threat
static
threat
static
static
threat
static
static
receding
threat
translating
receding
static
threat
static
receding
End of preview. Expand in Data Studio

YAML Metadata Warning:The task_categories "time-series-classification" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other

FlyLoom-v1: Event-Camera Looming Detection Benchmark

The first standardized benchmark for biologically-inspired looming detection.

Dataset Description

FlyLoom-v1 simulates a fly's eye watching approaching objects. The task: detect looming threats (predators on collision course) and trigger an escape reflex β€” before impact.

This benchmark was developed alongside FlyReflexNet, a connectome-constrained spiking neural network that matches standard ML accuracy at 124Γ— fewer operations.

Key Features

Property Value
Total samples 11,000
Input shape (T=10, C=2, H=32, W=32)
Input type Binary event tensor (ON/OFF polarities)
Event sparsity ~3% per frame (matches real DVS cameras)
Task Binary classification + timing
Classes 5 stimulus types, 2 labels

Splits

Split Samples Threats Non-threats
train 8,000 3,236 4,764
val 1,000 410 590
test 2,000 760 1,240

Stimulus Classes

Based on the classical Drosophila escape paradigm (Card & Dickinson 2008):

Class Label Description
Threat 1 Dark disc looming on collision course β†’ escape required
Distractor 0 Dark disc looming but veering away β†’ tests specificity
Translating 0 Dark disc moving sideways at constant size
Receding 0 Dark disc shrinking (moving away)
Static 0 Dark disc not moving

Usage

With Hugging Face Datasets

from datasets import load_dataset

ds = load_dataset("mayank171717/FlyLoom-v1")

# Access splits
train = ds["train"]
val = ds["validation"]
test = ds["test"]

# Get a sample
sample = train[0]
events = sample["events"]   # (10, 2, 32, 32) uint8
label = sample["label"]     # 0 or 1
impact = sample["impact"]   # step when predator strikes (-1 if non-threat)
kind = sample["kind"]       # "threat", "distractor", etc.

With PyTorch (Direct)

import numpy as np
import torch
from torch.utils.data import Dataset

class FlyLoomV1(Dataset):
    def __init__(self, split="train"):
        base = "path/to/FlyLoom_v1"
        self.events = np.load(f"{base}/{split}/events.npy")
        self.labels = np.load(f"{base}/{split}/labels.npy")
        
    def __len__(self):
        return len(self.labels)
    
    def __getitem__(self, idx):
        return (
            torch.from_numpy(self.events[idx].astype(np.float32)),
            int(self.labels[idx])
        )

The Task

Given a 10-step event stream, output a binary fire decision:

  • 1 = JUMP (looming threat detected)
  • 0 = HOLD FIRE (safe)

Timing matters. For threats, the model should fire before impact_step. Later detection = lower survival.

Metrics

Metric Description Goal
Survival rate % of threats detected before impact ↑
False alarm rate % of non-threats that triggered escape ↓
Reaction time Mean steps-to-fire Γ— 10 ms ↓
Operations/sample Computational cost ↓

Benchmark Results

Model Survival ↑ False Alarm ↓ Ops/sample ↓
Random 50% 50% 0
Flat-pixel GRU 96.7% 0.8% 4,059,530
GRU + retinal encoder 98.8% 0.1% 408,310
Spiking Fly (Phase 7) 96.2% 13.8% 1,458
Spiking Fly + Neuromod (ours) 99.3% 0.6% 3,296

Our model matches GRU accuracy with 124Γ— fewer operations.

Biological Grounding

This dataset reproduces stimuli from real Drosophila escape experiments:

  • Gabbiani et al. (1999) β€” The Ξ· = l/|v| computation in LGMD neurons
  • Card & Dickinson (2008) β€” Visually mediated motor planning in fly escape
  • von Reyn et al. (2014) β€” Giant Fiber pathway for escape triggering

Our model's reaction times show the same qualitative dependence on the r/v looming parameter as real flies.

Dataset Generation

Fully reproducible with fixed seed:

# The exact parameters used (from manifest.json)
{
    "seed": 42,
    "T": 10,
    "H": 32,
    "W": 32,
    "event_threshold": 0.08,
    "shot_noise": 0.001,
    "class_weights": {
        "threat": 0.4,
        "translating": 0.15,
        "receding": 0.15,
        "static": 0.15,
        "distractor": 0.15
    }
}

File Structure

FlyLoom_v1/
β”œβ”€β”€ manifest.json          # Full config + stats
β”œβ”€β”€ train/
β”‚   β”œβ”€β”€ events.npy         # (8000, 10, 2, 32, 32) uint8
β”‚   β”œβ”€β”€ labels.npy         # (8000,) int8
β”‚   β”œβ”€β”€ impact.npy         # (8000,) int8
β”‚   └── kinds.json         # list of 8000 strings
β”œβ”€β”€ val/
β”‚   └── ...
└── test/
    └── ...

Citation

@dataset{flyloom2025,
  author = {Mewar, Mayank},
  title = {FlyLoom-v1: Event-Camera Looming Detection Benchmark},
  year = {2025},
  publisher = {Hugging Face},
  url = {https://huggingface.co/datasets/mayank171717/FlyLoom-v1}
}

If you use this for biological comparisons, also cite:

@article{card2008,
  title={Visually mediated motor planning in the escape response of Drosophila},
  author={Card, Gwyneth and Dickinson, Michael H},
  journal={Current Biology},
  year={2008}
}

@article{gabbiani1999,
  title={Computation of object approach by a wide-field motion-sensitive neuron},
  author={Gabbiani, Fabrizio and Krapp, Holger G and Laurent, Gilles},
  journal={Journal of Neuroscience},
  year={1999}
}

License

CC-BY 4.0 β€” Free to use, remix, and redistribute with attribution.

Links

Contact

For questions or collaborations, open an issue on GitHub or contact via Hugging Face.

Downloads last month
89