Skip to content

[ar-api] Support Action Recognition in the SDK - #532

Draft
digaobarbosa wants to merge 2 commits into
mainfrom
digao/ar-api-sdk
Draft

digaobarbosa wants to merge 2 commits into
mainfrom
digao/ar-api-sdk

Conversation

@digaobarbosa

@digaobarbosa digaobarbosa commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

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-recognition as 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:

  1. The user creates an AR project with roboflow project create Clips --type action-recognition.
  2. The user calls version.train(model_type="cosmos3-edge").
  3. Before: the SDK exported yolov5pytorch. Now: it exports video-coco.

Type of Change

  • New feature (non-breaking change that adds functionality)

Testing

  • Unit tests: python -m unittest (1048 pass, 1 skipped). The Cosmos format cases in tests/util/test_versions.py fail 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 check and mypy roboflow are clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RXBUpHfmPSeNYibcqpPnpY

digaobarbosa and others added 2 commits September 24, 2026 20:43
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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants