‹ All posts

Hydrographic R&D · Field log 01 ·

Visual tokenization of sonar data

Translating high-frequency XTF captures into visual tokens so image-first compressors can stream hydrographic data faster, cheaper, and with enough fidelity for downstream seabed classification.

  • XTF
  • Side-scan sonar
  • Compression
  • Computer vision
Ingest speed-up
32%vs. baseline CARIS parser
Packet coverage
60 GB2023–24 Atlantic survey sets
Amplitude drift
< 0.9%after token round-trip

TL;DR — Tokenize sonar pings into raster tiles so image-native codecs can stream and index surveys with minimal amplitude drift. Early results: 32% faster ingest on 60 GB, enough to run QA and hazard calls on board.

Abstract

I present a visual tokenization pipeline that converts hydrographic XTF packets into rasterized frames, enabling image-native compressors to index sonar surveys with deterministic fidelity. By aligning sonar amplitudes with lightweight descriptors, the method preserves geophysical detail while unlocking GPU-friendly streaming for downstream analytics.

The current prototype reduces ingest latency enough to run hazard detection aboard survey vessels, laying groundwork for future work on cross-domain tokenizers for marine sensing.

Visual rasterization

Maps raw side-scan channels into calibrated grayscale frames — 512×512 per ping — without losing amplitude context.

Token descriptors

Deterministic histogram + Sobel tile signatures that work with compressors and CLIP-like encoders alike.

Streaming QA

Real-time reconstruction checks flag amplitude drift above 0.9% before data leaves the vessel.

Gain-aware metadata

Gain and slant-range normalization travel with each frame, so tokens can be decoded back to source values.

The field problem

Survey vessels log terabytes of XTF every week. Traditional readers march through each packet linearly, so analytics crews wait for data to “land” before QA, mosaicking or ML-based hazard calls can begin. I want a tokenizer that behaves more like an image workflow: streaming-friendly, chunkable, and compatible with modern compressors.

  • Raw inputs: dual-channel side-scan pings (512 samples each) plus metadata blocks for gain, slant range, layback and GPS fixes.
  • Constraints: runs on a laptop GPU offshore, keeps packets deterministic, and avoids rewriting the downstream toolchain.
  • Opportunity: visual compressors already know how to tokenize textures. If each ping becomes a grayscale micro-frame, delta encoding and dedupe come for free.
Four-stage pipeline: raw XTF side-scan packets go to a raster builder that renders 512×512 frames, then into 16×16 visual tokens with histogram and edge descriptors, producing a token stream, preview raster and QA metrics.

How the tokenizer works

Every ping is normalized, rendered into a 512×512 grayscale raster, then sliced into 16×16 tiles. Each tile receives a deterministic ID derived from a histogram signature plus Sobel edges, so compressors and ML models see exactly the same ordering.

  1. Decode packet headers, align channels and cache navigation metadata.
  2. Render amplitude rasters and apply adaptive contrast curves for shallow-water noise.
  3. Slice tiles, build descriptors and emit chunks that existing compressors already understand.
  4. Rebuild rasters from tokens and compare against the source packets before releasing to storage.
A rendered 512×512 sonar raster divided into a 16×16 tile map; each tile gets a histogram signature and Sobel edge map that combine into a deterministic token ID.

Data & evaluation

The study spans four Atlantic Canada survey campaigns (15–180 m depth) captured on Klein 3900 side-scan systems. Each sortie fuses GPS, INS and layback data so reconstructed rasters can be compared against CARIS mosaics at centimetre-level accuracy.

Samples processed
1.2B+amplitude pairs across dual channels
Token payload
~2.8×compression vs. raw packets, lossless
QA window
3.6 sfrom acquisition to token-level alert
Amplitude profile across channels from 0 to −40 dB over 50–350 m range, with dataset notes: four survey campaigns, 15–180 m depth, per-ping gain curves, fused GPS/layback/INS, 1.2 billion samples.

Experiment log

  • DoneRust-backed tokenizer streams 512-sample pings at 140 MB/s sustained.
  • DoneReplay tests on 60 GB of Atlantic survey data confirm 32% faster ingest than the baseline parser.
  • In progressAdaptive tiling heuristics for shallow-water noise and sharp thermoclines.
  • In progressBenchmark harness comparing CARIS HIPS/SIPS classification against token-based reconstructions.

Near-term milestones

  1. Wrap the tokenizer in a headless service between acquisition laptops and cloud buckets.
  2. Attach a lightweight anomaly detector that flags cables, wrecks or debris directly from the token stream.
  3. Publish a whitepaper and demo reel on cost savings for mixed multibeam and side-scan campaigns.

Looking for collaborators

Especially teams with messy edge cases — deep-water drop-offs, heavy vegetation, cable routes, or thermoclines that confuse standard gain curves.

Share a dataset