py123d_detection.core.sources¶
Resolving “a 123D data root plus split names” into the scenes an export iterates over.
A frame-indexed pkl needs exactly one scene per log, spanning the whole log. Source
builds the SceneFilter for that and exposes the few options that matter:
Source(data_root="/data/py123d", splits=["nuscenes-mini_train"], sample_rate_hz=2.0)
Scenes built elsewhere can be passed in directly with Source.from_scenes(scenes).
Classes
|
One 123D input to export: where the logs are, which of them, and at what rate. |
- class py123d_detection.core.sources.Source(data_root=None, splits=None, datasets=None, split_types=None, log_names=None, sample_rate_hz=None, frame_stride=None, required_modalities=None, max_logs=None, timestamp_offset_us=0, name=None, scene_filter=None, scenes=None)[source]¶
Bases:
objectOne 123D input to export: where the logs are, which of them, and at what rate.
- data_root: str | Path | None = None¶
123D data root holding
logs/andmaps/.NoneusesPY123D_DATA_ROOT.
- splits: List[str] | None = None¶
Split names, e.g.
["nuscenes-mini_train"].Nonereads every split under the root.
- sample_rate_hz: float | None = None¶
Target frame rate;
2.0on a 10 Hz log keeps every 5th frame. Wins overframe_stride.
- required_modalities: List[str] | None = None¶
SceneFilter.required_scene_modalitiesentries, e.g.["camera:any", "box_detections_se3"].
- timestamp_offset_us: int = 0¶
Added to every exported timestamp of this source.
mmdet3d’s
NuScenesDataset.load_annotationssorts all infos by timestamp, so merged datasets whose timestamps overlap would get their logs interleaved. An offset keeps them apart without touching intra-log time deltas.
- scene_filter: SceneFilter | None = None¶
Use this filter instead of building one. Leave
future_duration_sandfuture_num_iterationsunset, or frames get exported more than once.
- scenes: List[SceneAPI] | None = None¶
Pre-built scenes, one per full log. No filtering happens when set.
- build_scene_filter(native_rate=False)[source]¶
Build the filter for this source.
Leaving
future_*unset puts the 123D scene builder in its one-scene-per-full-log mode.- Parameters:
native_rate (
bool) – Drop the sampling options and keep every frame. The export uses this view for lidar sweeps and track velocities.- Return type:
SceneFilter