Utils
infer_features(example)
Infer Hugging Face Datasets Features from an example.
Source code in mbodied/data/utils.py
64 65 66 |
|
to_features(indict, image_keys=None, exclude_keys=None, prefix='')
Convert a dictionary to a Datasets Features object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
indict
|
dict
|
The dictionary to convert. |
required |
image_keys
|
dict
|
A dictionary of keys that should be treated as images. |
None
|
exclude_keys
|
set
|
A set of full-path-keys to exclude. |
None
|
prefix
|
str
|
A prefix to add to the keys. |
''
|
Source code in mbodied/data/utils.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
|