File size: 929 Bytes
ef6a8c6 |
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 28 29 30 31 32 |
'''
This file is written to finish the preprocess of REC-MV:
- mask
- normal
- smpl params
- parse masks
'''
import json, os, os.path as osp, sys, shutil, glob, pdb, argparse
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('--root', type=str)
parser.add_argument('--avatar_dir', type=str)
args = parser.parse_args()
return args
def main():
args = parse_args()
root = args.root
# TODO: get mask
# TODO: get normal
os.system('cd ./pifuhd && python generate_normals.py --imgpath {}'.format(osp.join(root, 'imgs')))
# get smpl_rec.npz
avatar_dir = osp.join(args.root, args.avatar_dir)
os.system('cd ./videoavatars && python get_reconstructed_poses.py --root {} --out {}'.format(args.root, avatar_dir))
os.system('cd ../ && python get_smpl_rec_camera.py --root {} --save-root {}'.format(args.root, args.root))
if __name__ == '__main__':
main()
|