''' 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()