Add split_track + join_tracks operators and BEV edit-controls bar - #1
Open
roboav8r wants to merge 2 commits into
Open
Add split_track + join_tracks operators and BEV edit-controls bar#1roboav8r wants to merge 2 commits into
roboav8r wants to merge 2 commits into
Conversation
split_track splits a single track at a chosen frame (frames < F keep
the original instance; frames >= F get a fresh fo.Instance);
join_tracks merges N tracks onto the earliest-frame instance. Both
write into a configurable target field (default detections_corrected),
auto-cloned from the source via clone_sample_field on first edit, so
edits are non-destructive. Mutations iterate per group slice (lidar +
cameras) so instance._id stays consistent across slices; all instance
filters use the Mongo dict form ({path: {"$in": [oid]}}) because
F("nested.array.field") == oid does not reliably elemMatch the
detections.detections.instance._id array path.
BEV panel reorganized into two flex bars sandwiching the chart:
- Top inspection bar: scene / View field (Detections-typed dropdown,
populated from list_tracking_scenes) / Coord (renamed from "View") /
track counts / Preview camera.
- New edit-controls bar between chart and scrubber: View patches /
Edit field (text, default detections_corrected) / Split track /
Merge tracks.
After a successful Split/Merge the panel evicts the cached payload
for (scene, target_field), explicitly re-fires get_scene_track_payload,
flips the view field to the just-written target so the chart re-renders
against the edited data, and refreshes the View-field dropdown.
split_track requires split_frame so palette / grid / lasso invocations
surface a prompt. Both operators return per_slice diagnostics
(n_scene / n_after_inst_filter / n_after_extra_filter / n_det_changed /
n_samp_touched) and split_track returns instance_frame_range so the
panel can surface a clear no-op message when the chosen frame lies
outside the instance's range.
Misc panel hardening: always use ctx.dataset in ListTrackingScenes
(PatchesView has no group_slices, was crashing on filtered grid
states); coerce fos.selectedSamples to a plain JS Set across FO
versions; defensively try/catch the setSelectedSamples write;
cameraMirrorSlice defaults to null instead of the KITTI-specific
"image_02".
_dev_upload.py is a thin fom.upload_plugin wrapper that loads
deployments/<name>.env via scripts/_lib/env.py (so FIFTYONE_API_URI /
FIFTYONE_API_KEY resolve to the right deployment before importing
fiftyone).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Prefill scene_name and instance_ids from selected patches, labels, or samples, in that priority. Handles PatchesView (where ctx.selected holds patch ids, not sample ids, so dataset.select silently no-ops). Surface detection-fields and selection frame range in field descriptions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
split_tracksplits a track at a chosen frame (< Fkeeps originalfo.Instance,>= Fgets a fresh one);join_tracksmerges N tracks onto the earliest-frame instance. Both write into a configurabletarget_field(defaultdetections_corrected), auto-cloned from the source viaclone_sample_fieldon first edit. Mutations iterate per group slice (lidar + cameras) soinstance._idstays consistent across slices; all instance filters use the Mongo dict form (F("nested.array.field") == oiddoesn't reliably elemMatch the array path).ctx.dataset(fixesPatchesView has no groupscrash on filtered grid states); coercefos.selectedSamplesto a plainSetacross FO versions;cameraMirrorSlicedefaults tonullinstead of the KITTI-specific `"image_02"`.Test plan
🤖 Generated with Claude Code