[ar-api] Support Action Recognition in the SDK - #532
Draft
digaobarbosa wants to merge 2 commits into
Draft
digaobarbosa wants to merge 2 commits into
digaobarbosa wants to merge 2 commits into
Conversation
get_model_format fell back to yolov5pytorch for Cosmos, so version.train exported the wrong format. Map cosmos3-edge to video-coco and its image sibling cosmos3-edge-vlm to jsonl, matching the server's model registry. Add the action-recognition project type to config and the CLI. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RXBUpHfmPSeNYibcqpPnpY
The test mocked Roboflow and the workspace to check one enum value. The enum itself shows the new type, and the other CLI tests keep covering the command's registration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YFK32iFwJmoResQA754RPr
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.
What does this PR do?
An SDK user could not train Cosmos on an Action Recognition version. Training asked the server for the wrong dataset export (a YOLO format), so Cosmos had no video data to train on. The CLI also rejected
action-recognitionas a project type.Now training Cosmos exports the video format the server expects. The image-only Cosmos variant exports its own text-image format. The CLI can create Action Recognition projects.
The SDK now picks the same export format as the server for every Cosmos model.
Example:
roboflow project create Clips --type action-recognition.version.train(model_type="cosmos3-edge").yolov5pytorch. Now: it exportsvideo-coco.Type of Change
Testing
python -m unittest(1048 pass, 1 skipped). The Cosmos format cases intests/util/test_versions.pyfail if the two Cosmos entries swap order. The new CLI type is a one-line enum value, so it has no mocked test of its own.ruff format,ruff checkandmypy robofloware clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01RXBUpHfmPSeNYibcqpPnpY