Skip to content

Commit 90b7a1b

Browse files
committed
Added new model
1 parent 97ed7f0 commit 90b7a1b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

BabbleCPU.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def normalize_value(array):
172172
layout = [
173173
[sg.Image(key = '-IMAGE-')],
174174
[sg.Text('Enter Webcam URL or Number (Defualts to 0)'), sg.Input(key = '-URL-', size = (30, 1))],
175-
[sg.Text('Enter Onnx model name (Defualts to v1.onnx)'), sg.Input(key = '-MODEL-', size = (30, 1))],
175+
[sg.Text('Enter Onnx model name (Defualts to v1.1B0Q.onnx)'), sg.Input(key = '-MODEL-', size = (30, 1))],
176176
[sg.Text('OSC Location Address'), sg.Input(key = '-LOC-', size = (30, 1))],
177177
[sg.Text('Output Mutiplier (defualts to 1. Please use 100 if you are using the unity demo.)'), sg.Input(key = '-MULT-', size = (30, 1))],
178178
[sg.Text('Enter OSC IP (Defualts to 127.0.0.1)'), sg.Input(key = '-OSC-', size = (30, 1))],
@@ -211,7 +211,7 @@ def normalize_value(array):
211211
client = udp_client.SimpleUDPClient(OSCip, OSCport)
212212
model = values['-MODEL-']
213213
if model == '':
214-
model = 'v1.onnx'
214+
model = 'v1.1B0.onnx'
215215
if calibjson == '':
216216
calibjson = 'calib.json'
217217
calibration.update_calib(calibjson) # Checks and updates values of the json file
@@ -221,16 +221,16 @@ def normalize_value(array):
221221
flip90r = values['-FLIP90R-']
222222
location = values['-LOC-']
223223
ROI = None
224-
opts = ort.SessionOptions()
225-
opts.intra_op_num_threads = 1
226-
opts.inter_op_num_threads = 1
227-
opts.execution_mode = ort.ExecutionMode.ORT_SEQUENTIAL
228-
sess = ort.InferenceSession(model, opts, providers=['CPUExecutionProvider'])
229-
input_name = sess.get_inputs()[0].name
230-
output_name = sess.get_outputs()[0].name
231224
if event == sg.WIN_CLOSED or event == 'Stop':
232225
break
233226
if event == 'Start':
227+
opts = ort.SessionOptions()
228+
opts.intra_op_num_threads = 1
229+
opts.inter_op_num_threads = 1
230+
opts.execution_mode = ort.ExecutionMode.ORT_SEQUENTIAL
231+
sess = ort.InferenceSession(model, opts, providers=['CPUExecutionProvider'])
232+
input_name = sess.get_inputs()[0].name
233+
output_name = sess.get_outputs()[0].name
234234
url = values['-URL-']
235235
if url == '':
236236
url = 0

v1.onnx

-16.2 MB
Binary file not shown.

0 commit comments

Comments
 (0)