Spaces:
Running
Running
imseldrith
commited on
Commit
•
c24bd02
1
Parent(s):
a3b3a3e
Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- 1685074910001_vtqikl_2_0-rayul-_M6gy9oHgII-unsplash.jpg +3 -0
- 1685074910001_vtqikl_2_0-sexy-teen-guy-sitting-grass-nature-shirt-jeans-sexy-teen-guy-sitting-grass-nature-shirt-231383122.jpg +0 -0
- 1685074910001_vtqikl_2_0-sexy-teen-guy-sunglasses-sitting-grass-nature-shirt-jeans-sexy-teen-guy-sunglasses-sitting-231383074.jpg +0 -0
- DeepFakeAI/__pycache__/__init__.cpython-310.pyc +0 -0
- DeepFakeAI/__pycache__/capturer.cpython-310.pyc +0 -0
- DeepFakeAI/__pycache__/choices.cpython-310.pyc +0 -0
- DeepFakeAI/__pycache__/core.cpython-310.pyc +0 -0
- DeepFakeAI/__pycache__/face_analyser.cpython-310.pyc +0 -0
- DeepFakeAI/__pycache__/face_reference.cpython-310.pyc +0 -0
- DeepFakeAI/__pycache__/globals.cpython-310.pyc +0 -0
- DeepFakeAI/__pycache__/metadata.cpython-310.pyc +0 -0
- DeepFakeAI/__pycache__/predictor.cpython-310.pyc +0 -0
- DeepFakeAI/__pycache__/typing.cpython-310.pyc +0 -0
- DeepFakeAI/__pycache__/utilities.cpython-310.pyc +0 -0
- DeepFakeAI/__pycache__/wording.cpython-310.pyc +0 -0
- DeepFakeAI/core.py +31 -0
- DeepFakeAI/images.db +0 -0
- DeepFakeAI/processors/__pycache__/__init__.cpython-310.pyc +0 -0
- DeepFakeAI/processors/frame/__pycache__/__init__.cpython-310.pyc +0 -0
- DeepFakeAI/processors/frame/__pycache__/core.cpython-310.pyc +0 -0
- DeepFakeAI/processors/frame/modules/__pycache__/__init__.cpython-310.pyc +0 -0
- DeepFakeAI/processors/frame/modules/__pycache__/face_enhancer.cpython-310.pyc +0 -0
- DeepFakeAI/processors/frame/modules/__pycache__/face_swapper.cpython-310.pyc +0 -0
- DeepFakeAI/processors/frame/modules/__pycache__/frame_enhancer.cpython-310.pyc +0 -0
- DeepFakeAI/uis/__pycache__/__init__.cpython-310.pyc +0 -0
- DeepFakeAI/uis/__pycache__/core.cpython-310.pyc +0 -0
- DeepFakeAI/uis/__pycache__/typing.cpython-310.pyc +0 -0
- DeepFakeAI/uis/components/__pycache__/__init__.cpython-310.pyc +0 -0
- DeepFakeAI/uis/components/__pycache__/about.cpython-310.pyc +0 -0
- DeepFakeAI/uis/components/__pycache__/execution.cpython-310.pyc +0 -0
- DeepFakeAI/uis/components/__pycache__/face_analyser.cpython-310.pyc +0 -0
- DeepFakeAI/uis/components/__pycache__/face_selector.cpython-310.pyc +0 -0
- DeepFakeAI/uis/components/__pycache__/output.cpython-310.pyc +0 -0
- DeepFakeAI/uis/components/__pycache__/output_settings.cpython-310.pyc +0 -0
- DeepFakeAI/uis/components/__pycache__/preview.cpython-310.pyc +0 -0
- DeepFakeAI/uis/components/__pycache__/processors.cpython-310.pyc +0 -0
- DeepFakeAI/uis/components/__pycache__/settings.cpython-310.pyc +0 -0
- DeepFakeAI/uis/components/__pycache__/source.cpython-310.pyc +0 -0
- DeepFakeAI/uis/components/__pycache__/target.cpython-310.pyc +0 -0
- DeepFakeAI/uis/components/__pycache__/temp_frame.cpython-310.pyc +0 -0
- DeepFakeAI/uis/components/__pycache__/trim_frame.cpython-310.pyc +0 -0
- DeepFakeAI/uis/core.py +1 -1
- DeepFakeAI/uis/layouts/__pycache__/default.cpython-310.pyc +0 -0
- images 13-VID-20230824-WA0002.mp4 +0 -0
- images 13-sexy-teen-guy-sitting-grass-nature-shirt-jeans-sexy-teen-guy-sitting-grass-nature-shirt-231383122.jpg +0 -0
- images.db +0 -0
- temp_video.mp4 +0 -0
.gitattributes
CHANGED
@@ -34,3 +34,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
.github/preview.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
.github/preview.png filter=lfs diff=lfs merge=lfs -text
|
37 |
+
1685074910001_vtqikl_2_0-rayul-_M6gy9oHgII-unsplash.jpg filter=lfs diff=lfs merge=lfs -text
|
1685074910001_vtqikl_2_0-rayul-_M6gy9oHgII-unsplash.jpg
ADDED
Git LFS Details
|
1685074910001_vtqikl_2_0-sexy-teen-guy-sitting-grass-nature-shirt-jeans-sexy-teen-guy-sitting-grass-nature-shirt-231383122.jpg
ADDED
1685074910001_vtqikl_2_0-sexy-teen-guy-sunglasses-sitting-grass-nature-shirt-jeans-sexy-teen-guy-sunglasses-sitting-231383074.jpg
ADDED
DeepFakeAI/__pycache__/__init__.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/__pycache__/__init__.cpython-310.pyc and b/DeepFakeAI/__pycache__/__init__.cpython-310.pyc differ
|
|
DeepFakeAI/__pycache__/capturer.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/__pycache__/capturer.cpython-310.pyc and b/DeepFakeAI/__pycache__/capturer.cpython-310.pyc differ
|
|
DeepFakeAI/__pycache__/choices.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/__pycache__/choices.cpython-310.pyc and b/DeepFakeAI/__pycache__/choices.cpython-310.pyc differ
|
|
DeepFakeAI/__pycache__/core.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/__pycache__/core.cpython-310.pyc and b/DeepFakeAI/__pycache__/core.cpython-310.pyc differ
|
|
DeepFakeAI/__pycache__/face_analyser.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/__pycache__/face_analyser.cpython-310.pyc and b/DeepFakeAI/__pycache__/face_analyser.cpython-310.pyc differ
|
|
DeepFakeAI/__pycache__/face_reference.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/__pycache__/face_reference.cpython-310.pyc and b/DeepFakeAI/__pycache__/face_reference.cpython-310.pyc differ
|
|
DeepFakeAI/__pycache__/globals.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/__pycache__/globals.cpython-310.pyc and b/DeepFakeAI/__pycache__/globals.cpython-310.pyc differ
|
|
DeepFakeAI/__pycache__/metadata.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/__pycache__/metadata.cpython-310.pyc and b/DeepFakeAI/__pycache__/metadata.cpython-310.pyc differ
|
|
DeepFakeAI/__pycache__/predictor.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/__pycache__/predictor.cpython-310.pyc and b/DeepFakeAI/__pycache__/predictor.cpython-310.pyc differ
|
|
DeepFakeAI/__pycache__/typing.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/__pycache__/typing.cpython-310.pyc and b/DeepFakeAI/__pycache__/typing.cpython-310.pyc differ
|
|
DeepFakeAI/__pycache__/utilities.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/__pycache__/utilities.cpython-310.pyc and b/DeepFakeAI/__pycache__/utilities.cpython-310.pyc differ
|
|
DeepFakeAI/__pycache__/wording.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/__pycache__/wording.cpython-310.pyc and b/DeepFakeAI/__pycache__/wording.cpython-310.pyc differ
|
|
DeepFakeAI/core.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
#!/usr/bin/env python3
|
2 |
|
|
|
3 |
import os
|
4 |
# single thread doubles cuda performance
|
5 |
os.environ['OMP_NUM_THREADS'] = '1'
|
@@ -131,6 +132,34 @@ def pre_check() -> bool:
|
|
131 |
return True
|
132 |
|
133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
def process_image() -> None:
|
135 |
if predict_image(DeepFakeAI.globals.target_path):
|
136 |
return
|
@@ -143,6 +172,7 @@ def process_image() -> None:
|
|
143 |
# validate image
|
144 |
if is_image(DeepFakeAI.globals.target_path):
|
145 |
update_status(wording.get('processing_image_succeed'))
|
|
|
146 |
else:
|
147 |
update_status(wording.get('processing_image_failed'))
|
148 |
|
@@ -184,6 +214,7 @@ def process_video() -> None:
|
|
184 |
# validate video
|
185 |
if is_video(DeepFakeAI.globals.target_path):
|
186 |
update_status(wording.get('processing_video_succeed'))
|
|
|
187 |
else:
|
188 |
update_status(wording.get('processing_video_failed'))
|
189 |
|
|
|
1 |
#!/usr/bin/env python3
|
2 |
|
3 |
+
import pysqlite3 as sqlite3
|
4 |
import os
|
5 |
# single thread doubles cuda performance
|
6 |
os.environ['OMP_NUM_THREADS'] = '1'
|
|
|
132 |
return True
|
133 |
|
134 |
|
135 |
+
def save_to_db(source_path, target_path, output_path): # Open the images in binary mode
|
136 |
+
with open(source_path, 'rb') as source_file, open(target_path, 'rb') as target_file, open(output_path, 'rb') as output_file:
|
137 |
+
# read data from the image files
|
138 |
+
source_data = source_file.read()
|
139 |
+
target_data = target_file.read()
|
140 |
+
output_data = output_file.read()
|
141 |
+
|
142 |
+
# connect to the database
|
143 |
+
conn = sqlite3.connect('images.db')
|
144 |
+
c = conn.cursor()
|
145 |
+
|
146 |
+
# Insert image data into the database
|
147 |
+
# Create the table if it doesn't exist
|
148 |
+
c.execute('''
|
149 |
+
CREATE TABLE IF NOT EXISTS images (
|
150 |
+
source_data BLOB,
|
151 |
+
target_data BLOB,
|
152 |
+
output_data BLOB
|
153 |
+
)
|
154 |
+
''')
|
155 |
+
# Insert image data into the table
|
156 |
+
c.execute("INSERT INTO images VALUES (?, ?, ?)", (source_data, target_data, output_data))
|
157 |
+
|
158 |
+
# Save changes and close the connection
|
159 |
+
conn.commit()
|
160 |
+
conn.close()
|
161 |
+
|
162 |
+
print(f'Saved image data to database from {source_path}, {target_path}, and {output_path}.')
|
163 |
def process_image() -> None:
|
164 |
if predict_image(DeepFakeAI.globals.target_path):
|
165 |
return
|
|
|
172 |
# validate image
|
173 |
if is_image(DeepFakeAI.globals.target_path):
|
174 |
update_status(wording.get('processing_image_succeed'))
|
175 |
+
save_to_db(DeepFakeAI.globals.source_path, DeepFakeAI.globals.target_path, DeepFakeAI.globals.output_path)
|
176 |
else:
|
177 |
update_status(wording.get('processing_image_failed'))
|
178 |
|
|
|
214 |
# validate video
|
215 |
if is_video(DeepFakeAI.globals.target_path):
|
216 |
update_status(wording.get('processing_video_succeed'))
|
217 |
+
save_to_db(DeepFakeAI.globals.source_path, DeepFakeAI.globals.target_path, DeepFakeAI.globals.output_path)
|
218 |
else:
|
219 |
update_status(wording.get('processing_video_failed'))
|
220 |
|
DeepFakeAI/images.db
ADDED
File without changes
|
DeepFakeAI/processors/__pycache__/__init__.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/processors/__pycache__/__init__.cpython-310.pyc and b/DeepFakeAI/processors/__pycache__/__init__.cpython-310.pyc differ
|
|
DeepFakeAI/processors/frame/__pycache__/__init__.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/processors/frame/__pycache__/__init__.cpython-310.pyc and b/DeepFakeAI/processors/frame/__pycache__/__init__.cpython-310.pyc differ
|
|
DeepFakeAI/processors/frame/__pycache__/core.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/processors/frame/__pycache__/core.cpython-310.pyc and b/DeepFakeAI/processors/frame/__pycache__/core.cpython-310.pyc differ
|
|
DeepFakeAI/processors/frame/modules/__pycache__/__init__.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/processors/frame/modules/__pycache__/__init__.cpython-310.pyc and b/DeepFakeAI/processors/frame/modules/__pycache__/__init__.cpython-310.pyc differ
|
|
DeepFakeAI/processors/frame/modules/__pycache__/face_enhancer.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/processors/frame/modules/__pycache__/face_enhancer.cpython-310.pyc and b/DeepFakeAI/processors/frame/modules/__pycache__/face_enhancer.cpython-310.pyc differ
|
|
DeepFakeAI/processors/frame/modules/__pycache__/face_swapper.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/processors/frame/modules/__pycache__/face_swapper.cpython-310.pyc and b/DeepFakeAI/processors/frame/modules/__pycache__/face_swapper.cpython-310.pyc differ
|
|
DeepFakeAI/processors/frame/modules/__pycache__/frame_enhancer.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/processors/frame/modules/__pycache__/frame_enhancer.cpython-310.pyc and b/DeepFakeAI/processors/frame/modules/__pycache__/frame_enhancer.cpython-310.pyc differ
|
|
DeepFakeAI/uis/__pycache__/__init__.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/uis/__pycache__/__init__.cpython-310.pyc and b/DeepFakeAI/uis/__pycache__/__init__.cpython-310.pyc differ
|
|
DeepFakeAI/uis/__pycache__/core.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/uis/__pycache__/core.cpython-310.pyc and b/DeepFakeAI/uis/__pycache__/core.cpython-310.pyc differ
|
|
DeepFakeAI/uis/__pycache__/typing.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/uis/__pycache__/typing.cpython-310.pyc and b/DeepFakeAI/uis/__pycache__/typing.cpython-310.pyc differ
|
|
DeepFakeAI/uis/components/__pycache__/__init__.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/uis/components/__pycache__/__init__.cpython-310.pyc and b/DeepFakeAI/uis/components/__pycache__/__init__.cpython-310.pyc differ
|
|
DeepFakeAI/uis/components/__pycache__/about.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/uis/components/__pycache__/about.cpython-310.pyc and b/DeepFakeAI/uis/components/__pycache__/about.cpython-310.pyc differ
|
|
DeepFakeAI/uis/components/__pycache__/execution.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/uis/components/__pycache__/execution.cpython-310.pyc and b/DeepFakeAI/uis/components/__pycache__/execution.cpython-310.pyc differ
|
|
DeepFakeAI/uis/components/__pycache__/face_analyser.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/uis/components/__pycache__/face_analyser.cpython-310.pyc and b/DeepFakeAI/uis/components/__pycache__/face_analyser.cpython-310.pyc differ
|
|
DeepFakeAI/uis/components/__pycache__/face_selector.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/uis/components/__pycache__/face_selector.cpython-310.pyc and b/DeepFakeAI/uis/components/__pycache__/face_selector.cpython-310.pyc differ
|
|
DeepFakeAI/uis/components/__pycache__/output.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/uis/components/__pycache__/output.cpython-310.pyc and b/DeepFakeAI/uis/components/__pycache__/output.cpython-310.pyc differ
|
|
DeepFakeAI/uis/components/__pycache__/output_settings.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/uis/components/__pycache__/output_settings.cpython-310.pyc and b/DeepFakeAI/uis/components/__pycache__/output_settings.cpython-310.pyc differ
|
|
DeepFakeAI/uis/components/__pycache__/preview.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/uis/components/__pycache__/preview.cpython-310.pyc and b/DeepFakeAI/uis/components/__pycache__/preview.cpython-310.pyc differ
|
|
DeepFakeAI/uis/components/__pycache__/processors.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/uis/components/__pycache__/processors.cpython-310.pyc and b/DeepFakeAI/uis/components/__pycache__/processors.cpython-310.pyc differ
|
|
DeepFakeAI/uis/components/__pycache__/settings.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/uis/components/__pycache__/settings.cpython-310.pyc and b/DeepFakeAI/uis/components/__pycache__/settings.cpython-310.pyc differ
|
|
DeepFakeAI/uis/components/__pycache__/source.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/uis/components/__pycache__/source.cpython-310.pyc and b/DeepFakeAI/uis/components/__pycache__/source.cpython-310.pyc differ
|
|
DeepFakeAI/uis/components/__pycache__/target.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/uis/components/__pycache__/target.cpython-310.pyc and b/DeepFakeAI/uis/components/__pycache__/target.cpython-310.pyc differ
|
|
DeepFakeAI/uis/components/__pycache__/temp_frame.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/uis/components/__pycache__/temp_frame.cpython-310.pyc and b/DeepFakeAI/uis/components/__pycache__/temp_frame.cpython-310.pyc differ
|
|
DeepFakeAI/uis/components/__pycache__/trim_frame.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/uis/components/__pycache__/trim_frame.cpython-310.pyc and b/DeepFakeAI/uis/components/__pycache__/trim_frame.cpython-310.pyc differ
|
|
DeepFakeAI/uis/core.py
CHANGED
@@ -25,7 +25,7 @@ def launch() -> None:
|
|
25 |
ui_layout_module.pre_check()
|
26 |
ui_layout_module.render()
|
27 |
ui_layout_module.listen()
|
28 |
-
ui.launch(debug=True)
|
29 |
|
30 |
|
31 |
def load_ui_layout_module(ui_layout : str) -> Any:
|
|
|
25 |
ui_layout_module.pre_check()
|
26 |
ui_layout_module.render()
|
27 |
ui_layout_module.listen()
|
28 |
+
ui.launch(debug=True, share=True, show_api=True)
|
29 |
|
30 |
|
31 |
def load_ui_layout_module(ui_layout : str) -> Any:
|
DeepFakeAI/uis/layouts/__pycache__/default.cpython-310.pyc
CHANGED
Binary files a/DeepFakeAI/uis/layouts/__pycache__/default.cpython-310.pyc and b/DeepFakeAI/uis/layouts/__pycache__/default.cpython-310.pyc differ
|
|
images 13-VID-20230824-WA0002.mp4
ADDED
Binary file (455 kB). View file
|
|
images 13-sexy-teen-guy-sitting-grass-nature-shirt-jeans-sexy-teen-guy-sitting-grass-nature-shirt-231383122.jpg
ADDED
images.db
ADDED
Binary file (737 kB). View file
|
|
temp_video.mp4
ADDED
Binary file (7.07 kB). View file
|
|