Skip to content

Name the COCO frame rate annotation_fps - #1865

Merged
BryonLewis merged 2 commits into
mainfrom
dev/coco-annotation-fps
Aug 21, 2026
Merged

Name the COCO frame rate annotation_fps#1865
BryonLewis merged 2 commits into
mainfrom
dev/coco-annotation-fps

Conversation

@mattdawkins

Copy link
Copy Markdown
Member

Follow-up to #1861. The rate written on the COCO video entry is the rate detections were produced at — the downsampled -frate, not the video's native rate — so VIAME now writes it as annotation_fps (VIAME/VIAME@9b1227cc6). This renames the key on DIVE's side to match.

Without this, #1861's importer reads videos[].fps while current VIAME writes videos[].annotation_fps, so the frame rate does not survive a VIAME to DIVE import.

  • server: frame_rate_from_coco() reads it, export_dive_as_coco() writes it
  • desktop: frameRateFromDocument() reads it, serializeFile writes it
  • docs/DataFormats.md, including the section anchor and the two links to it
  • DIVE's own dataset metadata key is untouched and stays fps; only the COCO wire spelling changes

Verified against real process_video.py output: desktop parseFile gives meta.fps = 5 for a video and undefined for an image list; server import gives 5.0, export then writes [{'id': 1, 'name': 'clip', 'annotation_fps': 5.0}], and re-import gives 5.0 back.

Not run: vitest, eslint and tsc — no node_modules in this checkout. Server-side checks were executed directly.

The rate on the video entry is the downsampled rate detections were
produced at, not the video's native one, so VIAME writes it as
annotation_fps. Renames the key on both the import and export sides.
The export test still expected the old key.
@BryonLewis
BryonLewis merged commit 8c73200 into main Aug 21, 2026
3 checks passed
@BryonLewis
BryonLewis deleted the dev/coco-annotation-fps branch August 21, 2026 18:58
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