Add frame context_id description (#464)

This commit is contained in:
pollfly 2023-02-02 08:00:31 +02:00 committed by GitHub
parent e585d09e98
commit beac27cd8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,6 +14,7 @@ A `SingleFrame` contains the following components:
* [Masks](#masks) * [Masks](#masks)
* [Previews](#previews) * [Previews](#previews)
* [Metadata](#metadata) * [Metadata](#metadata)
* [Context ID](#context-id)
### Sources ### Sources
Every `SingleFrame` includes a [`sources`](sources.md) dictionary, which contains attributes of the raw data, including: Every `SingleFrame` includes a [`sources`](sources.md) dictionary, which contains attributes of the raw data, including:
@ -52,6 +53,18 @@ For more information, see [Previews](previews.md).
For more information, see [Custom Metadata](custom_metadata.md). For more information, see [Custom Metadata](custom_metadata.md).
### Context ID
Frames' `context_id` property facilitates grouping SingleFrames and FrameGroups. When a `context_id` is not explicitly
defined, the frame's source URI is used instead.
When you query the server for frames (e.g. with the [`DataView.get_iterator`](../references/hyperdataset/dataview.md#get_iterator)
method), the returned frames are grouped together according to their `context_id`, and within their context group are
ordered according to their `timestamp`.
Use the WebApp's dataset version frame browser "Group by URL" option to display a single preview for all frames with the
same context ID. Click the preview to view the context group's frames in the frame viewer in order of their timestamps.
This is useful when working with a video. You can give all the video frames the same context ID, and then view them in order.
## Frame Structure ## Frame Structure
The panel below describes the details contained within a `frame`: The panel below describes the details contained within a `frame`:
@ -218,7 +231,7 @@ There are also options to populate the instance with:
* A dictionary of annotation objects - `annotations` * A dictionary of annotation objects - `annotations`
* A URI link to a mask file for the frame - `mask_source` * A URI link to a mask file for the frame - `mask_source`
For more information, see the `SingleFrame` class description. For more information, see the [`SingleFrame`](../references/hyperdataset/singleframe.md) class description.
### Adding SingleFrames to a Dataset Version ### Adding SingleFrames to a Dataset Version