Skip to content

Make track lifecycle operations classification-safe - #1850

Draft
PaulHax wants to merge 7 commits into
hierarchical-classification-pr3-projectionsfrom
hierarchical-classification-pr4-lifecycle
Draft

Make track lifecycle operations classification-safe#1850
PaulHax wants to merge 7 commits into
hierarchical-classification-pr3-projectionsfrom
hierarchical-classification-pr4-lifecycle

Conversation

@PaulHax

@PaulHax PaulHax commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Make track lifecycle operations classification-safe

Merge, split, and removal operations can change several camera tracks. Before this PR, these
operations could lose classification pairs. Results could also depend on camera order.

Changes

  • Merge confidence vectors by type name.
  • Keep the highest confidence for each type.
  • Use the type name as a stable tie breaker.
  • Create the merge target in each camera that contains a target or source track.
  • Keep local observations and attributes in each camera.
  • Copy confidence vectors when DIVE splits a track.
  • Synchronize pair removal across all linked camera tracks.
  • Delete the logical track when its last pair is removed.
  • Remove stale group membership from every camera after logical-track deletion.
  • Use the first configured camera for the merged display classification.
  • Report divergent camera vectors one time after dataset load.
  • Route group type changes through group commands instead of track commands.

A source pair with confidence 1.0 no longer removes unrelated pairs during a merge. Divergence
warnings do not change stored evidence.

Camera-order behavior

Some actions must use a selected camera or the first configured camera. Other actions use the full
logical track. This PR tests display classification, geometry fallback, seek targets, and track
existence with the correct camera scope.

Manual tests

Test data: download and extract
classification.zip. Paths
below are relative to dive-classification-test-data/.

Disjoint multicamera merge

  1. Create a multicamera dataset from media/multicamera/, import the port, starboard, and
    configuration files from multicamera/disjoint-track-merge/, merge track 5 into track 4, then
    save and reload.

Verify: Both cameras contain the expected observations, attributes, and combined confidence vector.

Divergent replica repair

  1. Create a multicamera dataset from media/multicamera/ and import the annotation and
    configuration files from multicamera/divergent-classification-replicas/.
  2. Acknowledge the warning, edit track 2, then save and reload.

Verify: Both cameras agree after reload, and the divergence warning does not return.

Multicamera split

  1. Create the clean dataset from
    dive-classification-test-data/classification/multicamera-linked-types/.
  2. Split one logical track.

Verify: Both split results retain copied confidence vectors in both cameras.

Final-pair removal

  1. Create the clean dataset from
    dive-classification-test-data/classification/multicamera-linked-types/.
  2. Add one logical track to a group.
  3. Remove every confidence pair from that track, then save and reload.

Verify: The track and its group membership are absent from both cameras.

Stack

This is PR 7 of 9. Previous: add read-only track projections.
Next: add DIVE KWCOCO classification support.

  1. Allow devDependency imports in TypeScript spec files
  2. Preserve warnings from every Desktop import file
  3. Copy source metadata when creating a single-camera soft clone
  4. Add hierarchical track classification
  5. Centralize hierarchical classification changes
  6. Replace mutable merged tracks with read-only projections
  7. Current — Make track lifecycle operations classification-safe
  8. Add lossless DIVE KWCOCO classification support
  9. Define raw and resolved classification boundaries

This PR is stacked on hierarchical-classification-pr3-projections.

Overall: 16 files, +746/-115. Commits: 5c77987d through 3e6650ad.

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.

1 participant