Skip to content

Commit

Permalink
Improve the Usability of Keypoint Metric
Browse files Browse the repository at this point in the history
  • Loading branch information
RachelXu7 committed Jun 20, 2022
1 parent 79c010e commit 37556d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ppdet/metrics/keypoint_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ def update(self, inputs, outputs):
3] = kpts[:, :, 0:3]
self.results['all_boxes'][self.idx:self.idx + num_images, 0:2] = inputs[
'center'].numpy()[:, 0:2] if isinstance(
inputs['center'], paddle.Tensor) else inputs['center'][:, 0:2]
inputs['center'], paddle.Tensor) else inputs['center']
self.results['all_boxes'][self.idx:self.idx + num_images, 2:4] = inputs[
'scale'].numpy()[:, 0:2] if isinstance(
inputs['scale'], paddle.Tensor) else inputs['scale'][:, 0:2]
inputs['scale'], paddle.Tensor) else inputs['scale']
self.results['all_boxes'][self.idx:self.idx + num_images, 4] = np.prod(
inputs['scale'].numpy() * 200,
1) if isinstance(inputs['scale'], paddle.Tensor) else np.prod(
Expand Down

0 comments on commit 37556d4

Please sign in to comment.