Skip to content

Write (note) columns on CSV export so notes survive a round trip#1753

Merged
BryonLewis merged 4 commits into
mainfrom
fix/csv-export-notes
Jul 16, 2026
Merged

Write (note) columns on CSV export so notes survive a round trip#1753
BryonLewis merged 4 commits into
mainfrom
fix/csv-export-notes

Conversation

@mattdawkins

Copy link
Copy Markdown
Member

Problem

The server CSV exporter (export_tracks_as_csv) emits (atr), (trk-atr), (poly), (hole) and (kp) columns — but never (note).

This is a one-sided format gap:

  • its own importer parses (note) (_parse_row, viame.py:234-237)
  • the Feature model carries the field (models.py:54)
  • the desktop TypeScript serializer already writes it (viame.ts:790-792)

So detection notes are dropped by every server-side export, and an export → import cycle — which is how DIVE moves annotations through pipelines and downloads — silently loses them. The two exporters disagree on the same format.

Before this change, a feature carrying notes exported as:

0,1.png,0,884,510,1219,737,0.9,-1,fish,0.9

— the notes are simply gone.

Fix

Append (note) columns after the geometry columns, matching the column ordering the TypeScript serializer uses so both exporters produce identical rows.

Tests

Adds an export → import round-trip test asserting notes survive. It fails on main and passes with this change; the existing 23 serializer tests are unaffected.

🤖 Generated with Claude Code

The server CSV exporter emitted (atr), (trk-atr), (poly), (hole) and (kp)
columns but never (note), even though its own importer parses (note) and the
Feature model carries the field.  Detection notes were therefore dropped by
every server-side export, and an export/import cycle -- which is how DIVE moves
annotations through pipelines and downloads -- silently lost them.

The desktop TypeScript serializer already writes these columns, so the two
exporters disagreed on the same format.

Append (note) columns after the geometry columns, matching the ordering the
TypeScript serializer uses, and cover the export -> import round trip.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@BryonLewis

Copy link
Copy Markdown
Collaborator

Make sure that is also exported in the TeackJSON format to ensure parity. Check the kwcoco export and see if that can be added in as well.

@BryonLewis

Copy link
Copy Markdown
Collaborator

While reviewing I remembered that we didn't have note editing/viewing in the standard mode, I added an icon and a dialog for editing notes to the track.
image

image image

@BryonLewis
BryonLewis self-requested a review July 16, 2026 13:11
@BryonLewis
BryonLewis force-pushed the fix/csv-export-notes branch from 2f68ebd to 3fa8c1d Compare July 16, 2026 13:17

@BryonLewis BryonLewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doubled checked and TrackJSON/COCO have the notes export/import options.
Updated the docs for data formats to include the notes information.
Noticed that only the bottom view have a 'notes' editor. Added to the standard view a Notes icon that will be highlighted when a note exists. When hovering it will display the text of the note and then when clicked a dialog will appear for editing the note.

@BryonLewis
BryonLewis merged commit 2d6cae3 into main Jul 16, 2026
3 checks passed
@BryonLewis
BryonLewis deleted the fix/csv-export-notes branch July 16, 2026 13:20
mattdawkins added a commit that referenced this pull request Jul 16, 2026
Brings in 8 commits, including suppression regions (#1760), the
multicam camera order fix (#1759), signal-killed pipeline handling
(#1752, #1761), the annotation rollback tombstone fix (#1751), CSV note
columns (#1753), and the vitest/ws dependabot bumps.

Viewer.vue merged cleanly: f557b21 restored the SealTK wiring that
merge 8b0ab93 had dropped, so the file no longer conflicts with main.

Two conflicts, both from suppression regions landing on main while
viame/master already carried its own copy:

* LayerManager.vue -- keep viame/master's ../utils import. main's copy
  of this file diverged and no longer needs those symbols, but the
  merged body still calls geojsonToBound, isRotationValue,
  ROTATION_ATTRIBUTE_NAME and featureHasSegmentationPolygon.
* TypeSettingsPanel.vue -- take main's suppression row (adds mt-5).

package.json resolves to main's vitest 4.1.10 bump (viame/master never
changed it off the 3.2.4 base) while keeping onnxruntime-web.

Verified: client tests 611/611 passing on Node 22, eslint clean, desktop
app builds and runs with no console errors, and on a multicam stereo
dataset ImportAnnotations still completes setup with no Annotation Set
combobox and a live openUpload.

Note: vitest 4 requires Node ^20 || ^22 || >=24, so `npm test` now fails
to start on Node 18. client/README.md still says "Requires Node 18+".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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