Add read-time per-frame metadata#1733
Draft
PaulHax wants to merge 23 commits into
Draft
Conversation
The headerless image-match fallback in is_viame_csv could misclassify a VIAME-shaped telemetry table (filename in column 1, leading integer columns) as an annotation CSV and reject it. DIVE's VIAME exports always carry the '# 1: Detection or Track-id' comment header, so key detection on that header and drop the now-dead imageMap fallback.
Fix correctness regressions in the telemetry-vs-VIAME detection path: - Recognize headerless VIAME CSVs. Detection required the DIVE "# 1: Detection or Track-id" comment header, so a headerless VIAME annotation CSV was misclassified as frame metadata and silently dropped on import. Also treat a file as VIAME when its first non-comment row is itself a detection, which keeps VIAME-shaped telemetry (led by a text header) as telemetry. - Decode web sidecar files leniently so a single non-UTF-8 .txt/.csv no longer 500s the whole frame_metadata route. - Parse desktop sidecars with csv-parse relax mode so a bare quote character no longer throws, matching Python's csv.reader. - Compare multicam records order-independently so identical records in a different column order are not wrongly flagged as a collision, matching the server's dict comparison. Add regression tests for headerless VIAME rejection (server + desktop) and bare-quote parsing (desktop).
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.
Summary
.txtor.csvsidecar at view time.The sidecar file remains the source of truth. This PR does not import telemetry into annotations, does not write a derived
frame_metadata.json, and does not add frame metadata to exports.How To Use
.txtor.csvfile with a header row and one row per image.Example:
Each metadata row must include the image filename it describes. Rows that do not match an image are ignored. The metadata file does not need a special name.
For multicam, a shared sidecar can use one filename column per camera:
Implemented Approach
Source Contract
.txtand.csvsidecars with a header row and comma, tab, or whitespace delimiter sniffing.Source Discovery
Read Contract
GET /dive_dataset/:id/frame_metadata?startFrame=<n>&endFrame=<n>with inclusive, non-negative frame-window bounds.loadFrameMetadatasupport so web and desktop return the same{ cameras: { cameraName: { frame: values } } }shape.camerasmap when no usable frame metadata source is present.Camera Routing
singleCamcamera key.port_imageandstarboard_imagebind correctly.Client Display
Persistence and Export
frame_metadata.json, maintain a field registry, or add frame metadata to exports.V1 Boundaries
.txtor.csvsidecars.Related Issues