Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

add switch to turn off keypoint probabilities for training #76

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions common/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def parse_args():
parser.add_argument('-arc', '--architecture', default='3,3,3', type=str, metavar='LAYERS', help='filter widths separated by comma')
parser.add_argument('--causal', action='store_true', help='use causal convolutions for real-time processing')
parser.add_argument('-ch', '--channels', default=1024, type=int, metavar='N', help='number of channels in convolution layers')
parser.add_argument('--no_kp_probs', dest='keypoint_probs', help='don\'t use keypoint probabilities', action='store_false')

# Experimental
parser.add_argument('--subset', default=1, type=float, metavar='FRACTION', help='reduce dataset size by fraction')
Expand Down
7 changes: 5 additions & 2 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@
for cam_idx, kps in enumerate(keypoints[subject][action]):
# Normalize camera frame
cam = dataset.cameras()[subject][cam_idx]
kps[..., :2] = normalize_screen_coordinates(kps[..., :2], w=cam['res_w'], h=cam['res_h'])
if args.keypoint_probs:
kps[..., :2] = normalize_screen_coordinates(kps[..., :2], w=cam['res_w'], h=cam['res_h'])
else:
kps = normalize_screen_coordinates(kps[..., :2], w=cam['res_w'], h=cam['res_h'])
keypoints[subject][action][cam_idx] = kps

subjects_train = args.subjects_train.split(',')
Expand Down Expand Up @@ -837,4 +840,4 @@ def run_evaluation(actions, action_filter=None):
for subject in all_actions_by_subject.keys():
print('Evaluating on subject', subject)
run_evaluation(all_actions_by_subject[subject], action_filter)
print('')
print('')