-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ext] Add video template (dev-1238) (#1799)
* [ext] Add video template (dev-1238) * Update value * docs: Add video object detector template to docs * Update config.yml * Update video_object_detector.md * Fix Co-authored-by: smoreface <smoreface@users.noreply.github.com>
- Loading branch information
Showing
5 changed files
with
85 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
title: Video Object Detection | ||
type: templates | ||
category: Videos | ||
cat: videos | ||
order: 803 | ||
is_new: t | ||
meta_title: Video Object Detection Data Labeling Template | ||
meta_description: Template for detecting objects in videos with Label Studio for your machine learning and data science projects. | ||
--- | ||
|
||
## Labeling Configuration | ||
|
||
```html | ||
<View> | ||
<Header>Label the video:</Header> | ||
<Video name="video" value="$video" framerate="25.0"/> | ||
<VideoRectangle name="box" toName="video" /> | ||
<Labels name="videoLabels" toName="video" allowEmpty="true"> | ||
<Label value="Man" background="blue"/> | ||
<Label value="Woman" background="red"/> | ||
<Label value="Other" background="green"/> | ||
</Labels> | ||
</View> | ||
``` | ||
|
||
## About the labeling configuration | ||
|
||
All labeling configurations must be wrapped in [View](/tags/view.html) tags. | ||
|
||
You can add a [header](/tags/header.html) to provide instructions to the annotator: | ||
```xml | ||
<Header>Label the video:</Header> | ||
``` | ||
|
||
Use the [Video](/tags/video.html) object tag to specify the video data. The `framerate` parameter sets the frame rate of all videos in the project. | ||
```xml | ||
<Video name="video" value="$video" framerate="25.0"/> | ||
``` | ||
|
||
Use the [VideoRectangle](/tags/videorectangle.html) control tag to allow annotators to add rectangles to video frames: | ||
```xml | ||
<VideoRectangle name="box" toName="video" /> | ||
``` | ||
|
||
Use the [Labels](/tags/labels.html) control tag to specify labels that can be added to the rectangle regions added to the video frames: | ||
```xml | ||
<Labels name="videoLabels" toName="video" allowEmpty="true"> | ||
<Label value="Man" background="blue"/> | ||
<Label value="Woman" background="red"/> | ||
<Label value="Other" background="green"/> | ||
</Labels> | ||
``` | ||
|
||
## Related tags | ||
- [Video](/tags/video.html) | ||
- [VideoRectangle](/tags/videorectangle.html) | ||
- [Labels](/tags/labels.html) |
22 changes: 22 additions & 0 deletions
22
label_studio/annotation_templates/videos/video-object-tracking/config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
title: Video Object Tracking | ||
group: Videos | ||
image: /static/templates/object-detection-with-bounding-boxes.png | ||
details: <h1>Object tracking in video with bounding boxes</h1> | ||
config: | | ||
<View> | ||
<Header>Label the video:</Header> | ||
<!-- Please specify FPS carefully, it will be used for all project videos --> | ||
<Video name="video" value="$video" framerate="25.0"/> | ||
<VideoRectangle name="box" toName="video" /> | ||
<Labels name="videoLabels" toName="video" allowEmpty="true"> | ||
<Label value="Man" background="blue"/> | ||
<Label value="Woman" background="red"/> | ||
<Label value="Other" background="green"/> | ||
</Labels> | ||
</View> | ||
<!--{ | ||
"video": "/static/samples/opossum_snow.mp4" | ||
}--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters