NBA Full-Game Video Dataset
收藏资源简介:
该数据集为YouTube上可用的完整NBA比赛视频提供元数据、官方统计数据和官方逐场注释。它不重新分发视频文件,而是提供YouTube视频ID和URL,以便用户在其使用案例和本地政策允许时独立下载视频。数据集将长格式篮球视频与结构化的NBA.com比赛数据链接起来,每个保留的比赛都有经过验证的YouTube视频引用、清理后的对阵和日期、官方NBA数据统计表,以及可用的官方逐场事件序列。
This dataset provides metadata, official statistics, and official play-by-play annotations for full-length NBA game videos available on YouTube. It does not redistribute the video files, but instead provides YouTube video IDs and URLs, allowing users to independently download the videos in compliance with their use cases and local policies. This dataset links long-form basketball videos to structured NBA.com game data, where each retained game includes verified YouTube video citations, cleaned matchup information and dates, official NBA statistical tables, and available official play-by-play event sequences.
数据集概述
本数据集提供 NBA 完整比赛视频的元数据、官方统计数据和官方比赛实况(play-by-play)注释。数据集不直接分发视频文件,而是提供 YouTube 视频 ID 和 URL,用户可根据自身情况和当地政策独立下载视频。
数据集规模
- 已验证比赛总数:189 场
- 数据集总时长:约 347 小时(1,249,758 秒)
- 原始播放列表条目数:595
- 通过 NBA.com 验证前的有效候选比赛:217 场
- 包含非空实况文件的比赛:166 场
- 实况文件为空的比赛:23 场(较老的比赛)
- 总记分板行数:5,194 行
- 总实流行数:81,355 行
数据来源
- 元数据来源:YouTube 播放列表元数据和视频描述
- 官方统计数据来源:NBA.com 比赛页面
- 视频分发方式:不包含视频文件,仅提供 YouTube ID 和 URL
数据集结构
数据集目录结构如下:
NBA__Games/ ├── nba_games.jsonl # 每个保留的 YouTube 比赛对应一条元数据记录 └── games/ ├── YYYY-MM-DD-away-vs-home/ # 每场比赛一个文件夹 │ ├── video/ # 空占位目录 │ ├── box-score.jsonl # 官方 NBA 记分板数据 │ ├── play-by-play.jsonl # 官方 NBA 实况数据 │ └── metadata.json # 源和官方比赛链接元数据 └── ...
数据字段说明
nba_games.jsonl 字段
| 字段 | 类型 | 描述 |
|---|---|---|
id |
string | YouTube 视频 ID |
url |
string | YouTube 观看 URL |
title |
string | 清洗后的对阵格式,如 Team A vs. Team B |
date |
string | 验证后的比赛日期,格式 YYYY-MM-DD |
duration |
integer | YouTube 视频时长(秒) |
description |
string | YouTube 描述 |
记分板数据(box-score.jsonl)
每行代表一条团队或球员记录,包含两类:
- 团队行 (
row_type = "team"):包含source、nba_game_url、youtube_id、game_date、game_id、side(away/home)、team_id、team_city、team_name、team_tricode、score、periods、statistics等字段 - 球员行 (
row_type = "player"):增加person_id、first_name、family_name、position、jersey_num、comment、statistics等字段
statistics 对象包含出场时间、投篮、三分、罚球、篮板、助攻、抢断、盖帽、失误、犯规、得分和正负值等数据。
实况数据(play-by-play.jsonl)
每行代表一个事件/动作,包含以下常用字段:
| 字段 | 类型 | 描述 |
|---|---|---|
source |
string | 数据来源,通常为 nba.com |
game_id |
string | 官方 NBA 比赛 ID |
nba_game_url |
string | 官方 NBA.com 比赛 URL |
youtube_id |
string | 关联的 YouTube 视频 ID |
game_date |
string | 比赛日期 |
actionNumber |
integer | NBA.com 动作序列号 |
actionId |
integer | 比赛流中的动作 ID |
period |
integer | 节/加时赛编号 |
clock |
string | ISO-8601 格式比赛时钟 |
teamTricode |
string | 关联球队缩写 |
personId |
integer | 关联球员 ID |
playerName |
string | 球员显示名称 |
actionType |
string | 事件类型(如 Foul、Jump Ball、Made Shot) |
subType |
string | 事件子类型 |
scoreHome |
string | 动作后主队得分 |
scoreAway |
string | 动作后客队得分 |
shotDistance |
integer | 投篮距离 |
shotResult |
string | 投篮结果 |
isFieldGoal |
integer | 是否为投篮尝试 |
xLegacy、yLegacy |
integer | NBA 遗留投篮位置坐标 |
数据获取
可通过 Hugging Face Datasets 加载数据:
python from datasets import load_dataset dataset = load_dataset("choucsan/NBA_Games", data_files="nba_games.jsonl") games = dataset["train"]
视频文件需通过 yt-dlp 等工具独立下载。
应用场景
本数据集设计用于以下研究领域:
- 长视频理解:全场比赛时间推理、长上下文视频-语言建模、事件定位
- 视觉检索:通过文本查询检索比赛片段、跨模态检索
- 时序预测:比分走势预测、下一步动作预测、胜负概率建模
- 动作理解:篮球动作识别、细粒度时间分割、球员中心事件定位
- 多模态问答:视频问答、统计结合的问答、多跳推理
许可证
数据集采用 MIT 许可证。




