Spanicin commited on
Commit
3114eb3
·
verified ·
1 Parent(s): 79a2d93

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -184,7 +184,7 @@ def main(args):
184
  print('crop_pic_path ',crop_pic_new_path)
185
  print('crop_info ',crop_info)
186
 
187
- if first_coeff_path is None:
188
  print("Can't get the coeffs of the input")
189
  return
190
 
@@ -211,20 +211,20 @@ def main(args):
211
  ref_pose_coeff_path=None
212
  print('ref_eyeblink_coeff_path',ref_pose_coeff_path)
213
 
214
- batch = get_data(first_coeff_path, audio_path, device, ref_eyeblink_coeff_path, still=args.still)
215
  coeff_path = audio_to_coeff.generate(batch, save_dir, pose_style, ref_pose_coeff_path)
216
 
217
 
218
  if args.face3dvis:
219
  from src.face3d.visualize import gen_composed_video
220
- gen_composed_video(args, device, first_coeff_path, coeff_path, audio_path, os.path.join(save_dir, '3dface.mp4'))
221
 
222
  # data = get_facerender_data(coeff_path, crop_pic_path, first_coeff_path, audio_path,
223
  # batch_size, input_yaw_list, input_pitch_list, input_roll_list,
224
  # expression_scale=args.expression_scale, still_mode=args.still, preprocess=args.preprocess, size=args.size)
225
 
226
 
227
- data = get_facerender_data(coeff_path, crop_pic_path, first_coeff_path, audio_path,
228
  batch_size, input_yaw_list, input_pitch_list, input_roll_list,
229
  expression_scale=args.expression_scale, still_mode=args.still, preprocess=args.preprocess)
230
 
 
184
  print('crop_pic_path ',crop_pic_new_path)
185
  print('crop_info ',crop_info)
186
 
187
+ if first_coeff_new_path is None:
188
  print("Can't get the coeffs of the input")
189
  return
190
 
 
211
  ref_pose_coeff_path=None
212
  print('ref_eyeblink_coeff_path',ref_pose_coeff_path)
213
 
214
+ batch = get_data(first_coeff_new_path, audio_path, device, ref_eyeblink_coeff_path, still=args.still)
215
  coeff_path = audio_to_coeff.generate(batch, save_dir, pose_style, ref_pose_coeff_path)
216
 
217
 
218
  if args.face3dvis:
219
  from src.face3d.visualize import gen_composed_video
220
+ gen_composed_video(args, device, first_coeff_new_path, coeff_path, audio_path, os.path.join(save_dir, '3dface.mp4'))
221
 
222
  # data = get_facerender_data(coeff_path, crop_pic_path, first_coeff_path, audio_path,
223
  # batch_size, input_yaw_list, input_pitch_list, input_roll_list,
224
  # expression_scale=args.expression_scale, still_mode=args.still, preprocess=args.preprocess, size=args.size)
225
 
226
 
227
+ data = get_facerender_data(coeff_path, crop_pic_new_path, first_coeff_new_path, audio_path,
228
  batch_size, input_yaw_list, input_pitch_list, input_roll_list,
229
  expression_scale=args.expression_scale, still_mode=args.still, preprocess=args.preprocess)
230