Skip to content

Commit 9cefcb3

Browse files
committed
Do not load models before hand, do not reinstantiate IEPlugin
1 parent f6e2185 commit 9cefcb3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server_parallel.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
("coco_tiny_yolov3_608", 608),
3232
)
3333
MODELS_IN_USE = {"coco_tiny_yolov3_320"}
34+
MODELS_IN_USE = set()
3435

3536

3637
def server(frameBuffers, admin_queue, inf_ready_queue, api_results):
@@ -267,7 +268,7 @@ def inferencer(results, frameBuffers, number_of_ncs, api_results, inf_ready_queu
267268

268269
for devid in range(number_of_ncs):
269270
print("Plugin the device in now")
270-
plugin = None
271+
plugin = IEPlugin(device="MYRIAD")
271272
plugin_created = False
272273
loaded_model_count = 0
273274
for model_name in models_in_use:
@@ -278,7 +279,7 @@ def inferencer(results, frameBuffers, number_of_ncs, api_results, inf_ready_queu
278279
while True:
279280
try:
280281
if not plugin_created:
281-
plugin = IEPlugin(device="MYRIAD") # TODO: Keep creating new IEPlugin if failed?
282+
# plugin = IEPlugin(device="MYRIAD") # TODO: Keep creating new IEPlugin if failed?
282283
print('[Device %d/%d] IEPlugin initialized' % (devid + 1, number_of_ncs))
283284
model_name, input_size = model
284285
thworker = threading.Thread(target=async_infer, args=(

0 commit comments

Comments
 (0)