Max-Ploter's picture
Update README.md
5c5287c verified
metadata
license: apache-2.0
task_categories:
  - object-detection
language:
  - en
pretty_name: Detection Moving MNIST (Easy)
size_categories:
  - 100K<n<1M

Detection Moving MNIST (Easy)

annotated_video_0 annotated_video_1

Description

Repository: https://github.com/maxploter/detection-moving-mnist

A synthetic video dataset for object detection and tracking, featuring moving MNIST digits with:

  • 1-10 digits per sequence
  • Linear trajectories with small random translations
  • 128x128 resolution grayscale frames
  • 20 frames per video sequence
  • Digit size 28x28
  • Per-frame annotations including:
    • Digit labels (0-9)
    • Center coordinates (x,y)

Supported Tasks

  • Object detection in video
  • Multi-object tracking
  • Video understanding
  • Spatiotemporal modeling

Structure

Data Instances

A typical example contains:

{
    'video': [video frames],  # Array of shape (20, 128, 128, 3)
    'targets': [{
        'labels': List[int],          # Digit classes present
        'center_points': List[Tuple], # (x,y) coordinates
    } for each frame]
}

Data Format

  • Arrow
  • Total dataset size: approximately {PLACEHOLDER} GB
  • Frame rate: 10 fps

Data Splits

Split Size
Train 60,000
Test 10,000

Dataset Creation

Source Data

Annotations

  • Automatically generated during sequence creation
  • Includes digit classes and trajectory coordinates

Simulation Parameters (Easy Mode)

{
    "angle": (0, 0),         # No rotation
    "translate": ((-5, 5), (-5, 5)),  # Small random translations
    "scale": (1, 1),         # Fixed size
    "shear": (0, 0),         # No deformation
    "num_digits": (1,2,3,4,5,6,7,8,9,10)  # Variable object count
}

Dataset Statistics

Statistic Value
Mean (Train) 0.023958550628466375
Standard Deviation (Train) 0.14140212075592035
Mean (Test) 0.024210869560423308
Standard Deviation (Test) 0.1423791946229605

You can check those numbers in the file: dataset_stats

train_digit_classes test_digit_classes

train_digits_per_frame test_digits_per_frame

Using the Dataset

Basic Loading

from datasets import load_dataset
dataset = load_dataset("Max-Ploter/detection-moving-mnist-easy")

Visualization Example

import matplotlib.pyplot as plt
import matplotlib.patches as patches

# Load a single example
example = dataset['train'][0]
frames = example['video']
annotations = example['targets']

# Visualize first frame with bounding boxes
plt.figure(figsize=(8, 8))
plt.imshow(frames[0], cmap='gray')

# Draw bounding boxes
for label, center in zip(annotations[0]['labels'], annotations[0]['center_points']):
    x, y = center
    # Assuming digit size of approximately 28x28 pixels
    rect = patches.Rectangle((x-14, y-14), 28, 28, linewidth=1, 
                             edgecolor='r', facecolor='none')
    plt.gca().add_patch(rect)
    plt.text(x, y-20, str(label), color='white', fontsize=12, 
             bbox=dict(facecolor='red', alpha=0.5))

plt.title('Frame 0 with Object Detection')
plt.axis('off')
plt.show()

Limitations

  • Synthetic dataset with simple black backgrounds
  • Linear trajectories may not represent complex real-world motion
  • No complex occlusion handling or object interactions
  • No lighting variations or perspective transformations

Related Datasets