We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5731ebe commit b57dc58Copy full SHA for b57dc58
dlclive/pose_estimation_pytorch/runner.py
@@ -191,9 +191,8 @@ def get_pose(self, frame: np.ndarray) -> np.ndarray:
191
192
frame_batch, offsets_and_scales = self._prepare_top_down(tensor, detections)
193
if len(frame_batch) == 0:
194
- offsets_and_scales = [(0, 0), 1]
195
- else:
196
- tensor = frame_batch # still CHW, batched
+ offsets_and_scales = [(0, 0), 1]
+ tensor = frame_batch # still CHW, batched
197
198
if self.dynamic is not None:
199
tensor = self.dynamic.crop(tensor)
@@ -356,7 +355,7 @@ def _prepare_top_down(
356
355
frame_batch = torch.stack(crops, dim=0)
357
else:
358
crop_w, crop_h = self.top_down_config.crop_size
359
- frame_batch = torch.zeros((0, 3, crop_h, crop_w), device=frame.device)
+ frame_batch = torch.zeros((1, 3, crop_h, crop_w), device=frame.device)
360
offsets_and_scales = [(0, 0), 1]
361
362
return frame_batch, offsets_and_scales
0 commit comments