File tree Expand file tree Collapse file tree 2 files changed +9
-17
lines changed Expand file tree Collapse file tree 2 files changed +9
-17
lines changed Original file line number Diff line number Diff line change 15
15
16
16
def run_model (self ):
17
17
18
-
19
-
20
- min_cutoff = float (self .settings .gui_min_cutoff ) #15.5004
21
- beta = float (self .settings .gui_speed_coefficient ) #0.62
22
- noisy_point = np .array ([45 ])
23
- filter = OneEuroFilter (
24
- noisy_point ,
25
- min_cutoff = min_cutoff ,
26
- beta = beta
27
- )
28
-
29
18
frame = cv2 .resize (self .current_image_gray , (256 , 256 ))
30
19
# make it pil
31
20
frame = Image .fromarray (frame )
@@ -42,7 +31,8 @@ def run_model(self):
42
31
#end = time.time()
43
32
output = out [0 ]
44
33
output = output [0 ]
45
- output = filter (output )
34
+ output = self . one_euro_filter (output )
46
35
for i in range (len (output )): # Clip values between 0 - 1
47
36
output [i ] = max (min (output [i ], 1 ), 0 )
37
+ print (output )
48
38
self .output = output
Original file line number Diff line number Diff line change 19
19
from babble_model_loader import *
20
20
import os
21
21
os .environ ["OMP_NUM_THREADS" ] = "1"
22
+ import onnxruntime as ort
23
+
22
24
def run_once (f ):
23
25
def wrapper (* args , ** kwargs ):
24
26
if not wrapper .has_run :
@@ -95,13 +97,13 @@ def __init__(
95
97
96
98
97
99
try :
98
- min_cutoff = float (self .settings .gui_min_cutoff ) # 0.0004
99
- beta = float (self .settings .gui_speed_coefficient ) # 0.9
100
+ min_cutoff = float (self .settings .gui_min_cutoff ) # 15.5004
101
+ beta = float (self .settings .gui_speed_coefficient ) # 0.62
100
102
except :
101
103
print ('\033 [93m[WARN] OneEuroFilter values must be a legal number.\033 [0m' )
102
- min_cutoff = 0 .0004
103
- beta = 0.9
104
- noisy_point = np .array ([1 , 1 ])
104
+ min_cutoff = 15 .0004
105
+ beta = 0.62
106
+ noisy_point = np .array ([45 ])
105
107
self .one_euro_filter = OneEuroFilter (
106
108
noisy_point ,
107
109
min_cutoff = min_cutoff ,
You can’t perform that action at this time.
0 commit comments