Skip to content

Commit d35b17f

Browse files
committed
Fix empty top-down offsets/scales default
Update the PyTorch top-down path to use a correctly structured fallback `offsets_and_scales` value when no detections are found. This keeps the data shape consistent with post-processing expectations and avoids downstream tuple unpacking/type mismatches.
1 parent 216bdb2 commit d35b17f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎dlclive/pose_estimation_pytorch/runner.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def get_pose(self, frame: np.ndarray) -> np.ndarray:
210210

211211
frame_batch, offsets_and_scales = self._prepare_top_down(tensor, detections)
212212
if len(frame_batch) == 0:
213-
offsets_and_scales = [(0, 0), 1]
213+
offsets_and_scales = [((0, 0), (1.0, 1.0))]
214214
tensor = frame_batch # still CHW, batched
215215

216216
if self.dynamic is not None:

0 commit comments

Comments
 (0)