From fae2848dd7434136550dc2141a036b6b2ee618be Mon Sep 17 00:00:00 2001 From: CarolinePascal Date: Thu, 30 Jul 2026 18:49:11 +0200 Subject: [PATCH] feat(conflicts): rely on original camera names to sort out conflicts between two cameras --- docs/source/annotation_pipeline.mdx | 4 ++ .../annotations/camera_curation/curator.py | 72 +++++++++++++++++-- tests/annotations/test_camera_curation.py | 26 +++++++ 3 files changed, 95 insertions(+), 7 deletions(-) diff --git a/docs/source/annotation_pipeline.mdx b/docs/source/annotation_pipeline.mdx index bd423121d..3e44e9b66 100644 --- a/docs/source/annotation_pipeline.mdx +++ b/docs/source/annotation_pipeline.mdx @@ -284,6 +284,10 @@ Notes: for image datasets. - Views judged unusable are only flagged by default (still renamed). Pass `--drop_unusable=true` (local path) to remove them. +- When two cameras get the same label (e.g. two `wrist` views), the tool first + tries to disambiguate from each camera's **original key** — a `..._left` + source becomes `left_wrist`, `..._right` becomes `right_wrist`. Only labels + still colliding after that fall back to `--on_collision` (`error` or `suffix`). Key options: `--mode`, `--branch`, `--n_frames`, `--view_vocabulary`, `--allow_combos`, `--on_collision`, `--drop_unusable`, and the shared diff --git a/src/lerobot/annotations/camera_curation/curator.py b/src/lerobot/annotations/camera_curation/curator.py index 05bd6a71b..941a54963 100644 --- a/src/lerobot/annotations/camera_curation/curator.py +++ b/src/lerobot/annotations/camera_curation/curator.py @@ -25,6 +25,8 @@ those frames from the dataset's first episode. from __future__ import annotations import logging +import re +from collections import Counter from dataclasses import asdict, dataclass from pathlib import Path from typing import Any @@ -161,16 +163,21 @@ def build_name_mapping( """Compute ``{old_key: observation.images.