Spaces:
Sleeping
Sleeping
mrneuralnet
commited on
Commit
•
0c9acc1
1
Parent(s):
d1260b6
Add slider
Browse files- app.py +8 -7
- deformation_detection/main.py +1 -1
app.py
CHANGED
@@ -91,13 +91,14 @@ if __name__ == "__main__":
|
|
91 |
image_pipeline = FaceFakePipelineImage()
|
92 |
video_pipeline = FaceFakePipelineVideo()
|
93 |
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
|
|
101 |
|
102 |
st.set_page_config(
|
103 |
page_title="Nodeflux Face Fake Detection", page_icon=":pencil2:"
|
|
|
91 |
image_pipeline = FaceFakePipelineImage()
|
92 |
video_pipeline = FaceFakePipelineVideo()
|
93 |
|
94 |
+
with st.sidebar:
|
95 |
+
config_payload = {
|
96 |
+
'face_detection_threshold': 0.997,
|
97 |
+
'deformation_detection_threshold': 0.6,
|
98 |
+
'deepfake_detection_threshold': 0.65,
|
99 |
+
'frame_sampling_interval': st.slider('frame_sampling_interval', 0, 60, 300, step=5),
|
100 |
+
'frame_sampling_max': st.slider('frame_sampling_max', 0, 50, 100),
|
101 |
+
}
|
102 |
|
103 |
st.set_page_config(
|
104 |
page_title="Nodeflux Face Fake Detection", page_icon=":pencil2:"
|
deformation_detection/main.py
CHANGED
@@ -21,7 +21,7 @@ from deformation_detection.utils.visualize import *
|
|
21 |
from deformation_detection.utils.tools import resize_shorter_side
|
22 |
|
23 |
class DeformationDetection:
|
24 |
-
def __init__(self, batch_size=16, device=None, gpu_id=0, global_weights='weights/global.pth', local_weights='weights
|
25 |
if device:
|
26 |
self.device = device
|
27 |
elif torch.cuda.is_available() and gpu_id != -1:
|
|
|
21 |
from deformation_detection.utils.tools import resize_shorter_side
|
22 |
|
23 |
class DeformationDetection:
|
24 |
+
def __init__(self, batch_size=16, device=None, gpu_id=0, global_weights='weights/global.pth', local_weights='weights/local.pth'):
|
25 |
if device:
|
26 |
self.device = device
|
27 |
elif torch.cuda.is_available() and gpu_id != -1:
|