Add causal person track GRU residual experiment

This commit is contained in:
Xin Wang
2026-09-07 00:30:23 +08:00
parent 9fc4577aea
commit 4aed4697a5
15 changed files with 1185 additions and 43 deletions
+14 -1
View File
@@ -149,7 +149,13 @@ def _predict_states(
start,
min(start + batch_size, len(states)),
)
person_batch, person_mask = local_person_features.padded(rows)
if head.local_fusion == "track-gru-residual":
person_batch, person_mask = local_person_features.padded_history(
rows,
max_observations=head.person_history_frames,
)
else:
person_batch, person_mask = local_person_features.padded(rows)
person_batch = person_batch.to(
device=device,
dtype=torch.float32,
@@ -440,6 +446,7 @@ def main() -> None:
local_modalities=local_contract["modalities"] if local_contract else "av",
local_contract=local_contract,
local_fusion=head.local_fusion,
person_track_max_gap_seconds=head.person_track_max_gap_seconds,
)
if data.hidden_size != int(head_config["hidden_size"]):
raise ValueError(
@@ -519,12 +526,18 @@ def main() -> None:
"prediction_layout": "[target_time, class, future_horizon]",
"checkpoint": str(args.checkpoint.resolve()),
"checkpoint_epoch": checkpoint_payload.get("epoch"),
"checkpoint_training_epochs": checkpoint_payload.get(
"training_config",
{},
).get("epochs"),
"checkpoint_train_sessions": checkpoint_payload.get("train_sessions"),
"checkpoint_dev_sessions": checkpoint_payload.get("dev_sessions"),
"layer_fusion": head.layer_fusion,
"local_fusion": head.local_fusion,
"local_fusion_scope": LOCAL_FUSION_SCOPES[head.local_fusion],
"person_interaction_gates": head.person_interaction_gates(),
"person_history_frames": head.person_history_frames,
"person_track_max_gap_seconds": head.person_track_max_gap_seconds,
"local_contract": local_contract,
"transition_auxiliary": head.transition_auxiliary,
"transition_objective": checkpoint_payload.get(