Skip to content

Commit

Permalink
Merge pull request modelscope#167 from ultimatech-cn/patch-1
Browse files Browse the repository at this point in the history
Update preprocessing.py
  • Loading branch information
sunbaigui authored Sep 2, 2023
2 parents 5870b12 + 72018ed commit 01143b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions facechain/data_process/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,10 @@ def __call__(self, imdir):
# copy to the ensembledir for reading
for i, index in enumerate(ref_indexes[:4]):
save_path = os.path.join(ensembledir, f"best_roop_image_{str(i)}.jpg")
os.system(f"cp -rf {os.path.join(imdir, selected_paths[index])} {save_path}")

#os.system(f"cp -rf {os.path.join(imdir, selected_paths[index])} {save_path}")
if os.path.exists(save_path):
os.remove(save_path)
shutil.copy2(os.path.join(imdir, selected_paths[index]), save_path)
cnt = 0
tmp_path = os.path.join(savedir, 'tmp.png')
for imname in _selected_paths:
Expand Down

0 comments on commit 01143b2

Please sign in to comment.