Compare commits
4 Commits
09f0343639
...
2a7ae010a8
Author | SHA1 | Date |
---|---|---|
|
2a7ae010a8 | |
|
a834811974 | |
|
d2aaf46e69 | |
|
d07d4a6a26 |
17
README.md
17
README.md
|
@ -20,20 +20,15 @@
|
||||||
|
|
||||||
###### Users are expected to use this software responsibly and legally. If using a real person's face, obtain their consent and clearly label any output as a deepfake when sharing online. We are not responsible for end-user actions.
|
###### Users are expected to use this software responsibly and legally. If using a real person's face, obtain their consent and clearly label any output as a deepfake when sharing online. We are not responsible for end-user actions.
|
||||||
|
|
||||||
## Quick Start - Download Prebuilt
|
## Quick Start - Pre-built
|
||||||
|
<div align="center">
|
||||||
<div style="margin: 28px 0;">
|
<a href="https://hacksider.gumroad.com/l/vccdmm">
|
||||||
<div style="margin-bottom: 20px;">
|
<img src="https://github.com/user-attachments/assets/7d993b32-e3e8-4cd3-bbfb-a549152ebdd5" width="285" height="77" />
|
||||||
<a href="https://hacksider.gumroad.com/l/vccdmm" target="_blank">
|
|
||||||
<img src="https://github.com/user-attachments/assets/c702bb7d-d9c0-466a-9ad2-02849294e540" alt="Download Button 1" style="width: 280px; display: block;">
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
<a href="https://krshh.gumroad.com/l/Deep-Live-Cam-Mac">
|
||||||
<div>
|
<img src="https://github.com/user-attachments/assets/d5d913b5-a7de-4609-96b9-979a5749a703" width="285" height="77" />
|
||||||
<a href="https://krshh.gumroad.com/l/Deep-Live-Cam-Mac" target="_blank">
|
|
||||||
<img src="https://github.com/user-attachments/assets/9a302750-2d54-457d-bdc8-6ed7c6af0e1a" alt="Download Button 2" style="width: 280px; display: block;">
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
## Features - Everything is real-time
|
## Features - Everything is real-time
|
||||||
|
|
||||||
|
|
|
@ -262,6 +262,7 @@ def create_root(start: Callable[[], None], destroy: Callable[[], None]) -> ctk.C
|
||||||
command=lambda: (
|
command=lambda: (
|
||||||
setattr(modules.globals, "map_faces", map_faces.get()),
|
setattr(modules.globals, "map_faces", map_faces.get()),
|
||||||
save_switch_states(),
|
save_switch_states(),
|
||||||
|
close_mapper_window() if not map_faces.get() else None
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
map_faces_switch.place(relx=0.1, rely=0.75)
|
map_faces_switch.place(relx=0.1, rely=0.75)
|
||||||
|
@ -376,6 +377,15 @@ def create_root(start: Callable[[], None], destroy: Callable[[], None]) -> ctk.C
|
||||||
|
|
||||||
return root
|
return root
|
||||||
|
|
||||||
|
def close_mapper_window():
|
||||||
|
global POPUP, POPUP_LIVE
|
||||||
|
if POPUP and POPUP.winfo_exists():
|
||||||
|
POPUP.destroy()
|
||||||
|
POPUP = None
|
||||||
|
if POPUP_LIVE and POPUP_LIVE.winfo_exists():
|
||||||
|
POPUP_LIVE.destroy()
|
||||||
|
POPUP_LIVE = None
|
||||||
|
|
||||||
|
|
||||||
def analyze_target(start: Callable[[], None], root: ctk.CTk):
|
def analyze_target(start: Callable[[], None], root: ctk.CTk):
|
||||||
if POPUP != None and POPUP.winfo_exists():
|
if POPUP != None and POPUP.winfo_exists():
|
||||||
|
@ -760,6 +770,13 @@ def update_preview(frame_number: int = 0) -> None:
|
||||||
|
|
||||||
|
|
||||||
def webcam_preview(root: ctk.CTk, camera_index: int):
|
def webcam_preview(root: ctk.CTk, camera_index: int):
|
||||||
|
global POPUP_LIVE
|
||||||
|
|
||||||
|
if POPUP_LIVE and POPUP_LIVE.winfo_exists():
|
||||||
|
update_status("Source x Target Mapper is already open.")
|
||||||
|
POPUP_LIVE.focus()
|
||||||
|
return
|
||||||
|
|
||||||
if not modules.globals.map_faces:
|
if not modules.globals.map_faces:
|
||||||
if modules.globals.source_path is None:
|
if modules.globals.source_path is None:
|
||||||
update_status("Please select a source image first")
|
update_status("Please select a source image first")
|
||||||
|
@ -772,6 +789,7 @@ def webcam_preview(root: ctk.CTk, camera_index: int):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def get_available_cameras():
|
def get_available_cameras():
|
||||||
"""Returns a list of available camera names and indices."""
|
"""Returns a list of available camera names and indices."""
|
||||||
if platform.system() == "Windows":
|
if platform.system() == "Windows":
|
||||||
|
@ -946,9 +964,9 @@ def create_source_target_popup_for_webcam(
|
||||||
|
|
||||||
def on_submit_click():
|
def on_submit_click():
|
||||||
if has_valid_map():
|
if has_valid_map():
|
||||||
POPUP_LIVE.destroy()
|
|
||||||
simplify_maps()
|
simplify_maps()
|
||||||
create_webcam_preview(camera_index)
|
update_pop_live_status("Mappings successfully submitted!")
|
||||||
|
create_webcam_preview(camera_index) # Open the preview window
|
||||||
else:
|
else:
|
||||||
update_pop_live_status("At least 1 source with target is required!")
|
update_pop_live_status("At least 1 source with target is required!")
|
||||||
|
|
||||||
|
@ -957,16 +975,43 @@ def create_source_target_popup_for_webcam(
|
||||||
refresh_data(map)
|
refresh_data(map)
|
||||||
update_pop_live_status("Please provide mapping!")
|
update_pop_live_status("Please provide mapping!")
|
||||||
|
|
||||||
|
def on_clear_click():
|
||||||
|
clear_source_target_images(map)
|
||||||
|
refresh_data(map)
|
||||||
|
update_pop_live_status("All mappings cleared!")
|
||||||
|
|
||||||
popup_status_label_live = ctk.CTkLabel(POPUP_LIVE, text=None, justify="center")
|
popup_status_label_live = ctk.CTkLabel(POPUP_LIVE, text=None, justify="center")
|
||||||
popup_status_label_live.grid(row=1, column=0, pady=15)
|
popup_status_label_live.grid(row=1, column=0, pady=15)
|
||||||
|
|
||||||
add_button = ctk.CTkButton(POPUP_LIVE, text="Add", command=lambda: on_add_click())
|
add_button = ctk.CTkButton(POPUP_LIVE, text="Add", command=lambda: on_add_click())
|
||||||
add_button.place(relx=0.2, rely=0.92, relwidth=0.2, relheight=0.05)
|
add_button.place(relx=0.1, rely=0.92, relwidth=0.2, relheight=0.05)
|
||||||
|
|
||||||
|
clear_button = ctk.CTkButton(POPUP_LIVE, text="Clear", command=lambda: on_clear_click())
|
||||||
|
clear_button.place(relx=0.4, rely=0.92, relwidth=0.2, relheight=0.05)
|
||||||
|
|
||||||
close_button = ctk.CTkButton(
|
close_button = ctk.CTkButton(
|
||||||
POPUP_LIVE, text="Submit", command=lambda: on_submit_click()
|
POPUP_LIVE, text="Submit", command=lambda: on_submit_click()
|
||||||
)
|
)
|
||||||
close_button.place(relx=0.6, rely=0.92, relwidth=0.2, relheight=0.05)
|
close_button.place(relx=0.7, rely=0.92, relwidth=0.2, relheight=0.05)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def clear_source_target_images(map: list):
|
||||||
|
global source_label_dict_live, target_label_dict_live
|
||||||
|
|
||||||
|
for item in map:
|
||||||
|
if "source" in item:
|
||||||
|
del item["source"]
|
||||||
|
if "target" in item:
|
||||||
|
del item["target"]
|
||||||
|
|
||||||
|
for button_num in list(source_label_dict_live.keys()):
|
||||||
|
source_label_dict_live[button_num].destroy()
|
||||||
|
del source_label_dict_live[button_num]
|
||||||
|
|
||||||
|
for button_num in list(target_label_dict_live.keys()):
|
||||||
|
target_label_dict_live[button_num].destroy()
|
||||||
|
del target_label_dict_live[button_num]
|
||||||
|
|
||||||
|
|
||||||
def refresh_data(map: list):
|
def refresh_data(map: list):
|
||||||
|
|
Loading…
Reference in New Issue