[ar-api] Annotate Action Recognition video segments from Python (VID-36) - #534
Draft
digaobarbosa wants to merge 2 commits into
Draft
digaobarbosa wants to merge 2 commits into
digaobarbosa wants to merge 2 commits into
Conversation
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Action Recognition users can upload a video but cannot yet send temporal labels through the Python SDK. Their final uploaded video ID is the one the platform will annotate, especially when upload reuses an existing Source.
This adds a project method that sends an official video-coco document to the public annotation API. It forwards native PTS, frame indices, and rational time base unchanged, and exposes only the API's overwrite, split, and Dataset membership choices.
The method returns the server's success body and raises the server's error message and HTTP status for rejected writes. An identical retry succeeds; a conflicting replacement stays a 409 until the caller opts into overwrite.
Validation
python -m unittest tests.test_video_segment_annotation tests.test_rfapi tests.test_project -q: 63 passed. The three new tests callProject.annotate_video_segmentsagainst isolatedresponsesrequest fixtures, covering HTTP 200 acceptance and retry, HTTP 409 preservation, explicit overwrite/split/Dataset options, HTTP 400 validation, and a transport failure. These fixtures verify SDK behavior, not platform execution.git diff --checkpassed.GET https://api.roboflow.one/model-evaluation-workspace/punch-hook-actions/annotatereturned HTTP 200 on 2026-10-01, but its instructions had no video entry. Platformmasteratbad84a289e3e69008039b52ea12d6b93f4c7134chas no video annotate branch. No staging video POST or end-to-end approval was attempted.Prerequisites and rollout
light-v2-datasetsandheavy-v2-uploadfunctions, before live SDK verification. This SDK PR does not deploy the server.videoId, which may differ from its initial reservation ID. This PR has no dependency on VID-35 code.