Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
LareinaM committed Jul 5, 2023
1 parent 24c9bc9 commit d7fa117
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mmpose/apis/inferencers/pose3d_inferencer.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,8 @@ def preprocess_single(self,
K,
),
dtype=np.float32)
data_info['lifting_target'] = np.zeros((K, 3), dtype=np.float32)
data_info['lifting_target_visible'] = np.ones((K, 1),
data_info['lifting_target'] = np.zeros((1, K, 3), dtype=np.float32)
data_info['lifting_target_visible'] = np.ones((1, K, 1),
dtype=np.float32)
data_info['camera_param'] = dict(w=width, h=height)

Expand Down
5 changes: 3 additions & 2 deletions mmpose/datasets/transforms/formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,9 @@ def transform(self, results: dict) -> dict:
for key, packed_key in self.label_mapping_table.items():
if key in results:
# For pose-lifting, store only target-related fields
if 'lifting_target' in results and key in {
'keypoint_labels', 'keypoint_weights'
if 'lifting_target' in results and packed_key in {
'keypoint_labels', 'keypoint_weights',
'keypoints_visible'
}:
continue
if isinstance(results[key], list):
Expand Down

0 comments on commit d7fa117

Please sign in to comment.