-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfit_osso.py
27 lines (19 loc) · 1.02 KB
/
fit_osso.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import pickle
from osso.utils.fit_osso import fit_osso
if __name__ == "__main__":
import argparse
import os
import shutil
import json
import numpy as np
argparser = argparse.ArgumentParser()
parser = argparse.ArgumentParser(description='Fit the OSSO model to a sequence of SMPL parameters')
parser.add_argument('--exp_name', type=str, help='Name of the sequence', default='P8_69_outdoor_cartwheel')
parser.add_argument('-o', '--out_dir', type=str, help='Output directory', default='output')
parser.add_argument('-D', '--display', help='Display the fitting process', action='store_true')
parser.add_argument('-F','--force', help='Force recompute the fits', action='store_true')
args = parser.parse_args()
smpl_pkl = os.path.join('output', args.exp_name, 'smpl_seq.pkl')
output_folder = os.path.join(args.out_dir, args.exp_name, 'osso')
smpl_data = pickle.load(open(smpl_pkl, 'rb'))
fit_osso(smpl_data, output_folder, display=args.display, force=args.force)