Skip to content

feat: BROS-833: Video vectors#9504

Merged
robot-ci-heartex merged 29 commits intodevelopfrom
fb-bros-833
Mar 13, 2026
Merged

feat: BROS-833: Video vectors#9504
robot-ci-heartex merged 29 commits intodevelopfrom
fb-bros-833

Conversation

@nick-skriabin
Copy link
Copy Markdown
Member

@nick-skriabin nick-skriabin commented Mar 2, 2026

This pull request introduces support for vector-based annotations on video frames by adding new VideoVector and VideoVectorLabels tags, along with their associated backend and frontend logic. It also updates documentation, schema definitions, and region handling to accommodate these new annotation types. Additionally, the PR implements keyframe-based interpolation for smooth vector transitions across video frames.

The most important changes are:

New Video Vector Annotation Support:

  • Added VideoVector and VideoVectorLabels tags to the schema (tags.json) with comprehensive attribute definitions for vector annotation on videos, including support for keyframe interpolation, skeleton mode, and customizable appearance. [1] [2]
  • Implemented the VideoVectorRegionModel in the frontend, including logic for keyframe-based interpolation of vector shapes, region actions, and registration in the region registry. [1] [2] [3] [4] [5] [6] [7] [8]

Documentation Updates:

  • Added detailed parameter documentation for the new VideoVector and VideoVectorLabels tags. [1] [2]

Backend and Data Model Adjustments:

  • Updated backend logic to recognize and correctly process VideoVectorLabels in project configuration and annotation label extraction, ensuring compatibility with existing video annotation workflows. [1] [2]

Frontend Display and Usability Improvements:

  • Improved label display logic for video regions to ensure labels are shown only when appropriate settings are enabled. [1] [2]
  • Registered the new region type for use in the editor and included it in the set of recognized result types.

Schema Cleanup:

  • Removed the curves attribute from the schema for relevant tags, possibly to avoid redundancy or confusion, as curve support is now handled differently. [1] [2]

@nick-skriabin nick-skriabin requested a review from a team March 2, 2026 18:59
@nick-skriabin nick-skriabin requested a review from hlomzik as a code owner March 2, 2026 18:59
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 2, 2026

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit 747ee58
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-docs-new-theme/deploys/69b3fb0a41b4ca0007499ea0

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 2, 2026

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit 747ee58
🔍 Latest deploy log https://app.netlify.com/projects/heartex-docs/deploys/69b3fb0a98546f0008d023d9

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 2, 2026

Deploy Preview for label-studio-playground ready!

Name Link
🔨 Latest commit 747ee58
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-playground/deploys/69b3fb0a9b969700083c6faf
😎 Deploy Preview https://deploy-preview-9504--label-studio-playground.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added the feat label Mar 2, 2026
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 2, 2026

Deploy Preview for label-studio-storybook ready!

Name Link
🔨 Latest commit 747ee58
🔍 Latest deploy log https://app.netlify.com/projects/label-studio-storybook/deploys/69b3fb0cfc837f00083571ce
😎 Deploy Preview https://deploy-preview-9504--label-studio-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nick-skriabin
Copy link
Copy Markdown
Member Author

nick-skriabin commented Mar 3, 2026

/fmt

Workflow run

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class support for vector (polyline/polygon) annotations on video frames, including new schema tags, frontend region/tool implementations, and backend label extraction adjustments.

Changes:

  • Introduces new VideoVector / VideoVectorLabels control tags and registers a new VideoVectorRegionModel region type.
  • Implements video vector rendering + editing via KonvaVector, including keyframe-based interpolation over frames.
  • Updates editor plumbing (result types, area dispatch, view tag registry) and docs/schema to recognize the new annotation types.

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
web/libs/editor/src/tools/index.js Exposes the new VideoVector tool from the tools entrypoint.
web/libs/editor/src/tools/VideoVector.js Adds a dedicated drawing tool for video vector regions (click/dblclick workflow).
web/libs/editor/src/tags/visual/View.jsx Allows videovector / videovectorlabels tags in the View tag whitelist.
web/libs/editor/src/tags/object/Video/VideoVector.jsx New Konva overlay shape for rendering/editing video vectors with percent↔pixel conversion.
web/libs/editor/src/tags/object/Video/VideoRegions.jsx Routes stage mouse events to the vector tool and renders VideoVectorShape for the new region type.
web/libs/editor/src/tags/object/Video/Video.js Adds videoVectorControl and addVideoVectorRegion() creation path.
web/libs/editor/src/tags/object/Video/HtxVideo.jsx Treats video as “supports regions” when vector controls exist.
web/libs/editor/src/tags/control/index.js Registers VideoVectorModel + VideoVectorLabelsModel exports.
web/libs/editor/src/tags/control/VideoVectorLabels.jsx Implements combined VideoVector+Labels control.
web/libs/editor/src/tags/control/VideoVector.js Implements VideoVector control model and tag registration.
web/libs/editor/src/tags/control/Vector.js Updates Vector docs comment to remove the curves param mention.
web/libs/editor/src/tags/control/Label.jsx Allows Label to be nested under VideoVectorLabels.
web/libs/editor/src/regions/index.js Registers VideoVectorRegionModel in the global regions union/exports.
web/libs/editor/src/regions/VideoVectorRegion.jsx Adds the new video vector region model with keyframe interpolation + shape updates.
web/libs/editor/src/regions/Result.js Adds videovector / videovectorlabels as recognized result types/values.
web/libs/editor/src/regions/Area.js Routes video results to VideoVectorRegionModel when sequence items include vertices.
web/libs/editor/src/components/SidePanels/DetailsPanel/RegionItem.tsx Shows “incomplete region” warning based on region.incomplete.
web/libs/editor/src/components/Node/Node.tsx Adds node metadata (name/icon/content) for video vector regions.
web/libs/editor/src/components/KonvaVector/eventHandlers/mouseHandlers.ts Avoids internal point creation logic when point addition is externally managed.
web/libs/editor/src/components/KonvaVector/KonvaVector.tsx Tweaks “drawing disabled” logic for externally-managed point creation + ghost-line state.
web/libs/editor/src/components/ImageView/LabelOnRegion.jsx Makes video label rendering safer and respects showLabels via optional chaining.
web/libs/core/src/lib/utils/schema/tags.json Adds schema definitions for VideoVector / VideoVectorLabels and updates allowed tags list; removes curves from Vector schema.
label_studio/projects/models.py Updates project label validation / extraction to account for new video vector types.
docs/source/includes/tags/videovectorlabels.md Adds docs for VideoVectorLabels parameters.
docs/source/includes/tags/videovector.md Adds docs for VideoVector parameters.
docs/source/includes/tags/vector.md Removes curves from Vector docs table.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread web/libs/core/src/lib/utils/schema/tags.json
Comment thread web/libs/editor/src/regions/VideoVectorRegion.jsx
Comment thread label_studio/projects/models.py Outdated
Comment thread web/libs/editor/src/tags/object/Video/VideoVector.jsx
Comment thread web/libs/editor/src/tags/control/VideoVector.js
Comment thread web/libs/core/src/lib/utils/schema/tags.json
@nick-skriabin
Copy link
Copy Markdown
Member Author

nick-skriabin commented Mar 11, 2026

/fmt

Workflow run

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 26 out of 26 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

web/libs/editor/src/components/SidePanels/DetailsPanel/RegionItem.tsx:73

  • RegionItem now relies on region.incomplete to show the “Incomplete …” warning, but many region models (e.g. PolygonRegionModel, RectRegionModel, VideoRectangleRegionModel) don’t define an incomplete view, so the warning will no longer appear while those regions are being drawn. Consider falling back to the previous region.isDrawing check (or defining a default incomplete getter in a shared mixin like AreaMixin) so in-progress drawings still show the warning consistently.
        {region.incomplete && (
          <div className={cn("detailed-region").elem("warning").toClassName()}>
            <IconWarning />
            <div className={cn("detailed-region").elem("warning-text").toClassName()}>
              Incomplete {region.type?.replace("region", "") ?? "region"}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread web/libs/editor/src/tools/VideoVector.js
Comment thread web/libs/core/src/lib/utils/schema/tags.json
Comment thread web/libs/editor/src/regions/VideoVectorRegion.jsx
Comment thread web/libs/editor/src/tags/object/Video/VideoVector.jsx Outdated
@nick-skriabin nick-skriabin requested a review from a team March 12, 2026 12:13
@nick-skriabin nick-skriabin requested a review from a team March 12, 2026 12:18
Comment thread web/libs/editor/src/regions/VideoVectorRegion.jsx
Comment thread web/libs/editor/src/tools/VideoVector.js Outdated
Copy link
Copy Markdown
Contributor

@yyassi-heartex yyassi-heartex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good over all, just had a question and a minor nitpick

@nick-skriabin
Copy link
Copy Markdown
Member Author

nick-skriabin commented Mar 12, 2026

/fmt

Workflow run

@nick-skriabin
Copy link
Copy Markdown
Member Author

nick-skriabin commented Mar 12, 2026

/git merge

Workflow run
Successfully merged: create mode 100644 web/tools/loaders/svg-source-loader.cjs

@robot-ci-heartex robot-ci-heartex merged commit e8d826e into develop Mar 13, 2026
56 of 57 checks passed
@robot-ci-heartex robot-ci-heartex deleted the fb-bros-833 branch March 13, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants