opensportslib 0.1.3.dev2__tar.gz → 0.1.3.dev3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. {opensportslib-0.1.3.dev2/opensportslib.egg-info → opensportslib-0.1.3.dev3}/PKG-INFO +85 -4
  2. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/README.md +84 -3
  3. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3/opensportslib.egg-info}/PKG-INFO +85 -4
  4. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/pyproject.toml +1 -1
  5. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/LICENSE +0 -0
  6. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/LICENSE-COMMERCIAL +0 -0
  7. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/MANIFEST.in +0 -0
  8. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/examples/quickstart/basic_classification.py +0 -0
  9. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/examples/quickstart/basic_localization.py +0 -0
  10. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/__init__.py +0 -0
  11. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/apis/__init__.py +0 -0
  12. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/apis/base_task_model.py +0 -0
  13. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/apis/classification.py +0 -0
  14. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/apis/localization.py +0 -0
  15. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/cli.py +0 -0
  16. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/config/classification.yaml +0 -0
  17. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/config/localization-e2e-ocv.yaml +0 -0
  18. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/config/localization-json_calf_resnetpca512.yaml +0 -0
  19. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/config/localization-json_netvlad++_resnetpca512.yaml +0 -0
  20. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/config/localization.yaml +0 -0
  21. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/config/sngar-frames.yaml +0 -0
  22. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/config/sngar-tracking.yaml +0 -0
  23. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/__init__.py +0 -0
  24. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/loss/__init__.py +0 -0
  25. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/loss/builder.py +0 -0
  26. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/loss/calf.py +0 -0
  27. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/loss/ce.py +0 -0
  28. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/loss/combine.py +0 -0
  29. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/loss/nll.py +0 -0
  30. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/optimizer/__init__.py +0 -0
  31. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/optimizer/builder.py +0 -0
  32. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/sampler/weighted_sampler.py +0 -0
  33. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/scheduler/__init__.py +0 -0
  34. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/scheduler/builder.py +0 -0
  35. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/trainer/__init__.py +0 -0
  36. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/trainer/classification_trainer.py +0 -0
  37. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/trainer/localization_trainer.py +0 -0
  38. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/utils/checkpoint.py +0 -0
  39. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/utils/config.py +0 -0
  40. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/utils/data.py +0 -0
  41. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/utils/ddp.py +0 -0
  42. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/utils/default_args.py +0 -0
  43. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/utils/lightning.py +0 -0
  44. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/utils/load_annotations.py +0 -0
  45. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/utils/seed.py +0 -0
  46. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/utils/video_processing.py +0 -0
  47. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/core/utils/wandb.py +0 -0
  48. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/datasets/__init__.py +0 -0
  49. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/datasets/builder.py +0 -0
  50. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/datasets/classification_dataset.py +0 -0
  51. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/datasets/localization_dataset.py +0 -0
  52. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/datasets/utils/__init__.py +0 -0
  53. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/datasets/utils/tracking.py +0 -0
  54. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/metrics/classification_metric.py +0 -0
  55. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/metrics/localization_metric.py +0 -0
  56. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/__init__.py +0 -0
  57. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/backbones/builder.py +0 -0
  58. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/base/contextaware.py +0 -0
  59. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/base/e2e.py +0 -0
  60. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/base/learnablepooling.py +0 -0
  61. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/base/tracking.py +0 -0
  62. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/base/vars.py +0 -0
  63. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/base/video.py +0 -0
  64. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/base/video_mae.py +0 -0
  65. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/builder.py +0 -0
  66. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/heads/builder.py +0 -0
  67. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/neck/builder.py +0 -0
  68. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/utils/common.py +0 -0
  69. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/utils/impl/__init__.py +0 -0
  70. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/utils/impl/asformer.py +0 -0
  71. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/utils/impl/calf.py +0 -0
  72. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/utils/impl/gsm.py +0 -0
  73. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/utils/impl/gtad.py +0 -0
  74. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/utils/impl/tsm.py +0 -0
  75. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/utils/litebase.py +0 -0
  76. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/utils/modules.py +0 -0
  77. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/utils/shift.py +0 -0
  78. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/models/utils/utils.py +0 -0
  79. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/setup/setup.py +0 -0
  80. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/tools/__init__.py +0 -0
  81. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/tools/_common.py +0 -0
  82. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/tools/hf_transfer.py +0 -0
  83. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/tools/osl_json_to_parquet.py +0 -0
  84. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib/tools/parquet_to_osl_json.py +0 -0
  85. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib.egg-info/SOURCES.txt +0 -0
  86. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib.egg-info/dependency_links.txt +0 -0
  87. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib.egg-info/entry_points.txt +0 -0
  88. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib.egg-info/requires.txt +0 -0
  89. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/opensportslib.egg-info/top_level.txt +0 -0
  90. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/setup.cfg +0 -0
  91. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/tests/conftest.py +0 -0
  92. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/tests/test_classification_dataset_paths.py +0 -0
  93. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/tests/test_classification_trainer_dataloader.py +0 -0
  94. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/tests/test_config_utils_smoke.py +0 -0
  95. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/tests/test_conversion_tools.py +0 -0
  96. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/tests/test_hf_transfer_tools.py +0 -0
  97. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/tests/test_localization_dali_filenames.py +0 -0
  98. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/tests/test_package_smoke.py +0 -0
  99. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/tests/test_public_apis_smoke.py +0 -0
  100. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/tests/test_subset_train_infer_integration.py +0 -0
  101. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/tests/test_task_model_api_contract.py +0 -0
  102. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/tools/convert/build_soccernet_gar.py +0 -0
  103. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/tools/convert/build_soccernet_gar_action_spotting.py +0 -0
  104. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/tools/convert/osl_json_to_parquet_webdataset.py +0 -0
  105. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/tools/convert/parquet_webdataset_to_osl_json.py +0 -0
  106. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/tools/download/download_hf_repo.py +0 -0
  107. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/tools/download/download_osl_hf.py +0 -0
  108. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/tools/download/upload_osl_hf.py +0 -0
  109. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/tools/training/classification.py +0 -0
  110. {opensportslib-0.1.3.dev2 → opensportslib-0.1.3.dev3}/tools/training/localization.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: opensportslib
3
- Version: 0.1.3.dev2
3
+ Version: 0.1.3.dev3
4
4
  Summary: OpenSportsLib is the professional library, designed for advanced video understanding in sports. It provides state-of-the-art tools for action recognition, spotting, retrieval, and captioning, making it ideal for researchers, analysts, and developers working with sports video data.
5
5
  Author: Jeet Vora
6
6
  Requires-Python: >=3.12
@@ -57,6 +57,7 @@ OpenSportsLib is designed for **researchers, ML engineers, and sports analytics
57
57
  ## Quick links
58
58
 
59
59
  - **Documentation:** https://opensportslab.github.io/opensportslib/
60
+ - **OSL JSON format:** https://opensportslab.github.io/opensportslib/data/osl-json-format/
60
61
  - **PyPI:** https://pypi.org/project/opensportslib/
61
62
  - **Issues:** https://github.com/OpenSportsLab/opensportslib/issues
62
63
 
@@ -116,7 +117,82 @@ Use it as the main entry point to find:
116
117
  See the [Model Zoo](docs/model-zoo.md) for available pretrained models,
117
118
  reported scores, datasets, and loading snippets.
118
119
 
119
- --
120
+ ---
121
+
122
+ ## Dataset format
123
+
124
+ OpenSportsLib annotation files use the **OSL JSON v2.0** format. A dataset JSON
125
+ contains top-level metadata, a shared `labels` schema, and a `data` array where
126
+ each sample points to one or more inputs.
127
+
128
+ Minimal classification sample:
129
+
130
+ ```json
131
+ {
132
+ "labels": {
133
+ "action": {
134
+ "type": "single_label",
135
+ "labels": ["pass", "shot"]
136
+ }
137
+ },
138
+ "data": [
139
+ {
140
+ "id": "clip_0001",
141
+ "inputs": [
142
+ {
143
+ "type": "video",
144
+ "path": "clips/clip_0001.mp4",
145
+ "fps": 25.0
146
+ }
147
+ ],
148
+ "labels": {
149
+ "action": {
150
+ "label": "shot"
151
+ }
152
+ }
153
+ }
154
+ ]
155
+ }
156
+ ```
157
+
158
+ Minimal localization sample:
159
+
160
+ ```json
161
+ {
162
+ "labels": {
163
+ "action": {
164
+ "type": "single_label",
165
+ "labels": ["pass", "shot"]
166
+ }
167
+ },
168
+ "data": [
169
+ {
170
+ "id": "game_0001",
171
+ "inputs": [
172
+ {
173
+ "type": "video",
174
+ "path": "games/game_0001.mp4",
175
+ "fps": 25.0
176
+ }
177
+ ],
178
+ "events": [
179
+ {
180
+ "head": "action",
181
+ "label": "pass",
182
+ "position_ms": 1240
183
+ }
184
+ ]
185
+ }
186
+ ]
187
+ }
188
+ ```
189
+
190
+ Relative paths in `inputs[].path` are resolved from the split media root in the
191
+ YAML config, for example `DATA.train.video_path`. See the full
192
+ [OSL JSON format guide](docs/data/osl-json-format.md) for field definitions,
193
+ multi-modal examples, prediction payloads, and conversion notes.
194
+
195
+ ---
120
196
 
