Align DRF skeleton preprocessing with upstream heatmap path

This commit is contained in:
2026-03-08 14:50:35 +08:00
parent bbb41e8dd9
commit 295d951206
10 changed files with 174 additions and 21 deletions
+7 -1
View File
@@ -47,7 +47,9 @@ class BaseModelBody(BaseModel):
labs = list2var(labs_batch).long()
seqL = np2var(seqL_batch).int() if seqL_batch is not None else None
body_features = aggregate_body_features(body_seq, seqL)
# Preserve a singleton modality axis so DRF can mirror the author stub's
# `squeeze(1)` behavior while still accepting the same sequence-level prior.
body_features = aggregate_body_features(body_seq, seqL).unsqueeze(1)
if seqL is not None:
seqL_sum = int(seqL.sum().data.cpu().numpy())
@@ -80,3 +82,7 @@ def aggregate_body_features(
aggregated.append(flattened[start:end].mean(dim=0))
start = end
return torch.stack(aggregated, dim=0)
# Match the symbol name used by the author-provided DRF stub.
BaseModel = BaseModelBody