|
20 | 20 | "cell_type": "markdown", |
21 | 21 | "metadata": { |
22 | 22 | "id": "view-in-github", |
23 | | - "colab_type": "text" |
| 23 | + "colab_type": "text", |
| 24 | + "pycharm": { |
| 25 | + "name": "#%% md\n" |
| 26 | + } |
24 | 27 | }, |
25 | 28 | "source": [ |
26 | 29 | "<a href=\"https://colab.research.google.com/github/sign-language-processing/datasets/blob/master/examples/load.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" |
|
29 | 32 | { |
30 | 33 | "cell_type": "code", |
31 | 34 | "metadata": { |
32 | | - "id": "ov6fuFwGjlsy" |
| 35 | + "id": "ov6fuFwGjlsy", |
| 36 | + "pycharm": { |
| 37 | + "name": "#%%\n" |
| 38 | + } |
33 | 39 | }, |
34 | 40 | "source": [ |
35 | 41 | "%%capture\n", |
|
41 | 47 | { |
42 | 48 | "cell_type": "code", |
43 | 49 | "metadata": { |
44 | | - "id": "C4PZsi6pPp9j" |
| 50 | + "id": "C4PZsi6pPp9j", |
| 51 | + "pycharm": { |
| 52 | + "name": "#%%\n" |
| 53 | + } |
45 | 54 | }, |
46 | 55 | "source": [ |
47 | 56 | "import tensorflow_datasets as tfds\n", |
|
56 | 65 | { |
57 | 66 | "cell_type": "markdown", |
58 | 67 | "metadata": { |
59 | | - "id": "PKGZ4JXCZmSE" |
| 68 | + "id": "PKGZ4JXCZmSE", |
| 69 | + "pycharm": { |
| 70 | + "name": "#%% md\n" |
| 71 | + } |
60 | 72 | }, |
61 | 73 | "source": [ |
62 | 74 | "# RWTH Phoenix 2014 T" |
|
65 | 77 | { |
66 | 78 | "cell_type": "code", |
67 | 79 | "metadata": { |
68 | | - "id": "8wU1Q4URqRBE" |
| 80 | + "id": "8wU1Q4URqRBE", |
| 81 | + "pycharm": { |
| 82 | + "name": "#%%\n" |
| 83 | + } |
69 | 84 | }, |
70 | 85 | "source": [ |
71 | 86 | "config = SignDatasetConfig(name=\"only-annotations\", version=\"3.0.0\", include_video=False)\n", |
|
82 | 97 | { |
83 | 98 | "cell_type": "markdown", |
84 | 99 | "metadata": { |
85 | | - "id": "v6iBwM9lTzS6" |
| 100 | + "id": "v6iBwM9lTzS6", |
| 101 | + "pycharm": { |
| 102 | + "name": "#%% md\n" |
| 103 | + } |
86 | 104 | }, |
87 | 105 | "source": [ |
88 | 106 | "# Dicta Sign" |
|
91 | 109 | { |
92 | 110 | "cell_type": "code", |
93 | 111 | "metadata": { |
94 | | - "id": "EQWUAgpVT0bK" |
| 112 | + "id": "EQWUAgpVT0bK", |
| 113 | + "pycharm": { |
| 114 | + "name": "#%%\n" |
| 115 | + } |
95 | 116 | }, |
96 | 117 | "source": [ |
97 | 118 | "config = SignDatasetConfig(name=\"only-annotations\", version=\"1.0.0\", include_video=False, include_pose=None)\n", |
|
106 | 127 | { |
107 | 128 | "cell_type": "markdown", |
108 | 129 | "metadata": { |
109 | | - "id": "OcIs13W6TfWz" |
| 130 | + "id": "OcIs13W6TfWz", |
| 131 | + "pycharm": { |
| 132 | + "name": "#%% md\n" |
| 133 | + } |
110 | 134 | }, |
111 | 135 | "source": [ |
112 | 136 | "# ChicagoFSWild+" |
|
115 | 139 | { |
116 | 140 | "cell_type": "code", |
117 | 141 | "metadata": { |
118 | | - "id": "o1X1kIgoTfec" |
| 142 | + "id": "o1X1kIgoTfec", |
| 143 | + "pycharm": { |
| 144 | + "name": "#%%\n" |
| 145 | + } |
119 | 146 | }, |
120 | 147 | "source": [ |
121 | 148 | "# Version 2.0.0 is ChicagoFSWild+, 1.0.0 is ChicagoFSWild\n", |
|
131 | 158 | { |
132 | 159 | "cell_type": "markdown", |
133 | 160 | "metadata": { |
134 | | - "id": "XK7jyOOtYv_P" |
| 161 | + "id": "XK7jyOOtYv_P", |
| 162 | + "pycharm": { |
| 163 | + "name": "#%% md\n" |
| 164 | + } |
135 | 165 | }, |
136 | 166 | "source": [ |
137 | 167 | "# AUTSL" |
|
140 | 170 | { |
141 | 171 | "cell_type": "code", |
142 | 172 | "metadata": { |
143 | | - "id": "dfZnI9K8YxfJ" |
| 173 | + "id": "dfZnI9K8YxfJ", |
| 174 | + "pycharm": { |
| 175 | + "name": "#%%\n" |
| 176 | + } |
144 | 177 | }, |
145 | 178 | "source": [ |
146 | 179 | "config = SignDatasetConfig(name=\"only-annotations\", version=\"1.0.0\", include_video=False)\n", |
|
155 | 188 | { |
156 | 189 | "cell_type": "markdown", |
157 | 190 | "metadata": { |
158 | | - "id": "rykmI68x3E07" |
| 191 | + "id": "rykmI68x3E07", |
| 192 | + "pycharm": { |
| 193 | + "name": "#%% md\n" |
| 194 | + } |
159 | 195 | }, |
160 | 196 | "source": [ |
161 | 197 | "# SignBank" |
|
164 | 200 | { |
165 | 201 | "cell_type": "code", |
166 | 202 | "metadata": { |
167 | | - "id": "12XcWfeg21kE" |
| 203 | + "id": "12XcWfeg21kE", |
| 204 | + "pycharm": { |
| 205 | + "name": "#%%\n" |
| 206 | + } |
168 | 207 | }, |
169 | 208 | "source": [ |
170 | 209 | "signbank = tfds.load(name='sign_bank')\n", |
|
178 | 217 | { |
179 | 218 | "cell_type": "markdown", |
180 | 219 | "metadata": { |
181 | | - "id": "biXjC80j17n1" |
| 220 | + "id": "biXjC80j17n1", |
| 221 | + "pycharm": { |
| 222 | + "name": "#%% md\n" |
| 223 | + } |
182 | 224 | }, |
183 | 225 | "source": [ |
184 | 226 | "# SignTyp (https://signtyp.uconn.edu/signpuddle/index.php?ui=1&sgn=9032)\n" |
|
187 | 229 | { |
188 | 230 | "cell_type": "code", |
189 | 231 | "metadata": { |
190 | | - "id": "dVgbyUIg165c" |
| 232 | + "id": "dVgbyUIg165c", |
| 233 | + "pycharm": { |
| 234 | + "name": "#%%\n" |
| 235 | + } |
191 | 236 | }, |
192 | 237 | "source": [ |
193 | 238 | "config = SignDatasetConfig(name=\"only-annotations\", version=\"1.0.0\", include_video=False, extra={\"PHPSESSID\": \"hj9co07ct7f5noq529no9u09l4\"})\n", |
|
202 | 247 | { |
203 | 248 | "cell_type": "markdown", |
204 | 249 | "metadata": { |
205 | | - "id": "yOLfw9-z2qK7" |
| 250 | + "id": "yOLfw9-z2qK7", |
| 251 | + "pycharm": { |
| 252 | + "name": "#%% md\n" |
| 253 | + } |
206 | 254 | }, |
207 | 255 | "source": [ |
208 | 256 | "# Sign2Mint" |
|
211 | 259 | { |
212 | 260 | "cell_type": "code", |
213 | 261 | "metadata": { |
214 | | - "id": "X96ogmu_22zv" |
| 262 | + "id": "X96ogmu_22zv", |
| 263 | + "pycharm": { |
| 264 | + "name": "#%%\n" |
| 265 | + } |
215 | 266 | }, |
216 | 267 | "source": [ |
217 | 268 | "config = SignDatasetConfig(name=\"only-annotations\", version=\"1.0.0\", include_video=False)\n", |
|
226 | 277 | { |
227 | 278 | "cell_type": "markdown", |
228 | 279 | "metadata": { |
229 | | - "id": "jnf4AaX936w4" |
| 280 | + "id": "jnf4AaX936w4", |
| 281 | + "pycharm": { |
| 282 | + "name": "#%% md\n" |
| 283 | + } |
230 | 284 | }, |
231 | 285 | "source": [ |
232 | 286 | "# SWOJS Glossário" |
|
235 | 289 | { |
236 | 290 | "cell_type": "code", |
237 | 291 | "metadata": { |
238 | | - "id": "shQxQtQP359y" |
| 292 | + "id": "shQxQtQP359y", |
| 293 | + "pycharm": { |
| 294 | + "name": "#%%\n" |
| 295 | + } |
239 | 296 | }, |
240 | 297 | "source": [ |
241 | 298 | "config = SignDatasetConfig(name=\"only-annotations\", version=\"1.0.0\", include_video=False)\n", |
|
253 | 310 | { |
254 | 311 | "cell_type": "markdown", |
255 | 312 | "metadata": { |
256 | | - "id": "pNJdG7ExZugh" |
| 313 | + "id": "pNJdG7ExZugh", |
| 314 | + "pycharm": { |
| 315 | + "name": "#%% md\n" |
| 316 | + } |
257 | 317 | }, |
258 | 318 | "source": [ |
259 | 319 | "# DGS Corpus" |
|
262 | 322 | { |
263 | 323 | "cell_type": "code", |
264 | 324 | "metadata": { |
265 | | - "id": "TVjrhsbtbWbX" |
| 325 | + "id": "TVjrhsbtbWbX", |
| 326 | + "pycharm": { |
| 327 | + "name": "#%%\n" |
| 328 | + } |
266 | 329 | }, |
267 | 330 | "source": [ |
268 | 331 | "%%capture\n", |
|
271 | 334 | "execution_count": null, |
272 | 335 | "outputs": [] |
273 | 336 | }, |
| 337 | + { |
| 338 | + "cell_type": "markdown", |
| 339 | + "source": [ |
| 340 | + "## Document Level example (Long videos)" |
| 341 | + ], |
| 342 | + "metadata": { |
| 343 | + "collapsed": false, |
| 344 | + "pycharm": { |
| 345 | + "name": "#%% md\n" |
| 346 | + } |
| 347 | + } |
| 348 | + }, |
274 | 349 | { |
275 | 350 | "cell_type": "code", |
276 | 351 | "metadata": { |
|
300 | 375 | "execution_count": null, |
301 | 376 | "outputs": [] |
302 | 377 | }, |
| 378 | + { |
| 379 | + "cell_type": "markdown", |
| 380 | + "source": [ |
| 381 | + "## Sentence level example (Videos are broken down to sentences)" |
| 382 | + ], |
| 383 | + "metadata": { |
| 384 | + "collapsed": false, |
| 385 | + "pycharm": { |
| 386 | + "name": "#%% md\n" |
| 387 | + } |
| 388 | + } |
| 389 | + }, |
| 390 | + { |
| 391 | + "cell_type": "code", |
| 392 | + "execution_count": null, |
| 393 | + "outputs": [], |
| 394 | + "source": [ |
| 395 | + "from sign_language_datasets.datasets.dgs_corpus import DgsCorpusConfig\n", |
| 396 | + "\n", |
| 397 | + "config = DgsCorpusConfig(name=\"only-annotations-sentence-level\", version=\"1.0.0\", include_video=False, include_pose=None, data_type=\"sentence\")\n", |
| 398 | + "dgs_corpus = tfds.load('dgs_corpus', builder_kwargs=dict(config=config))\n", |
| 399 | + "\n", |
| 400 | + "for datum in itertools.islice(dgs_corpus[\"train\"], 0, 5):\n", |
| 401 | + " sentence = datum[\"sentence\"][\"german\"].numpy().decode('utf-8')\n", |
| 402 | + " print(sentence)\n", |
| 403 | + " print(datum)" |
| 404 | + ], |
| 405 | + "metadata": { |
| 406 | + "collapsed": false, |
| 407 | + "pycharm": { |
| 408 | + "name": "#%%\n" |
| 409 | + } |
| 410 | + } |
| 411 | + }, |
303 | 412 | { |
304 | 413 | "cell_type": "markdown", |
305 | 414 | "source": [ |
|
0 commit comments