121
197
  ## Quickstart
122
198
 
@@ -223,8 +299,8 @@ from opensportslib.tools import (
223
299
  ### Scripts
224
300
 
225
301
  ```bash
226
- python tools/download_osl_hf.py --repo-id <org/repo> --revision main --split test --format parquet --output-dir downloaded_data
227
- python tools/upload_osl_hf.py --repo-id <org/repo> --json-path <local_dataset.json> --split test --revision main
302
+ python tools/download/download_osl_hf.py --repo-id <org/repo> --revision main --split test --format parquet --output-dir downloaded_data
303
+ python tools/download/upload_osl_hf.py --repo-id <org/repo> --json-path <local_dataset.json> --split test --revision main
228
304
  ```
229
305
 
230
306
  Downloads are placed under `<output-dir>/<revision>/<split>`.
@@ -241,9 +317,13 @@ Predict when key events happen in long untrimmed sports videos.
241
317
 
242
318
  ### Action Retrieval
243
319
  Search and retrieve relevant clips or moments from a collection of sports videos.
320
+ This is part of the roadmap and OSL data model, not a first-class OpenSportsLib
321
+ training workflow yet.
244
322
 
245
323
  ### Action Description / Captioning
246
324
  Generate text descriptions for sports events and temporal segments.
325
+ This is part of the roadmap and OSL data model, not a first-class OpenSportsLib
326
+ training workflow yet.
247
327
 
248
328
  ---
249
329
 
@@ -263,6 +343,7 @@ Generate text descriptions for sports events and temporal segments.
263
343
  Use the README for the fast start, then go deeper through:
264
344
 
265
345
  - Full documentation: https://opensportslab.github.io/opensportslib/
346
+ - OSL JSON format: [docs/data/osl-json-format.md](docs/data/osl-json-format.md)
266
347
  - High-level API guide: [opensportslib/apis/README.md](opensportslib/apis/README.md)
267
348
  - Configuration guide: https://opensportslab.github.io/opensportslib/tni/config-guide/
268
349
  - Example configs: [examples/configs/](examples/configs/)
@@ -22,6 +22,7 @@ OpenSportsLib is designed for **researchers, ML engineers, and sports analytics
22
22
  ## Quick links
23
23
 
24
24
  - **Documentation:** https://opensportslab.github.io/opensportslib/
25
+ - **OSL JSON format:** https://opensportslab.github.io/opensportslib/data/osl-json-format/
25
26
  - **PyPI:** https://pypi.org/project/opensportslib/
26
27
  - **Issues:** https://github.com/OpenSportsLab/opensportslib/issues
27
28
 
@@ -81,7 +82,82 @@ Use it as the main entry point to find:
81
82
  See the [Model Zoo](docs/model-zoo.md) for available pretrained models,
82
83
  reported scores, datasets, and loading snippets.
83
84
 
84
- --
85
+ ---
86
+
87
+ ## Dataset format
88
+
89
+ OpenSportsLib annotation files use the **OSL JSON v2.0** format. A dataset JSON
90
+ contains top-level metadata, a shared `labels` schema, and a `data` array where
91
+ each sample points to one or more inputs.
92
+
93
+ Minimal classification sample:
94
+
95
+ ```json
96
+ {
97
+ "labels": {
98
+ "action": {
99
+ "type": "single_label",
100
+ "labels": ["pass", "shot"]
101
+ }
102
+ },
103
+ "data": [
104
+ {
105
+ "id": "clip_0001",
106
+ "inputs": [
107
+ {
108
+ "type": "video",
109
+ "path": "clips/clip_0001.mp4",
110
+ "fps": 25.0
111
+ }
112
+ ],
113
+ "labels": {
114
+ "action": {
115
+ "label": "shot"
116
+ }
117
+ }
118
+ }
119
+ ]
120
+ }
121
+ ```
122
+
123
+ Minimal localization sample:
124
+
125
+ ```json
126
+ {
127
+ "labels": {
128
+ "action": {
129
+ "type": "single_label",
130
+ "labels": ["pass", "shot"]
131
+ }
132
+ },
133
+ "data": [
134
+ {
135
+ "id": "game_0001",
136
+ "inputs": [
137
+ {
138
+ "type": "video",
139
+ "path": "games/game_0001.mp4",
140
+ "fps": 25.0
141
+ }
142
+ ],
143
+ "events": [
144
+ {
145
+ "head": "action",
146
+ "label": "pass",
147
+ "position_ms": 1240
148
+ }
149
+ ]
150
+ }
151
+ ]
152
+ }
153
+ ```
154
+
155
+ Relative paths in `inputs[].path` are resolved from the split media root in the
156
+ YAML config, for example `DATA.train.video_path`. See the full
157
+ [OSL JSON format guide](docs/data/osl-json-format.md) for field definitions,
158
+ multi-modal examples, prediction payloads, and conversion notes.
159
+
160
+ ---
85
161
 
86
162
  ## Quickstart
87
163
 
@@ -188,8 +264,8 @@ from opensportslib.tools import (
188
264
  ### Scripts
189
265
 
190
266
  ```bash
191
- python tools/download_osl_hf.py --repo-id <org/repo> --revision main --split test --format parquet --output-dir downloaded_data
192
- python tools/upload_osl_hf.py --repo-id <org/repo> --json-path <local_dataset.json> --split test --revision main
267
+ python tools/download/download_osl_hf.py --repo-id <org/repo> --revision main --split test --format parquet --output-dir downloaded_data
268
+ python tools/download/upload_osl_hf.py --repo-id <org/repo> --json-path <local_dataset.json> --split test --revision main
193
269
  ```
194
270
 
195
271
  Downloads are placed under `<output-dir>/<revision>/<split>`.
@@ -206,9 +282,13 @@ Predict when key events happen in long untrimmed sports videos.
206
282
 
207
283
  ### Action Retrieval
208
284
  Search and retrieve relevant clips or moments from a collection of sports videos.
285
+ This is part of the roadmap and OSL data model, not a first-class OpenSportsLib
286
+ training workflow yet.
209
287
 
210
288
  ### Action Description / Captioning
211
289
  Generate text descriptions for sports events and temporal segments.
290
+ This is part of the roadmap and OSL data model, not a first-class OpenSportsLib
291
+ training workflow yet.
212
292
 
213
293
  ---
214
294
 
@@ -228,6 +308,7 @@ Generate text descriptions for sports events and temporal segments.
228
308
  Use the README for the fast start, then go deeper through:
229
309
 
230
310
  - Full documentation: https://opensportslab.github.io/opensportslib/
311
+ - OSL JSON format: [docs/data/osl-json-format.md](docs/data/osl-json-format.md)
231
312
  - High-level API guide: [opensportslib/apis/README.md](opensportslib/apis/README.md)
232
313
  - Configuration guide: https://opensportslab.github.io/opensportslib/tni/config-guide/
233
314
  - Example configs: [examples/configs/](examples/configs/)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: opensportslib
3
- Version: 0.1.3.dev2
3
+ Version: 0.1.3.dev3
4
4
  Summary: OpenSportsLib is the professional library, designed for advanced video understanding in sports. It provides state-of-the-art tools for action recognition, spotting, retrieval, and captioning, making it ideal for researchers, analysts, and developers working with sports video data.
5
5
  Author: Jeet Vora
6
6
  Requires-Python: >=3.12
@@ -57,6 +57,7 @@ OpenSportsLib is designed for **researchers, ML engineers, and sports analytics
57
57
  ## Quick links
58
58
 
59
59
  - **Documentation:** https://opensportslab.github.io/opensportslib/
60
+ - **OSL JSON format:** https://opensportslab.github.io/opensportslib/data/osl-json-format/
60
61
  - **PyPI:** https://pypi.org/project/opensportslib/
61
62
  - **Issues:** https://github.com/OpenSportsLab/opensportslib/issues
62
63
 
@@ -116,7 +117,82 @@ Use it as the main entry point to find:
116
117
  See the [Model Zoo](docs/model-zoo.md) for available pretrained models,
117
118
  reported scores, datasets, and loading snippets.
118
119
 
119
- --
120
+ ---
121
+
122
+ ## Dataset format
123
+
124
+ OpenSportsLib annotation files use the **OSL JSON v2.0** format. A dataset JSON
125
+ contains top-level metadata, a shared `labels` schema, and a `data` array where
126
+ each sample points to one or more inputs.
127
+
128
+ Minimal classification sample:
129
+
130
+ ```json
131
+ {
132
+ "labels": {
133
+ "action": {
134
+ "type": "single_label",
135
+ "labels": ["pass", "shot"]
136
+ }
137
+ },
138
+ "data": [
139
+ {
140
+ "id": "clip_0001",
141
+ "inputs": [
142
+ {
143
+ "type": "video",
144
+ "path": "clips/clip_0001.mp4",
145
+ "fps": 25.0
146
+ }
147
+ ],
148
+ "labels": {
149
+ "action": {
150
+ "label": "shot"
151
+ }
152
+ }
153
+ }
154
+ ]
155
+ }
156
+ ```
157
+
158
+ Minimal localization sample:
159
+
160
+ ```json
161
+ {
162
+ "labels": {
163
+ "action": {
164
+ "type": "single_label",
165
+ "labels": ["pass", "shot"]
166
+ }
167
+ },
168
+ "data": [
169
+ {
170
+ "id": "game_0001",
171
+ "inputs": [
172
+ {
173
+ "type": "video",
174
+ "path": "games/game_0001.mp4",
175
+ "fps": 25.0
176
+ }
177
+ ],
178
+ "events": [
179
+ {
180
+ "head": "action",
181
+ "label": "pass",
182
+ "position_ms": 1240
183
+ }
184
+ ]
185
+ }
186
+ ]
187
+ }
188
+ ```
189
+
190
+ Relative paths in `inputs[].path` are resolved from the split media root in the
191
+ YAML config, for example `DATA.train.video_path`. See the full
192
+ [OSL JSON format guide](docs/data/osl-json-format.md) for field definitions,
193
+ multi-modal examples, prediction payloads, and conversion notes.
194
+
195
+ ---
120
196
 
121
197
  ## Quickstart
122
198
 
@@ -223,8 +299,8 @@ from opensportslib.tools import (
223
299
  ### Scripts
224
300
 
225
301
  ```bash
226
- python tools/download_osl_hf.py --repo-id <org/repo> --revision main --split test --format parquet --output-dir downloaded_data
227
- python tools/upload_osl_hf.py --repo-id <org/repo> --json-path <local_dataset.json> --split test --revision main
302
+ python tools/download/download_osl_hf.py --repo-id <org/repo> --revision main --split test --format parquet --output-dir downloaded_data
303
+ python tools/download/upload_osl_hf.py --repo-id <org/repo> --json-path <local_dataset.json> --split test --revision main
228
304
  ```
229
305
 
230
306
  Downloads are placed under `<output-dir>/<revision>/<split>`.
@@ -241,9 +317,13 @@ Predict when key events happen in long untrimmed sports videos.
241
317
 
242
318
  ### Action Retrieval
243
319
  Search and retrieve relevant clips or moments from a collection of sports videos.
320
+ This is part of the roadmap and OSL data model, not a first-class OpenSportsLib
321
+ training workflow yet.
244
322
 
245
323
  ### Action Description / Captioning
246
324
  Generate text descriptions for sports events and temporal segments.
325
+ This is part of the roadmap and OSL data model, not a first-class OpenSportsLib
326
+ training workflow yet.
247
327
 
248
328
  ---
249
329
 
@@ -263,6 +343,7 @@ Generate text descriptions for sports events and temporal segments.
263
343
  Use the README for the fast start, then go deeper through:
264
344
 
265
345
  - Full documentation: https://opensportslab.github.io/opensportslib/
346
+ - OSL JSON format: [docs/data/osl-json-format.md](docs/data/osl-json-format.md)
266
347
  - High-level API guide: [opensportslib/apis/README.md](opensportslib/apis/README.md)
267
348
  - Configuration guide: https://opensportslab.github.io/opensportslib/tni/config-guide/
268
349
  - Example configs: [examples/configs/](examples/configs/)
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "opensportslib"
7
- version = "0.1.3.dev2"
7
+ version = "0.1.3.dev3"
8
8
  description = "OpenSportsLib is the professional library, designed for advanced video understanding in sports. It provides state-of-the-art tools for action recognition, spotting, retrieval, and captioning, making it ideal for researchers, analysts, and developers working with sports video data."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"