tfds-nightly 4.9.9.dev202507300045__py3-none-any.whl → 4.9.9.dev202508010048__py3-none-any.whl
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.
- tensorflow_datasets/core/dataset_builders/croissant_builder.py +3 -0
- tensorflow_datasets/core/dataset_builders/croissant_builder_test.py +9 -0
- tensorflow_datasets/core/features/video_feature.py +2 -1
- tensorflow_datasets/core/features/video_feature_test.py +5 -2
- {tfds_nightly-4.9.9.dev202507300045.dist-info → tfds_nightly-4.9.9.dev202508010048.dist-info}/METADATA +1 -1
- {tfds_nightly-4.9.9.dev202507300045.dist-info → tfds_nightly-4.9.9.dev202508010048.dist-info}/RECORD +11 -11
- {tfds_nightly-4.9.9.dev202507300045.dist-info → tfds_nightly-4.9.9.dev202508010048.dist-info}/WHEEL +0 -0
- {tfds_nightly-4.9.9.dev202507300045.dist-info → tfds_nightly-4.9.9.dev202508010048.dist-info}/entry_points.txt +0 -0
- {tfds_nightly-4.9.9.dev202507300045.dist-info → tfds_nightly-4.9.9.dev202508010048.dist-info}/licenses/AUTHORS +0 -0
- {tfds_nightly-4.9.9.dev202507300045.dist-info → tfds_nightly-4.9.9.dev202508010048.dist-info}/licenses/LICENSE +0 -0
- {tfds_nightly-4.9.9.dev202507300045.dist-info → tfds_nightly-4.9.9.dev202508010048.dist-info}/top_level.txt +0 -0
@@ -58,6 +58,7 @@ from tensorflow_datasets.core.features import image_feature
|
|
58
58
|
from tensorflow_datasets.core.features import sequence_feature
|
59
59
|
from tensorflow_datasets.core.features import tensor_feature
|
60
60
|
from tensorflow_datasets.core.features import text_feature
|
61
|
+
from tensorflow_datasets.core.features import video_feature
|
61
62
|
from tensorflow_datasets.core.utils import conversion_utils
|
62
63
|
from tensorflow_datasets.core.utils import croissant_utils
|
63
64
|
from tensorflow_datasets.core.utils import type_utils
|
@@ -195,6 +196,8 @@ def datatype_converter(
|
|
195
196
|
feature = audio_feature.Audio(
|
196
197
|
doc=field.description, sample_rate=field.source.sampling_rate
|
197
198
|
)
|
199
|
+
elif field_data_type == mlc.DataType.VIDEO_OBJECT:
|
200
|
+
feature = video_feature.Video(doc=field.description)
|
198
201
|
else:
|
199
202
|
raise ValueError(
|
200
203
|
f'Unknown data type: {field_data_type} for field {field.id}.'
|
@@ -28,6 +28,7 @@ from tensorflow_datasets.core.features import image_feature
|
|
28
28
|
from tensorflow_datasets.core.features import sequence_feature
|
29
29
|
from tensorflow_datasets.core.features import tensor_feature
|
30
30
|
from tensorflow_datasets.core.features import text_feature
|
31
|
+
from tensorflow_datasets.core.features import video_feature
|
31
32
|
from tensorflow_datasets.core.utils.lazy_imports_utils import mlcroissant as mlc
|
32
33
|
|
33
34
|
FileFormat = file_adapters.FileFormat
|
@@ -225,6 +226,14 @@ def test_datatype_converter_bbox_with_invalid_format():
|
|
225
226
|
bounding_boxes.BBoxFeature,
|
226
227
|
None,
|
227
228
|
),
|
229
|
+
(
|
230
|
+
mlc.Field(
|
231
|
+
data_types=mlc.DataType.VIDEO_OBJECT,
|
232
|
+
description="Video feature",
|
233
|
+
),
|
234
|
+
video_feature.Video,
|
235
|
+
None,
|
236
|
+
),
|
228
237
|
(
|
229
238
|
mlc.Field(
|
230
239
|
id="person",
|
@@ -129,7 +129,7 @@ class Video(sequence_feature.Sequence):
|
|
129
129
|
frame_shape = shape[1:]
|
130
130
|
self._encoding_format = encoding_format
|
131
131
|
self._extra_ffmpeg_args = list(ffmpeg_extra_args or [])
|
132
|
-
super(
|
132
|
+
super().__init__(
|
133
133
|
image_feature.Image(
|
134
134
|
shape=frame_shape,
|
135
135
|
dtype=dtype,
|
@@ -137,6 +137,7 @@ class Video(sequence_feature.Sequence):
|
|
137
137
|
use_colormap=use_colormap,
|
138
138
|
),
|
139
139
|
length=shape[0] if shape else None,
|
140
|
+
doc=doc,
|
140
141
|
)
|
141
142
|
|
142
143
|
def _ffmpeg_decode(self, path_or_fobj):
|
@@ -26,6 +26,7 @@ from tensorflow_datasets import testing
|
|
26
26
|
from tensorflow_datasets.core import features
|
27
27
|
|
28
28
|
|
29
|
+
|
29
30
|
class VideoFeatureTest(testing.FeatureExpectationsTestCase):
|
30
31
|
|
31
32
|
@property
|
@@ -34,9 +35,10 @@ class VideoFeatureTest(testing.FeatureExpectationsTestCase):
|
|
34
35
|
|
35
36
|
def test_video_numpy(self):
|
36
37
|
np_video = np.random.randint(256, size=(128, 64, 64, 3), dtype=np.uint8)
|
37
|
-
|
38
|
+
doc = 'This is a test video.'
|
39
|
+
feature = features.Video(shape=(None, 64, 64, 3), doc=doc)
|
38
40
|
self.assertFeature(
|
39
|
-
feature=
|
41
|
+
feature=feature,
|
40
42
|
shape=(None, 64, 64, 3),
|
41
43
|
dtype=tf.uint8,
|
42
44
|
tests=[
|
@@ -135,5 +137,6 @@ class VideoFeatureTest(testing.FeatureExpectationsTestCase):
|
|
135
137
|
],
|
136
138
|
)
|
137
139
|
|
140
|
+
|
138
141
|
if __name__ == '__main__':
|
139
142
|
testing.test_main()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: tfds-nightly
|
3
|
-
Version: 4.9.9.
|
3
|
+
Version: 4.9.9.dev202508010048
|
4
4
|
Summary: tensorflow/datasets is a library of datasets ready to use with TensorFlow.
|
5
5
|
Home-page: https://github.com/tensorflow/datasets
|
6
6
|
Download-URL: https://github.com/tensorflow/datasets/tags
|
{tfds_nightly-4.9.9.dev202507300045.dist-info → tfds_nightly-4.9.9.dev202508010048.dist-info}/RECORD
RENAMED
@@ -141,8 +141,8 @@ tensorflow_datasets/core/data_sources/python_test.py,sha256=O3yqMPx40JlHN0uFfZPN
|
|
141
141
|
tensorflow_datasets/core/dataset_builders/__init__.py,sha256=StTA3euephqDZdpTzJQgfWNqB5inZosrAhaWg2BOeio,1945
|
142
142
|
tensorflow_datasets/core/dataset_builders/adhoc_builder.py,sha256=QVE8wWGPOgILPTC27Q28QZ3KIi5N64OGOfKpTq4W4_0,9216
|
143
143
|
tensorflow_datasets/core/dataset_builders/adhoc_builder_test.py,sha256=yhRwrznK78MvHeWGRggnMTiyx_SlR1z30iD5VU3Gweo,13096
|
144
|
-
tensorflow_datasets/core/dataset_builders/croissant_builder.py,sha256=
|
145
|
-
tensorflow_datasets/core/dataset_builders/croissant_builder_test.py,sha256=
|
144
|
+
tensorflow_datasets/core/dataset_builders/croissant_builder.py,sha256=XmnbIKiEN9OnY_RC8P7-83hbUfvtuJhbm24HfNFpiQs,17088
|
145
|
+
tensorflow_datasets/core/dataset_builders/croissant_builder_test.py,sha256=42HpBr3pANVKiok4lcx6xqwf0fY7kma6WIGA8WehNSs,15072
|
146
146
|
tensorflow_datasets/core/dataset_builders/huggingface_dataset_builder.py,sha256=Loq3qeGk1Ias-d2oT_dK47BRNgTA4LKJchNGh7aA4a0,18313
|
147
147
|
tensorflow_datasets/core/dataset_builders/huggingface_dataset_builder_test.py,sha256=6N3DLsry9LhDqhpleaoXrrhaGiLJMBgUlwDnAji-1fI,4389
|
148
148
|
tensorflow_datasets/core/dataset_builders/view_builder.py,sha256=eaCtjN5Vg4rK8JD3auA4PhF9mjH5HvQ9dslDX8LbwyM,11907
|
@@ -213,8 +213,8 @@ tensorflow_datasets/core/features/top_level_feature.py,sha256=JeOnaBUqp-xFLuPxUt
|
|
213
213
|
tensorflow_datasets/core/features/top_level_feature_test.py,sha256=JutGHU-08tg5KWiB3mIB6Q3a80CvS5_F6jG0bfAYXWM,3628
|
214
214
|
tensorflow_datasets/core/features/translation_feature.py,sha256=Qmx39XwMJy18u9eoZlT3Spc0VT0qtqsTHahWoETLZZo,8284
|
215
215
|
tensorflow_datasets/core/features/translation_feature_test.py,sha256=iK8ckwApuMu13BS1-vkny-m_NV6uNTz6ky5gbZEfxoc,6060
|
216
|
-
tensorflow_datasets/core/features/video_feature.py,sha256=
|
217
|
-
tensorflow_datasets/core/features/video_feature_test.py,sha256=
|
216
|
+
tensorflow_datasets/core/features/video_feature.py,sha256=vtKbhT04u-Ne6BImn9VBetYwo9IAmvwKLyGxpBYAhTA,7819
|
217
|
+
tensorflow_datasets/core/features/video_feature_test.py,sha256=Zp5wuGvSajMjxiayXoFYJyYHj_M977pHq8smFIdwOqc,4321
|
218
218
|
tensorflow_datasets/core/folder_dataset/__init__.py,sha256=Pn2mSU-CPxC89lvywHAD-XrhQj0mvAaqZogpekjr-bs,1515
|
219
219
|
tensorflow_datasets/core/folder_dataset/compute_split_utils.py,sha256=Ob_ZaqfS00zViAtRhHK_ff7R8eJAtYDDh6XjQGXdcP4,13515
|
220
220
|
tensorflow_datasets/core/folder_dataset/compute_split_utils_test.py,sha256=XBo4UC1IydAPuIP1SY2psrEVeEr3y0KPmCEje6yQWhs,3784
|
@@ -2468,10 +2468,10 @@ tensorflow_datasets/vision_language/wit/wit_test.py,sha256=PXS8DMNW-MDrT2p5oy4Ic
|
|
2468
2468
|
tensorflow_datasets/vision_language/wit_kaggle/__init__.py,sha256=vGwSGeM8WE4Q-l0-eEE1sBojmk6YT0l1OO60AWa4Q40,719
|
2469
2469
|
tensorflow_datasets/vision_language/wit_kaggle/wit_kaggle.py,sha256=q-vX_FBzIwsFxL4sY9vuyQ3UQD2PLM4yhUR4U6l-qao,16903
|
2470
2470
|
tensorflow_datasets/vision_language/wit_kaggle/wit_kaggle_test.py,sha256=ZymHT1NkmD-pUnh3BmM3_g30c5afsWYnmqDD9dVyDSA,1778
|
2471
|
-
tfds_nightly-4.9.9.
|
2472
|
-
tfds_nightly-4.9.9.
|
2473
|
-
tfds_nightly-4.9.9.
|
2474
|
-
tfds_nightly-4.9.9.
|
2475
|
-
tfds_nightly-4.9.9.
|
2476
|
-
tfds_nightly-4.9.9.
|
2477
|
-
tfds_nightly-4.9.9.
|
2471
|
+
tfds_nightly-4.9.9.dev202508010048.dist-info/licenses/AUTHORS,sha256=nvBG4WwfgjuOu1oZkuQKw9kg7X6rve679ObS-YDDmXg,309
|
2472
|
+
tfds_nightly-4.9.9.dev202508010048.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
2473
|
+
tfds_nightly-4.9.9.dev202508010048.dist-info/METADATA,sha256=ovNBfSV-1zuembdfhnsc77Iwk0S5g0DAU1An6LoTH4M,11694
|
2474
|
+
tfds_nightly-4.9.9.dev202508010048.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
2475
|
+
tfds_nightly-4.9.9.dev202508010048.dist-info/entry_points.txt,sha256=eHEL7nF5y1uCY2FgkuYIdE062epJXlAQTSdq89px4p4,73
|
2476
|
+
tfds_nightly-4.9.9.dev202508010048.dist-info/top_level.txt,sha256=bAevmk9209s_oxVZVlN6hSDIVS423qrMQvmcWSvW4do,20
|
2477
|
+
tfds_nightly-4.9.9.dev202508010048.dist-info/RECORD,,
|
{tfds_nightly-4.9.9.dev202507300045.dist-info → tfds_nightly-4.9.9.dev202508010048.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|