advcloud commited on
Commit
d205773
·
1 Parent(s): f6c278f

first commit

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. model.py +2 -2
app.py CHANGED
@@ -109,11 +109,11 @@ img#teaser {
109
  '<center></center>'
110
  )
111
 
112
- preprocess_button.click(fn=model.reconstruct_face,
113
  inputs=[input_image],
114
  outputs=[aligned_face])
115
  aligned_face.change(fn=model.reconstruct_face,
116
- inputs=[input_image],
117
  outputs=[reconstructed_face, latent])
118
 
119
  run_button.click(fn=model.generate,
 
109
  '<center></center>'
110
  )
111
 
112
+ preprocess_button.click(fn=model.detect_and_align_face,
113
  inputs=[input_image],
114
  outputs=[aligned_face])
115
  aligned_face.change(fn=model.reconstruct_face,
116
+ inputs=[aligned_face],
117
  outputs=[reconstructed_face, latent])
118
 
119
  run_button.click(fn=model.generate,
model.py CHANGED
@@ -49,8 +49,8 @@ class Model:
49
  @staticmethod
50
  def _create_dlib_landmark_model():
51
  path = huggingface_hub.hf_hub_download(
52
- 'aijack/jojogan',
53
- 'face_landmarks.dat'
54
  )
55
  return dlib.shape_predictor(path)
56
 
 
49
  @staticmethod
50
  def _create_dlib_landmark_model():
51
  path = huggingface_hub.hf_hub_download(
52
+ 'PKUWilliamYang/VToonify',
53
+ 'models/shape_predictor_68_face_landmarks.dat'
54
  )
55
  return dlib.shape_predictor(path)
56