Align DRF skeleton preprocessing with upstream heatmap path
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user