From 82bd70879a20ecf89788614b4b4562035d509842 Mon Sep 17 00:00:00 2001 From: Somdev Sangwan Date: Mon, 29 May 2023 13:01:05 +0530 Subject: [PATCH] warn user about unselected objects (fixes #3) --- run.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/run.py b/run.py index a918fc6..f798f47 100644 --- a/run.py +++ b/run.py @@ -53,6 +53,12 @@ def toggle_fps_limit(): def start(): + if not args['source_img'] or not os.path.isfile(args['source_img']): + print("\n[WARNING] Please select an image containing a face.") + return + elif not args['target_path'] or not os.path.isfile(args['target_path']): + print("\n[WARNING] Please select a video/image to swap face in.") + return global pool pool = mp.Pool(psutil.cpu_count()-1) current_dir = os.getcwd()