Active and Index support filtering, creating Collections, and by extension, creating Datasets and Projects based on the custom metadata on your data.
Before you can filter your data or create a Collection based on your data’s custom metadata, the custom metadata must exist in your Annotate Project.
clientMetadata
), which is the metadata associated with individual data units. This is distinct from videoMetadata
that is used to specify video parameters when using Strict client-only access. It is also distinct from patient metadata in DICOM files.Custom metadata (clientMetadata
) is accessed by specifying the dataset using the <dataset_hash>. All Projects that have the specified Dataset attached contain custom metadata.
While not required, we strongly recommend importing a metadata schema before importing custom metadata into Encord. The process we recommend:
Importing custom metadata (clientMetadata) for any data type follows a similar format. But there are important differences for each data type.
Videos
sampling_rate
to 0
. This imports only the first frame and any key frames you specify in the video. This can significantly speed up the import of your data into Active and Index and help you to focus on only data you identify as critical.The following table provides some guidance for the examples provided after the table.
Title | Description |
---|---|
Template | Provides the proper JSON format to import videos into Encord. This template provides examples from the most basic to the most complex. |
Data | Imports videos into Encord. Why would I do this?
|
Key Frames | Imports videos with an Encord title and specifies key frames (frames of interest) for Active and Index. Why would I do this?
Specifying a sampling_rate of 0 only imports the first frame and all key frames of your video into Active and Index.If |
Custom Metadata | Imports videos with an Encord title, specifies key frames (frames of interest), and custom metadata for Active and Index. Custom metadata can be applied to the entire video or individual frames in the video. Why would I do this?
Specifying a sampling_rate of 0 only imports the first frame and all key frames of your video into Active and Index.If |
Embeddings | Imports videos with an Encord title, specifies key frames (frames of interest), custom metadata, and custom embeddings for Active and Index. This example includes the following custom metadata types: boolean, varchar, datetime, uuid, number. Why would I do this?
Specifying a sampling_rate of 0 only imports the first frame and all key frames of your video into Active and Index.If Refer to our documentation for more information about Index with Custom Metadata, Index with Custom Embeddings, Active with Custom Metadata and Active with Custom Embeddings. |
Video Metadata | Imports videos with the videoMetadata flag. When the videoMetadata flag is present in the JSON file, we directly use the supplied metadata without performing any additional validation, and do not store the file on our servers. To guarantee accurate labels, it is crucial that the metadata you provide is accurate. |
Audio files
The following is an example JSON file for uploading two audio files to Encord.
audiometadata
flag. When the audiometadata
flag is present in the JSON file, we directly use the supplied metadata without performing any additional validation, and do not store the file on our servers. To guarantee accurate labels, it is crucial that the metadata you provide is accurate.PDFs
The following is an example JSON file for uploading PDFs to Encord.
Text Files
The following is an example JSON file for uploading text files to Encord.
Single images
For detailed information about the JSON file format used for import go here.
The JSON structure for single images parallels that of videos.
Template: Provides the proper JSON format to import images into Encord.
Examples:
Data Imports the images only.
Custom Metadata: Imports images with an Encord title for the images and with custom metadata for each image. Custom metadata only appears in Active and Index as an option to filter your data. This example includes the following custom metadata types: boolean, varchar, datetime, uuid, number.
Embeddings: Imports images with an Encord title, custom metadata, and custom embeddings for each image. This example includes the following custom metadata types: boolean, varchar, datetime, uuid, number.
Image Metadata: Imports images with image metadata. This improves the import speed for your images.
Image groups
For detailed information about the JSON file format used for import go here.
clientMetadata
to images in an image group.skip_duplicate_urls
is set to true
, all URLs exactly matching existing image groups in the dataset are skipped.objectUrl_{position_number}
).Template: Provides the proper JSON format to import image groups into Encord.
Examples:
Data: Imports the image groups only.
Custom Metadata: Imports image groups with an Encord title for the image groups and with custom metadata for each image. Custom metadata only appears in Active and Index as an option to filter your data. This example includes the following custom metadata types: boolean, varchar, datetime, uuid, number.
Image sequences
For detailed information about the JSON file format used for import go here.
image_groups
array with the createVideo
flag set to true
represents a single image sequence.skip_duplicate_urls
is set to true
, all URLs exactly matching existing image sequences in the dataset are skipped.createVideo
flag to be set to true
. Both use the key image_groups
.objectUrl_{position_number}
).Template: Provides the proper JSON format to import image groups into Encord.
** Examples:**
Data: Imports the images groups only.
Custom Metadata: Imports image groups and custom metadata. This example includes the following custom metadata types: boolean, varchar, datetime, uuid, number.
DICOM
For detailed information about the JSON file format used for import go here.
dicom_series
element can contain one or more DICOM series.skip_duplicate_urls
is set to true
, all object URLs exactly matching existing DICOM files in the dataset will be skipped..dcm
file and does not have to be specific during the upload to Encord. The following is an example JSON for uploading three DICOM series belonging to a study. Each title and object URL correspond to individual DICOM series.
For each DICOM upload, an additional DicomSeries
file is created. This file represents the series file-set. Only DicomSeries
are displayed in the Encord application.
Multiple file types
You can upload multiple file types using a single JSON file. The example below shows 1 image, 2 videos, 2 image sequences, and 1 image group.
Importing with Custom Embeddings
You can import custom embeddings with custom metadata. When importing custom embeddings with custom metadata keep the following in mind:
config
is optional when importing your custom embeddings:
If config
is not specified, the sampling_rate
is 1 frame per second, and the keyframe_mode
is frame
.
sampling_rate
of 0
only imports the first frame and all keyframes of your video into Index.Examples
Before importing custom metadata to Encord, first import a metadata schema. We strongly recommend that you upload your custom metadata to Folders, instead of importing using Datasets. Importing custom metadata to data in folders allows you to filter your data in Index by custom metadata.
print
command after importing or updating your custom metadata.This code allows you to import custom metadata on specific data units in Index. This code OVERWRITES all existing custom metadata on a data unit.
This code allows you to update ALL custom metadata on ALL data units in a Folder in Index. This code OVERWRITES all existing custom metadata on a data unit.
The Specific Data Units code enables you to update custom metadata for specific data units in Index. It does not overwrite all existing custom metadata on a data unit. Instead, it updates metadata that matches existing keys with new values and adds any new custom metadata keys to the data unit without affecting other existing metadata.
The All data units in a Project code updates the custom metadata for all data units in the specified Project. Replace the client_metadata
with the metadata you want to update.
This code allows you to update custom metadata on all data units in a Folder in Index. This code OVERWRITES all existing custom metadata on a data unit.
Using bundle
allows you to update up to 1000 label rows at a time.
This code allows you to update custom metadata on specific data units in a Folder in Index. This code DOES NOT OVERWRITE existing custom metadata on a data unit. It does overwrite custom metadata with existing values and adds new custom metadata to the data unit.
Using bundle
allows you to update up to 1000 label rows at a time.
The following script adds clientMetadata
to all images / frames in a specified Image Group.
Ensure that you:
<private_key_path>
with the file path to your private SSH key.<image-group-id>
with the File ID (UUID) of the target Image Group._get_metadata_for_image
function with the clientMetadata you want to add. To add unique metadata for each image, make the function dynamic by passing additional variables.Before importing custom metadata to Encord, first import a metadata schema.
We strongly recommend that you upload your custom metadata to Folders, instead of importing using Datasets. Importing custom metadata to data in Folders allows you to filter your data in Index by custom metadata.
The following code lists the custom metadata of all data units in the specified Dataset. The code prints the custom metadata along with the data unit’s index within the dataset.
Before importing custom metadata to Encord, first import a metadata schema. We strongly recommend that you import your custom metadata to Folders, instead of importing to Datasets. Importing custom metadata to data in folders allows you to filter your data in Index by custom metadata.
You can import custom metadata (clientMetadata
) to specific data units in the Dataset.
<private_key_path>
with the path to your private key.<dataset_hash>
with the hash of your Dataset.Image1.png
and the other file names in the metadata
variable with the names of the files in your Dataset to which you want to add metadata.You can find the <data unit number> by reading all metadata in the Dataset.
clientMetadata
) to all data units in a DatasetThe following code adds the same custom metadata (clientMetadata
) to each data unit in the specified dataset. The code prints the custom metadata along with the data units index within the dataset, so that you can verify that the custom metadata was set correctly.
Reserved keywords are strings that are set aside for exclusive use. The following keywords are reserved:
keyframes
keyframes
is reserved for use with frames of interest in videos. Specifying keyframes
on specific frames ensures that those frames import into Index and Active. That means frames specified using keyframes
are available to filter your frames and for calculating embeddings on your data.
You can include keyframes
while importing your videos or after you import your videos.
Import keyframes
to Specific Data Units (Folder):
This code allows you to import keyframes
on specific videos in Index. This code DOES NOT OVERWRITE all existing custom metadata on a data unit. It does overwrite custom metadata with existing values and adds new custom metadata to the data unit.
Active and Index support filtering, creating Collections, and by extension, creating Datasets and Projects based on the custom metadata on your data.
Before you can filter your data or create a Collection based on your data’s custom metadata, the custom metadata must exist in your Annotate Project.
clientMetadata
), which is the metadata associated with individual data units. This is distinct from videoMetadata
that is used to specify video parameters when using Strict client-only access. It is also distinct from patient metadata in DICOM files.Custom metadata (clientMetadata
) is accessed by specifying the dataset using the <dataset_hash>. All Projects that have the specified Dataset attached contain custom metadata.
While not required, we strongly recommend importing a metadata schema before importing custom metadata into Encord. The process we recommend:
Importing custom metadata (clientMetadata) for any data type follows a similar format. But there are important differences for each data type.
Videos
sampling_rate
to 0
. This imports only the first frame and any key frames you specify in the video. This can significantly speed up the import of your data into Active and Index and help you to focus on only data you identify as critical.The following table provides some guidance for the examples provided after the table.
Title | Description |
---|---|
Template | Provides the proper JSON format to import videos into Encord. This template provides examples from the most basic to the most complex. |
Data | Imports videos into Encord. Why would I do this?
|
Key Frames | Imports videos with an Encord title and specifies key frames (frames of interest) for Active and Index. Why would I do this?
Specifying a sampling_rate of 0 only imports the first frame and all key frames of your video into Active and Index.If |
Custom Metadata | Imports videos with an Encord title, specifies key frames (frames of interest), and custom metadata for Active and Index. Custom metadata can be applied to the entire video or individual frames in the video. Why would I do this?
Specifying a sampling_rate of 0 only imports the first frame and all key frames of your video into Active and Index.If |
Embeddings | Imports videos with an Encord title, specifies key frames (frames of interest), custom metadata, and custom embeddings for Active and Index. This example includes the following custom metadata types: boolean, varchar, datetime, uuid, number. Why would I do this?
Specifying a sampling_rate of 0 only imports the first frame and all key frames of your video into Active and Index.If Refer to our documentation for more information about Index with Custom Metadata, Index with Custom Embeddings, Active with Custom Metadata and Active with Custom Embeddings. |
Video Metadata | Imports videos with the videoMetadata flag. When the videoMetadata flag is present in the JSON file, we directly use the supplied metadata without performing any additional validation, and do not store the file on our servers. To guarantee accurate labels, it is crucial that the metadata you provide is accurate. |
Audio files
The following is an example JSON file for uploading two audio files to Encord.
audiometadata
flag. When the audiometadata
flag is present in the JSON file, we directly use the supplied metadata without performing any additional validation, and do not store the file on our servers. To guarantee accurate labels, it is crucial that the metadata you provide is accurate.PDFs
The following is an example JSON file for uploading PDFs to Encord.
Text Files
The following is an example JSON file for uploading text files to Encord.
Single images
For detailed information about the JSON file format used for import go here.
The JSON structure for single images parallels that of videos.
Template: Provides the proper JSON format to import images into Encord.
Examples:
Data Imports the images only.
Custom Metadata: Imports images with an Encord title for the images and with custom metadata for each image. Custom metadata only appears in Active and Index as an option to filter your data. This example includes the following custom metadata types: boolean, varchar, datetime, uuid, number.
Embeddings: Imports images with an Encord title, custom metadata, and custom embeddings for each image. This example includes the following custom metadata types: boolean, varchar, datetime, uuid, number.
Image Metadata: Imports images with image metadata. This improves the import speed for your images.
Image groups
For detailed information about the JSON file format used for import go here.
clientMetadata
to images in an image group.skip_duplicate_urls
is set to true
, all URLs exactly matching existing image groups in the dataset are skipped.objectUrl_{position_number}
).Template: Provides the proper JSON format to import image groups into Encord.
Examples:
Data: Imports the image groups only.
Custom Metadata: Imports image groups with an Encord title for the image groups and with custom metadata for each image. Custom metadata only appears in Active and Index as an option to filter your data. This example includes the following custom metadata types: boolean, varchar, datetime, uuid, number.
Image sequences
For detailed information about the JSON file format used for import go here.
image_groups
array with the createVideo
flag set to true
represents a single image sequence.skip_duplicate_urls
is set to true
, all URLs exactly matching existing image sequences in the dataset are skipped.createVideo
flag to be set to true
. Both use the key image_groups
.objectUrl_{position_number}
).Template: Provides the proper JSON format to import image groups into Encord.
** Examples:**
Data: Imports the images groups only.
Custom Metadata: Imports image groups and custom metadata. This example includes the following custom metadata types: boolean, varchar, datetime, uuid, number.
DICOM
For detailed information about the JSON file format used for import go here.
dicom_series
element can contain one or more DICOM series.skip_duplicate_urls
is set to true
, all object URLs exactly matching existing DICOM files in the dataset will be skipped..dcm
file and does not have to be specific during the upload to Encord. The following is an example JSON for uploading three DICOM series belonging to a study. Each title and object URL correspond to individual DICOM series.
For each DICOM upload, an additional DicomSeries
file is created. This file represents the series file-set. Only DicomSeries
are displayed in the Encord application.
Multiple file types
You can upload multiple file types using a single JSON file. The example below shows 1 image, 2 videos, 2 image sequences, and 1 image group.
Importing with Custom Embeddings
You can import custom embeddings with custom metadata. When importing custom embeddings with custom metadata keep the following in mind:
config
is optional when importing your custom embeddings:
If config
is not specified, the sampling_rate
is 1 frame per second, and the keyframe_mode
is frame
.
sampling_rate
of 0
only imports the first frame and all keyframes of your video into Index.Examples
Before importing custom metadata to Encord, first import a metadata schema. We strongly recommend that you upload your custom metadata to Folders, instead of importing using Datasets. Importing custom metadata to data in folders allows you to filter your data in Index by custom metadata.
print
command after importing or updating your custom metadata.This code allows you to import custom metadata on specific data units in Index. This code OVERWRITES all existing custom metadata on a data unit.
This code allows you to update ALL custom metadata on ALL data units in a Folder in Index. This code OVERWRITES all existing custom metadata on a data unit.
The Specific Data Units code enables you to update custom metadata for specific data units in Index. It does not overwrite all existing custom metadata on a data unit. Instead, it updates metadata that matches existing keys with new values and adds any new custom metadata keys to the data unit without affecting other existing metadata.
The All data units in a Project code updates the custom metadata for all data units in the specified Project. Replace the client_metadata
with the metadata you want to update.
This code allows you to update custom metadata on all data units in a Folder in Index. This code OVERWRITES all existing custom metadata on a data unit.
Using bundle
allows you to update up to 1000 label rows at a time.
This code allows you to update custom metadata on specific data units in a Folder in Index. This code DOES NOT OVERWRITE existing custom metadata on a data unit. It does overwrite custom metadata with existing values and adds new custom metadata to the data unit.
Using bundle
allows you to update up to 1000 label rows at a time.
The following script adds clientMetadata
to all images / frames in a specified Image Group.
Ensure that you:
<private_key_path>
with the file path to your private SSH key.<image-group-id>
with the File ID (UUID) of the target Image Group._get_metadata_for_image
function with the clientMetadata you want to add. To add unique metadata for each image, make the function dynamic by passing additional variables.Before importing custom metadata to Encord, first import a metadata schema.
We strongly recommend that you upload your custom metadata to Folders, instead of importing using Datasets. Importing custom metadata to data in Folders allows you to filter your data in Index by custom metadata.
The following code lists the custom metadata of all data units in the specified Dataset. The code prints the custom metadata along with the data unit’s index within the dataset.
Before importing custom metadata to Encord, first import a metadata schema. We strongly recommend that you import your custom metadata to Folders, instead of importing to Datasets. Importing custom metadata to data in folders allows you to filter your data in Index by custom metadata.
You can import custom metadata (clientMetadata
) to specific data units in the Dataset.
<private_key_path>
with the path to your private key.<dataset_hash>
with the hash of your Dataset.Image1.png
and the other file names in the metadata
variable with the names of the files in your Dataset to which you want to add metadata.You can find the <data unit number> by reading all metadata in the Dataset.
clientMetadata
) to all data units in a DatasetThe following code adds the same custom metadata (clientMetadata
) to each data unit in the specified dataset. The code prints the custom metadata along with the data units index within the dataset, so that you can verify that the custom metadata was set correctly.
Reserved keywords are strings that are set aside for exclusive use. The following keywords are reserved:
keyframes
keyframes
is reserved for use with frames of interest in videos. Specifying keyframes
on specific frames ensures that those frames import into Index and Active. That means frames specified using keyframes
are available to filter your frames and for calculating embeddings on your data.
You can include keyframes
while importing your videos or after you import your videos.
Import keyframes
to Specific Data Units (Folder):
This code allows you to import keyframes
on specific videos in Index. This code DOES NOT OVERWRITE all existing custom metadata on a data unit. It does overwrite custom metadata with existing values and adds new custom metadata to the data unit.