Skip to content

Add a batch import for multicam datasets#1745

Merged
BryonLewis merged 10 commits into
dev/sealtkfrom
dev/multicollect-import
Jul 8, 2026
Merged

Add a batch import for multicam datasets#1745
BryonLewis merged 10 commits into
dev/sealtkfrom
dev/multicollect-import

Conversation

@romleiaj

@romleiaj romleiaj commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

A high-level overview of this branch (dev/multicollect-import, off dev/sealtk) for reviewers.

What it does

Imports many multicam datasets in one action. You point DIVE at a top-level folder whose
subfolders are "collects"; each collect holds the same set of camera subfolders (e.g. EO/,
IR/, UV/) of image frames. DIVE scans and validates them, shows a summary table, and then
creates one multicam dataset per collect — referencing the imagery in place (nothing is copied).

rootFolder/
  collect_001/   EO/ IR/ UV/   -> one multicam dataset
  collect_002/   EO/ IR/ UV/   -> one multicam dataset
  ...

Why it exists

Seal (and similar aerial) surveys produce dozens of collects in the same camera layout.
Importing them one at a time through the normal multicam dialog is slow and error-prone. This
adds a single "scan a folder, import them all" flow with up-front validation, so a whole survey
lands in a few clicks and bad collects are flagged instead of silently failing mid-way.

GUI elements added

  • "MultiCam Batch" entry in the desktop Import menu (ImportButton).
  • Batch Multicam Import dialog (ImportMultiCamBatchDialog.vue):
    • "Choose Root Folder" button + scan progress.
    • A summary table — one row per collect showing its cameras (with per-camera frame
      counts), any validation problems (blocking, red) or warnings (non-blocking, amber,
      e.g. differing frame counts), and a live status chip (Ready / Importing / Imported /
      Failed / Skipped).
    • An "Import N Collects" button and a final "imported X of Y (Z failed / skipped)" summary.

How it's implemented (high level)

  • Scanner (multiCollectImport.ts, desktop backend) — lists collect folders, finds the
    image-bearing camera subfolders, derives the canonical camera set (union of camera names
    across collects, matched case-insensitively), validates it (must be 2–3 valid camera names),
    and per collect produces either ready-to-run import arguments or a list of blocking problems.
    It reuses the existing multicam import backend (findImagesInFolder, the subfolder-layout
    helpers, beginMultiCamImportfinalizeImportconvert) so no new import path or copying
    is introduced.
  • IPC + API — one new channel (scan-multicam-batch) and its api.ts wrapper; a small set
    of result types (MultiCamBatchScanResult / …Collect / …Camera) in constants.ts.
  • Dialog drives the flow: scan → review → import each valid collect sequentially, with a
    per-collect try/catch so one failure doesn't stop the batch (mirrors the existing bulk
    import). Status is tracked reactively and the recents list refreshes after each import.

Files it touches (8 files, ~914 lines)

Area Key files
Scanner (backend) client/platform/desktop/backend/native/multiCollectImport.ts (+ 263-line spec)
Desktop wiring client/platform/desktop/backend/ipcService.ts, frontend/api.ts, constants.ts
Dialog UI client/platform/desktop/frontend/components/ImportMultiCamBatchDialog.vue
Menu / mount client/dive-common/components/ImportButton.vue, platform/desktop/frontend/components/Recent.vue

Platform support

Desktop only. The scanner, IPC channel, and dialog all live under platform/desktop. The
shared ImportButton gained a batchMultiCamImport prop that defaults to false, and only
the desktop Recent.vue turns it on — so the menu entry never appears on web and nothing else
changes there. (Batch import needs direct filesystem folder scanning, which the web platform
doesn't do.)

romleiaj and others added 2 commits July 7, 2026 18:57
Scans a root folder of collect folders (collect -> camera -> images) and
produces per-collect beginMultiCamImport arguments for MML seal surveys,
without copying imagery. Camera subfolders are matched case-insensitively
across collects; the canonical camera set is the union of image-bearing
subfolder names, limited to 2-3 alphanumeric cameras to match the existing
multicam subfolder import. Missing/empty/imageless camera folders are
reported as per-collect blocking problems; frame-count mismatches are
non-blocking warnings (seal collects legitimately drop frames). Default
display camera follows pickDefaultMulticamCamera (center/middle alias,
else the middle camera of display order).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
New 'MultiCam Batch' entry in the Open Image Sequence dropdown (desktop
only, behind a new batch-multi-cam-import prop on ImportButton) opens
ImportMultiCamBatchDialog: pick a root folder, review a per-collect
validation summary table (cameras, frame counts, problems/warnings),
then import all valid collects sequentially via the existing
import-multicam-media / finalize-import machinery, continuing past
per-collect failures and reporting a final summary. Adds the
scan-multicam-batch IPC handler and scanMultiCamBatch frontend API.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@romleiaj romleiaj requested a review from BryonLewis July 7, 2026 23:04
@romleiaj romleiaj changed the title Dev/multicollect import Add a batch import for multicam datasets Jul 8, 2026
@BryonLewis

Copy link
Copy Markdown
Collaborator

Some updates to this PR:

  • Merged the base in so I could check the percentage scaling
  • Added support for skipping and renaming datasets that are imported using the batch import
  • Added support for the batch import to the Web as well
  • Updated the system so the EO is typically on the left while IR is on the right side when imported
  • disable stereo service when in multicam mode and subType isn't 'stereo'

Demo Video:

20260708-DIVE-MultiCamBatchImport_small.mp4

@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.

I left it as a dropdown under image-sequence and added some functionality to skip certain sub-folders, as well as edit the name of the dataset during import.

Added the same functionality to the web version.

Updated documentation as well.

@BryonLewis BryonLewis merged commit 301f4ea into dev/sealtk Jul 8, 2026
3 checks passed
@BryonLewis BryonLewis deleted the dev/multicollect-import branch July 8, 2026 16:26
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