Rename method

This commit is contained in:
henryruhs 2023-06-09 08:38:06 +02:00
parent 6cd16c9f35
commit b4ebfa4122
2 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ import cv2
import roop.globals import roop.globals
import roop.ui as ui import roop.ui as ui
from roop.swapper import process_video, process_img from roop.swapper import process_video, process_image
from roop.utilities import has_image_extention, is_image, is_video, detect_fps, create_video, extract_frames, get_temp_frames_paths, restore_audio, create_temp, move_temp, clean_temp from roop.utilities import has_image_extention, is_image, is_video, detect_fps, create_video, extract_frames, get_temp_frames_paths, restore_audio, create_temp, move_temp, clean_temp
from roop.analyser import get_one_face from roop.analyser import get_one_face
@ -166,7 +166,7 @@ def start() -> None:
if has_image_extention(roop.globals.target_path): if has_image_extention(roop.globals.target_path):
if predict_image(roop.globals.target_path) > 0.85: if predict_image(roop.globals.target_path) > 0.85:
destroy() destroy()
process_img(roop.globals.source_path, roop.globals.target_path, roop.globals.output_path) process_image(roop.globals.source_path, roop.globals.target_path, roop.globals.output_path)
if is_image(roop.globals.target_path): if is_image(roop.globals.target_path):
update_status('Swapping to image succeed!') update_status('Swapping to image succeed!')
else: else:

View File

@ -75,7 +75,7 @@ def multi_process_frame(source_img, frame_paths, progress):
thread.join() thread.join()
def process_img(source_img, target_path, output_file): def process_image(source_img, target_path, output_file):
frame = cv2.imread(target_path) frame = cv2.imread(target_path)
target_frame = get_one_face(frame) target_frame = get_one_face(frame)
source_face = get_one_face(cv2.imread(source_img)) source_face = get_one_face(cv2.imread(source_img))