FuturePastStatesFromMatricesAggregatorΒΆ
- class standard_e2e.caching.segment_context.FuturePastStatesFromMatricesAggregator(data_path, max_history_length=None, max_future_length=None, max_history_delta_t=None, max_future_delta_t=None)[source]ΒΆ
Bases:
SegmentContextAggregatorDerive past/future ego-relative trajectories from pose matrices.
- Parameters:
- process(index_df, num_workers=0, do_parallel=True, start_method='spawn')ΒΆ
Run the aggregator for each segment described in
index_df.Each segment is independent β disjoint npz files and no shared aggregator state β so the per-segment loop fans out across a process pool when
do_parallelis enabled.- Parameters:
index_df (
DataFrame) β full per-frame index DataFrame.num_workers (
int) β 0 βmultiprocessing.cpu_count(). Pool size is capped at the number of segments so we never spawn idle workers.do_parallel (
bool) β master toggle;False(ornum_workers <= 1, or a single segment) forces a sequential loop.start_method (
str) β"spawn"matches the frame-stage rationale β the parent process imports TensorFlow / OpenCV at module load andforkwould duplicate that state into workers. Use"fork"only when callers can guarantee no global TF/cv2 state in the parent (e.g. unit tests).
- Return type: