Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error with usb_camera.py #27

Open
Toan237 opened this issue Jun 23, 2021 · 0 comments
Open

error with usb_camera.py #27

Toan237 opened this issue Jun 23, 2021 · 0 comments

Comments

@Toan237
Copy link

Toan237 commented Jun 23, 2021

when i run python3 usb_camera.py -c 0, as you can see some error below,

Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/home/toan/Downloads/ArcFace-Multiplex-Recognition/usb_camera.py", line 140, in
Process(target=lambda: asyncio.run(upload_loop())).start()
File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/home/toan/Downloads/ArcFace-Multiplex-Recognition/usb_camera.py", line 51, in upload_loop
await sio.connect(url)
File "/home/toan/.local/lib/python3.9/site-packages/socketio/asyncio_client.py", line 144, in connect
raise exceptions.ConnectionError(exc.args[0]) from None
socketio.exceptions.ConnectionError: Connection refused by the server
[15:38:03] ../src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v1.4.1. Attempting to upgrade...
[15:38:03] ../src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded!
[15:38:03] ../src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v1.4.1. Attempting to upgrade...
[15:38:03] ../src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded!
Exception in thread Thread-2:
Traceback (most recent call last):
File "/home/toan/.local/lib/python3.9/site-packages/mxnet/symbol/symbol.py", line 1903, in simple_bind
check_call(_LIB.MXExecutorSimpleBindEx(self.handle,
File "/home/toan/.local/lib/python3.9/site-packages/mxnet/base.py", line 246, in check_call
raise get_last_ffi_error()
mxnet.base.MXNetError: Traceback (most recent call last):
File "../src/storage/storage.cc", line 119
MXNetError: Compile with USE_CUDA=1 to enable GPU usage

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/home/toan/Downloads/ArcFace-Multiplex-Recognition/usb_camera.py", line 139, in
Process(target=lambda: asyncio.run(detection_loop(preload))).start()
File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/home/toan/Downloads/ArcFace-Multiplex-Recognition/usb_camera.py", line 67, in detection_loop
detector = face_detector.DetectorModel(preload)
File "/home/toan/Downloads/ArcFace-Multiplex-Recognition/face_detector.py", line 14, in init
self.detector = RetinaFace(args.retina_model, 0, args.gpu, 'net3')
File "/home/toan/Downloads/ArcFace-Multiplex-Recognition/retinaface.py", line 111, in init
self.model.bind(data_shapes=[('data', (1, 3, image_size[0],
File "/home/toan/.local/lib/python3.9/site-packages/mxnet/module/module.py", line 422, in bind
self._exec_group = DataParallelExecutorGroup(self._symbol, self._context,
File "/home/toan/.local/lib/python3.9/site-packages/mxnet/module/executor_group.py", line 280, in init
self.bind_exec(data_shapes, label_shapes, shared_group)
File "/home/toan/.local/lib/python3.9/site-packages/mxnet/module/executor_group.py", line 383, in bind_exec
self.execs.append(self._bind_ith_exec(i, data_shapes_i, label_shapes_i,
File "/home/toan/.local/lib/python3.9/site-packages/mxnet/module/executor_group.py", line 675, in _bind_ith_exec
executor = self.symbol.simple_bind(ctx=context, grad_req=self.grad_req,
File "/home/toan/.local/lib/python3.9/site-packages/mxnet/symbol/symbol.py", line 1944, in simple_bind
raise RuntimeError(error_msg)
RuntimeError: simple_bind error. Arguments:
data: (1, 3, 640, 640)
Traceback (most recent call last):
File "../src/storage/storage.cc", line 119
MXNetError: Compile with USE_CUDA=1 to enable GPU usage
Exception in thread Thread-1:
Traceback (most recent call last):
File "/home/toan/.local/lib/python3.9/site-packages/mxnet/symbol/symbol.py", line 1903, in simple_bind
check_call(_LIB.MXExecutorSimpleBindEx(self.handle,
File "/home/toan/.local/lib/python3.9/site-packages/mxnet/base.py", line 246, in check_call
raise get_last_ffi_error()
mxnet.base.MXNetError: Traceback (most recent call last):
File "../src/storage/storage.cc", line 119
MXNetError: Compile with USE_CUDA=1 to enable GPU usage

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/home/toan/Downloads/ArcFace-Multiplex-Recognition/usb_camera.py", line 138, in
Process(target=lambda: asyncio.run(embedding_loop(preload))).start()
File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/home/toan/Downloads/ArcFace-Multiplex-Recognition/usb_camera.py", line 57, in embedding_loop
embedding = face_embedding.EmbeddingModel(preload)
File "/home/toan/Downloads/ArcFace-Multiplex-Recognition/face_embedding.py", line 39, in init
self.model = get_model(ctx, image_size, args.arcface_model, 'fc1')
File "/home/toan/Downloads/ArcFace-Multiplex-Recognition/face_embedding.py", line 27, in get_model
model.bind(data_shapes=[('data', (1, 3, image_size[0], image_size[1]))])
File "/home/toan/.local/lib/python3.9/site-packages/mxnet/module/module.py", line 422, in bind
self._exec_group = DataParallelExecutorGroup(self._symbol, self._context,
File "/home/toan/.local/lib/python3.9/site-packages/mxnet/module/executor_group.py", line 280, in init
self.bind_exec(data_shapes, label_shapes, shared_group)
File "/home/toan/.local/lib/python3.9/site-packages/mxnet/module/executor_group.py", line 383, in bind_exec
self.execs.append(self._bind_ith_exec(i, data_shapes_i, label_shapes_i,
File "/home/toan/.local/lib/python3.9/site-packages/mxnet/module/executor_group.py", line 675, in _bind_ith_exec
executor = self.symbol.simple_bind(ctx=context, grad_req=self.grad_req,
File "/home/toan/.local/lib/python3.9/site-packages/mxnet/symbol/symbol.py", line 1944, in simple_bind
raise RuntimeError(error_msg)
RuntimeError: simple_bind error. Arguments:
data: (1, 3, 112, 112)
Traceback (most recent call last):
File "../src/storage/storage.cc", line 119
MXNetError: Compile with USE_CUDA=1 to enable GPU usage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant