Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Cannot extract the features (columns) for the split 'train' of the config 'default' of the dataset.
Error code:   FeaturesError
Exception:    ArrowInvalid
Message:      Schema at index 1 was different: 
asset_id: string
frame_rate: string
endtimecode: string
starttimecode: string
HomeTeam: string
AwayTeam: string
Competition: string
GameDate: timestamp[s]
SeasonYear: string
Events: struct<Name: string, type: string, Events: list<item: struct<Name: string, type: string, Action: struct<Name: string, type: string, SubAction: struct<Name: string, type: string>>, Team: string>>>
vs
asset_id: string
frame_rate: string
endtimecode: string
starttimecode: string
HomeTeam: string
AwayTeam: string
Competition: string
GameDate: timestamp[s]
SeasonYear: string
Events: struct<Name: string, type: string, Events: list<item: struct<Name: string, type: string, Action: struct<Name: string, type: string, SubAction: struct<Name: string, type: string, SubSubAction: struct<Name: string, type: string>>>, Team: string>>>
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/split/first_rows.py", line 243, in compute_first_rows_from_streaming_response
                  iterable_dataset = iterable_dataset._resolve_features()
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 3608, in _resolve_features
                  features = _infer_features_from_batch(self.with_format(None)._head())
                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2368, in _head
                  return next(iter(self.iter(batch_size=n)))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2573, in iter
                  for key, example in iterator:
                                      ^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2060, in __iter__
                  for key, pa_table in self._iter_arrow():
                                       ^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2082, in _iter_arrow
                  yield from self.ex_iterable._iter_arrow()
                File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 572, in _iter_arrow
                  yield new_key, pa.Table.from_batches(chunks_buffer)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "pyarrow/table.pxi", line 5039, in pyarrow.lib.Table.from_batches
                File "pyarrow/error.pxi", line 155, in pyarrow.lib.pyarrow_internal_check_status
                File "pyarrow/error.pxi", line 92, in pyarrow.lib.check_status
              pyarrow.lib.ArrowInvalid: Schema at index 1 was different: 
              asset_id: string
              frame_rate: string
              endtimecode: string
              starttimecode: string
              HomeTeam: string
              AwayTeam: string
              Competition: string
              GameDate: timestamp[s]
              SeasonYear: string
              Events: struct<Name: string, type: string, Events: list<item: struct<Name: string, type: string, Action: struct<Name: string, type: string, SubAction: struct<Name: string, type: string>>, Team: string>>>
              vs
              asset_id: string
              frame_rate: string
              endtimecode: string
              starttimecode: string
              HomeTeam: string
              AwayTeam: string
              Competition: string
              GameDate: timestamp[s]
              SeasonYear: string
              Events: struct<Name: string, type: string, Events: list<item: struct<Name: string, type: string, Action: struct<Name: string, type: string, SubAction: struct<Name: string, type: string, SubSubAction: struct<Name: string, type: string>>>, Team: string>>>

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

Soccer (Football) In-Match Events

A curated sample dataset of in-match soccer/football events, automatically identified using multi-modal models from Infactory. This dataset sample contains video clips and metadata for three key event types: yellow cards, red cards, and goals. Infactory models are capable of detecting corner kicks, blocked shots, saved shots, substitutions, and many more types of events in gameplay footage.

Dataset Description

This dataset provides 211 annotated video clips extracted from professional soccer broadcasts, totaling approximately 3.5 hours (12,677 seconds) of footage and 190,000 frames. Each sample includes:

  • A video clip (MP4, H.264/AVC, 1280×720 @ 15 FPS)
  • Rich metadata including teams, competition, and precise timing

Average clip duration is 60 seconds, making this suitable for video classification and temporal action recognition tasks.

Preview

Sample frames
Sample event frames: Goal | Yellow Card | Red Card

Event Categories

Category Description Samples
yellow_card Referee shows yellow card to a player 100
red_card Referee shows red card to a player 11
goal Goal being scored 100

Source Data

  • Competition: Serie A (Italian top-flight football)
  • Season: 2024-25
  • Provider: Infront Sports & Media
  • Broadcast Quality: HD 720p (1280x720)

Dataset Structure

infactory-ai/soccer-events/
├── README.md                    # Dataset card
├── metadata.csv                 # Index with all metadata
├── dataset_info.json            # Dataset statistics
└── data/
    ├── {uuid}.json              # Event metadata (211 files)
    └── {uuid}.mp4               # Video clips (211 files)

Metadata Fields

Field Type Description
asset_id string Unique identifier (UUID)
event_type string Original event type name
event_category string Normalized: yellow_card, red_card, goal
event_subtype string Sub-category (e.g., "Header", "Penalty")
team string Team involved: "Home" or "Away"
home_team string Home team name
away_team string Away team name
competition string Competition name
game_date string Match date (YYYY-MM-DD)
season string Season (e.g., "2024-25")
starttimecode string Clip start (HH:MM:SS:FF)
endtimecode string Clip end (HH:MM:SS:FF)
frame_rate string Video frame rate
duration_seconds float Clip duration in seconds

Usage

Loading Metadata

import pandas as pd

df = pd.read_csv("hf://datasets/infactory-ai/soccer-events/metadata.csv")

# Filter by event type
goals = df[df["event_category"] == "goal"]
red_cards = df[df["event_category"] == "red_card"]
yellow_cards = df[df["event_category"] == "yellow_card"]

print(f"Goals: {len(goals)}, Red Cards: {len(red_cards)}, Yellow Cards: {len(yellow_cards)}")

Downloading and Playing Videos

from huggingface_hub import hf_hub_download
import cv2

# Download a specific video
video_path = hf_hub_download(
    repo_id="infactory-ai/soccer-events",
    filename="data/0293e19b-7281-4f97-b2e9-57b3cee260b2.mp4",
    repo_type="dataset"
)

# Load with OpenCV
cap = cv2.VideoCapture(video_path)
fps = cap.get(cv2.CAP_PROP_FPS)
frame_count = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
print(f"Video: {fps} FPS, {frame_count} frames, {frame_count/fps:.1f}s duration")

# Read frames
while cap.isOpened():
    ret, frame = cap.read()
    if not ret:
        break
    # Process frame...
cap.release()

Extracting Frames for Training

from huggingface_hub import hf_hub_download
import cv2
import pandas as pd

# Load metadata
df = pd.read_csv("hf://datasets/infactory-ai/soccer-events/metadata.csv")

# Download and extract frames from a goal video
row = df[df["event_category"] == "goal"].iloc[0]
video_path = hf_hub_download(
    repo_id="infactory-ai/soccer-events",
    filename=f"data/{row['mp4_file']}",
    repo_type="dataset"
)

cap = cv2.VideoCapture(video_path)
frames = []
while cap.isOpened():
    ret, frame = cap.read()
    if not ret:
        break
    frame_rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
    frames.append(frame_rgb)
cap.release()

print(f"Extracted {len(frames)} frames from {row['event_type']} event")

Using with PyTorch DataLoader

import torch
from torch.utils.data import Dataset, DataLoader
from huggingface_hub import hf_hub_download
import pandas as pd
import cv2

class SoccerEventsDataset(Dataset):
    def __init__(self, event_category=None):
        self.df = pd.read_csv("hf://datasets/infactory-ai/soccer-events/metadata.csv")
        if event_category:
            self.df = self.df[self.df["event_category"] == event_category]
    
    def __len__(self):
        return len(self.df)
    
    def __getitem__(self, idx):
        row = self.df.iloc[idx]
        video_path = hf_hub_download(
            repo_id="infactory-ai/soccer-events",
            filename=f"data/{row['mp4_file']}",
            repo_type="dataset"
        )
        # Load video frames as tensor...
        return {"video_path": video_path, "label": row["event_category"]}

# Create dataloader for goals only
dataset = SoccerEventsDataset(event_category="goal")
loader = DataLoader(dataset, batch_size=4, shuffle=True)

License

This dataset contains proprietary content from Infront Sports & Media. Usage is restricted to non-commercial research purposes. For commercial and large-scale needs, contact Infactory.

Citation

@dataset{soccer_events_2026,
  title={Soccer (Football) In-Match Events},
  author={John Kanalakis, Valentino Constantinou},
  year={2026},
  publisher={Infactory},
  url={https://huggingface.co/datasets/infactory-ai/soccer-events}
}
Downloads last month
21