You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7052e9b
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CHANGELOG.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
9
9
10
10
### Added
11
11
12
-
- **Fusion of top and side views (3-D projects).** The Views page gains a **Fusion** section for the selected pair with a status line and **Set up fusion…**. The dialog shows the side view with two draggable lines for the water surface and the tank floor, fields for both rows, the tank height (default 20 cm), the shared horizontal axis (top-view x or y) with Flip, and the frame offset (hidden and fixed at 0 for "One video, two panels"), a live summary (shared frames, fused fish, positions outside the water column, agreement) and **Suggest offset**, which scans ±5 s around 0 (about 3 s on a 1-hour, 5-fish recording; needs a calibrated top view, otherwise it is disabled with a hint). The fusion keeps the fish matched in the pair on the frames both views have and adds a depth (0 = surface, 1 = floor; positions outside the column become empty and are counted). The cameras are assumed to be at right angles; the two views' horizontal positions are compared in cm and a warning shows when they disagree by more than 10% of the top-view range (needs a calibrated top view). Frame rates must match. New `FusionSettings` on each pair (`ViewPair.fusion`), `PreprocessedSession.depth`, `Engine.fuse_pair`, `fuse_all` and `suggest_offset`. The Views status warns "Fusion setup needed for …" and never blocks. 3-D projects still cannot be run: the 3-D metrics step is not built.
12
+
- **3-D metrics (fused 3-D projects).** Three new metrics next to the 2-D ones, which are unchanged: **IL-16 3-D Distance Travelled** (`path_length_3d_cm`, `path_length_3d_bl`, `n_valid_steps`), **IL-17 3-D Speed** (`mean_speed_3d_cm_s`, `median_speed_3d_cm_s`, `max_speed_3d_cm_s`, `mean_speed_3d_bl_s`) and **GL-16 3-D Nearest-Neighbour Distance** (`mean_nnd_3d_cm`, `median_nnd_3d_cm`, `mean_nnd_3d_bl`, `n_skipped_frames_3d`). Positions are in cm: x and y from the top view divided by its scale, depth fraction times the tank height from the fusion settings. IL-16 and IL-17 need identities, GL-16 does not; all three compute per time bin like their 2-D counterparts. They need the top view's cm scale (scalar or session calibration): in a 2-D project they are greyed out ("needs a fused 3-D session"), under body-length calibration they are greyed out ("needs a cm scale for the top view (use scalar or session calibration)"), and a unit whose top view has no scale is skipped at run time ("needs a cm scale for the top view"), with the reason in the run README. Track2Data does not estimate the scale from the fusion. IL-17 uses the project's kinematics estimator for the vertical speed, and its horizontal part is IL-2's speed. A step, frame or speed needs a valid x, y and depth, otherwise the value is NaN, never 0. Not included: vertical speed as its own metric, 3-D inter-individual distance and cohesion. The Metrics screen presets (for example *All metrics*) no longer tick any row that is greyed out for the project (also, for instance, identity-needing metrics when every session is identity-free). `codebook.csv` lists the whole registry, so it gains rows for the three metrics in 2-D runs too; no other 2-D output changes. `track2data list-metrics` shows "fused 3-D + cm scale" for them.
13
+
- **Run a 3-D project.** A 3-D project now runs: every top/side pair with fusion settings that fuses without error becomes one run unit (id `<top>+<side>`, output folder `<run>/<top>+<side>/`), and each unit goes through the usual pipeline as a fused session. Sessions in no fusable pair, and pairs that fail to fuse, are left out with their reason: the Processing screen lists them, the run writes them to `skipped.csv` and to a "Skipped sessions" section of `PROJECT_SUMMARY.md` (both only when something was skipped), and `track2data run` prints them. A 3-D project with no fusable pair refuses to run ("no pair is ready to fuse: ..." or "Pair and fuse a top and a side session first"); one bad pair among good ones does not stop the run. Vertical position (IL-15) reads the fused depth, with `depth_extent_source` = `fusion`, and is available for a fused session whatever the project's camera view is; `frac_outside_extent` counts the side positions that fell outside the water column. Where the fused frames jump (a frame one of the views lacks), the fused track keeps a break, as a 2-D session tracked in separate intervals does, so path length and every other metric that steps from frame to frame never bridges the gap. A unit carries the TOP session's metadata (session-level columns such as `group_id`, `treatment` or `sex`), and per-animal metadata matches the fused fish by the top session's label or index. The per-frame tables (CSV long, Feather, Excel) gain `depth_fraction` and `depth_cm` for fused sessions; `sessions.csv`, each unit's README ("3-D fusion") and `manifest.json` (`run_metadata.fusion`) record how the pair was fused, including the SHA-256 of the side trajectory file. `PROJECT_SUMMARY.md` counts "Units processed (fused pairs)", and the pooled `all_sessions/manifest.json` records each unit's fusion. `track2data validate` and Validate check only the sessions that run: the consistency report reads the top session of each pair with fusion settings, and session calibration checks both sessions of such pairs. Serial and parallel runs give identical files. Processing, Preview and Export are blocked only while no pair has fusion settings; Processing shows what will run and what is skipped, and Preview shows the top-view tracks of a fused unit. `track2data validate` lists unfusable pairs as notes. 2-D projects are unchanged. Still missing: 3-D speed, path length and neighbour distance (sub-project B2); zones are one set applied to the top view; `sensitivity` refuses 3-D projects. New `Engine.run_units`, `RunPlan`, `RunUnit` and `Engine.validation_issues`.
14
+
- **Fusion of top and side views (3-D projects).** The Views page gains a **Fusion** section for the selected pair with a status line and **Set up fusion…**. The dialog shows the side view with two draggable lines for the water surface and the tank floor, fields for both rows, the tank height (default 20 cm), the shared horizontal axis (top-view x or y) with Flip, and the frame offset (hidden and fixed at 0 for "One video, two panels"), a live summary (shared frames, fused fish, positions outside the water column, agreement) and **Suggest offset**, which scans ±5 s around 0 (about 3 s on a 1-hour, 5-fish recording; needs a calibrated top view, otherwise it is disabled with a hint). The fusion keeps the fish matched in the pair on the frames both views have and adds a depth (0 = surface, 1 = floor; positions outside the column become empty and are counted). The cameras are assumed to be at right angles; the two views' horizontal positions are compared in cm and a warning shows when they disagree by more than 10% of the top-view range (needs a calibrated top view). Frame rates must match. New `FusionSettings` on each pair (`ViewPair.fusion`), `PreprocessedSession.depth`, `Engine.fuse_pair`, `fuse_all` and `suggest_offset`. The Views status warns "Fusion setup needed for …" and never blocks. A fused pair is what a 3-D run is made of (see "Run a 3-D project" above).
13
15
-**Note on provenance hashes:**`project_hash` now includes each session's (empty) `panel` field, so the provenance hash of an existing project changes once after this update. Results are not affected.
14
-
- **Panels: one video, two views (3-D projects, "One video, two panels" layout).** A session can now have a *panel*, the rectangle of the video it covers (`SessionRef.panel`; projects without it load unchanged). Reading a session with a panel keeps the animals that have at least 50% of their positions inside it, sets positions outside to NaN and reports coordinates relative to the panel (its top-left is (0, 0), the video size becomes the panel size), so previews, runs and the CLI all see the panel. The same folder with a different panel is a different session, and the panel is part of the preprocessing cache key. The Views page gains a **Panels** section (that layout only) with **Split into panels…** (one tracker run on the whole frame becomes `<id>__top` and `<id>__side` plus a hand-made pair), **Set panel…** (two tracker runs on one video, each limited to one panel) and **Clear panel**. The panel editor has the presets Left | Right and Top | Bottom with a split slider, exact x, y, width and height fields, a preview over the tracker's background image (or the first video frame, or the tracks), and a per-fish table that flags fish under 90% inside as *low* and under 50% as *left out*. Changing or clearing a panel resets the fish map of the pair that holds the session. The zones backdrop, calibration and preview show the cropped panel. Zones are still one set per project, and per-view pixel-scale calibration is not part of this change. 3-D projects still cannot be run.
15
-
- **ID correspondence between views (3-D projects).** A new **Views** page (page 10, under the Sessions row of the sidebar, reached by Next/Back between Sessions and Calibration; 3-D projects only) records which session is the top view and which the side view, pairs them by two session-name patterns with a `key` group (with an ⓘ help and a live "catches N sessions" line) or by hand, and maps each top-view fish to a side-view fish: by a "Same IDs" tick, or in a table with two highlighted track plots. The project file gains `SessionRef.view_role`, `view_pairs` and `mode.pairing`; `mode.id_map` is gone (projects that contain it still load). The fish map is what counts: a pair is matched when its map is not empty. **Pair by pattern** keeps the pairs it made earlier that the patterns still produce, with their matching, removes the ones they no longer produce, and skips pairs you made or changed by hand (ticking Same IDs or changing a fish makes a pair yours). In 3-D projects the Sessions row of the sidebar shows the worse of the Sessions and Views statuses, with the Views message in its tooltip. It never blocks Next, and 3-D projects still cannot be run.
16
+
- **Panels: one video, two views (3-D projects, "One video, two panels" layout).** A session can now have a *panel*, the rectangle of the video it covers (`SessionRef.panel`; projects without it load unchanged). Reading a session with a panel keeps the animals that have at least 50% of their positions inside it, sets positions outside to NaN and reports coordinates relative to the panel (its top-left is (0, 0), the video size becomes the panel size), so previews, runs and the CLI all see the panel. The same folder with a different panel is a different session, and the panel is part of the preprocessing cache key. The Views page gains a **Panels** section (that layout only) with **Split into panels…** (one tracker run on the whole frame becomes `<id>__top` and `<id>__side` plus a hand-made pair), **Set panel…** (two tracker runs on one video, each limited to one panel) and **Clear panel**. The panel editor has the presets Left | Right and Top | Bottom with a split slider, exact x, y, width and height fields, a preview over the tracker's background image (or the first video frame, or the tracks), and a per-fish table that flags fish under 90% inside as *low* and under 50% as *left out*. Changing or clearing a panel resets the fish map of the pair that holds the session. The zones backdrop, calibration and preview show the cropped panel. Zones are still one set per project, and per-view pixel-scale calibration is not part of this change.
17
+
- **ID correspondence between views (3-D projects).** A new **Views** page (page 10, under the Sessions row of the sidebar, reached by Next/Back between Sessions and Calibration; 3-D projects only) records which session is the top view and which the side view, pairs them by two session-name patterns with a `key` group (with an ⓘ help and a live "catches N sessions" line) or by hand, and maps each top-view fish to a side-view fish: by a "Same IDs" tick, or in a table with two highlighted track plots. The project file gains `SessionRef.view_role`, `view_pairs` and `mode.pairing`; `mode.id_map` is gone (projects that contain it still load). The fish map is what counts: a pair is matched when its map is not empty. **Pair by pattern** keeps the pairs it made earlier that the patterns still produce, with their matching, removes the ones they no longer produce, and skips pairs you made or changed by hand (ticking Same IDs or changing a fish makes a pair yours). In 3-D projects the Sessions row of the sidebar shows the worse of the Sessions and Views statuses, with the Views message in its tooltip. It never blocks Next.
16
18
-**Session calibration works beyond idtracker.ai.** The Calibration screen describes the mode per tracker, with an ⓘ note linking to each tracker's documentation, and disables it when no session can supply a scale. DeepLabCut, SLEAP and Ctrax raw files take an optional **Scale (pixels per cm)** import option.
17
19
-**`trx.mat` reader (Ctrax / FlyTracker / JAABA).** Built from the documented layout, unverified against a real sample. `pxpermm` becomes the session scale.
18
20
-**Average or median of several idtracker.ai length calibrations.** The average (idtracker.ai's own `length_unit`) stays the default.
@@ -25,10 +27,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
25
27
-**A project can now be marked 2D or 3D.** The Project screen has an "Analysis type" choice. 3D asks how the
26
28
recording was made: one video with the top and side views in two panels, or two separate videos. The choice is saved
27
29
in the project file (`mode`; older projects load as 2D) and is locked once the project has a session: remove all
28
-
sessions to change it. 3-D fusion and 3-D metrics do not exist yet, so a 3-D project can be set up and saved but
29
-
not run: Processing, Preview and Export are blocked with "3-D fusion is not available yet", and the engine, `compute_metrics`
30
-
and the `sensitivity` command refuse the same way. Calibration, Zones and Metrics show a banner saying they apply
31
-
to the 2-D tracks only. 2D projects behave exactly as before. The project fingerprint (`project_hash`, printed in the
30
+
sessions to change it. A 3-D project runs its fused pairs (see "Run a 3-D project" above); until a pair has fusion
31
+
settings, Processing, Preview and Export are blocked with "Pair and fuse a top and a side session first", and the
32
+
`sensitivity` command refuses 3-D projects. Calibration, Zones and Metrics show a banner saying they apply to the
33
+
top-view tracks of each fused pair. 2D projects behave exactly as before. The project fingerprint (`project_hash`, printed in the
32
34
run README and log) of existing projects changes once, because the new `mode` setting is part of it.
0 commit comments