1996scarlet / arcface-multiplex-recognition Goto Github PK
View Code? Open in Web Editor NEW适用于复杂场景的人脸识别身份认证系统
适用于复杂场景的人脸识别身份认证系统
Hi 1996,
Which IDE are use for this code?
Best regards,
PeterPham
Hi,
How we can install IPCamera ?
Hi ...,
Would you like to provide requirement.txt ?
Best regards,
PeterPham
thank you for your work. have your ever compare with other way for classfing the faceID, such as feature distance not to train a MLP classifer.
As we know, MLP classifer is diffcult to expand when there are some new faceIDs and need more face datas. why you choose this way, is this get a better accuracy? how to make choose?
Hi,
why the Electron Node-JS Client can't detect any camera that I tried, or need to do something else?
Thank you
Hi,
We want to test your project.
Would mind to let us know the steps to have working system ?
What is the requirement? Also english help inside the codes please. It could be very useful.
when I ran python usb_camera.py -c 0
I am getting this error and there is not requirements.txt
file
[0]
Exception in thread Thread-2:
Traceback (most recent call last):
File "/media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "usb_camera.py", line 139, in <lambda>
Process(target=lambda: asyncio.run(detection_loop(preload))).start()
File "/media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/asyncio/base_events.py", line 573, in run_until_complete
return future.result()
File "usb_camera.py", line 67, in detection_loop
detector = face_detector.DetectorModel(preload)
File "/media/mustafa/ubuntu_backup/Projects/mustafa_face_dl/ArcFace-Multiplex-Recognition/face_detector.py", line 14, in __init__
self.detector = RetinaFace(args.retina_model, 0, args.gpu, 'net3')
File "/media/mustafa/ubuntu_backup/Projects/mustafa_face_dl/ArcFace-Multiplex-Recognition/retinaface.py", line 84, in __init__
sym, arg_params, aux_params = mx.model.load_checkpoint(prefix, epoch)
File "/media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/site-packages/mxnet/model.py", line 438, in load_checkpoint
save_dict = nd.load('%s-%04d.params' % (prefix, epoch))
File "/media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/site-packages/mxnet/ndarray/utils.py", line 175, in load
ctypes.byref(names)))
File "/media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/site-packages/mxnet/base.py", line 252, in check_call
raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: [20:38:55] src/ndarray/ndarray.cc:1803: Check failed: header == kMXAPINDArrayListMagic Invalid NDArray file format
Stack trace returned 10 entries:
[bt] (0) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(+0x23d55a) [0x7f2f172b755a]
[bt] (1) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(+0x23dbc1) [0x7f2f172b7bc1]
[bt] (2) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(mxnet::NDArray::Load(dmlc::Stream*, std::vector<mxnet::NDArray, std::allocator<mxnet::NDArray> >*, std::vector<std::string, std::allocator<std::string> >*)+0x182) [0x7f2f19df5612]
[bt] (3) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(MXNDArrayLoad+0x263) [0x7f2f19b84d73]
[bt] (4) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.6(ffi_call_unix64+0x4c) [0x7f2f1db53ec0]
[bt] (5) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.6(ffi_call+0x22d) [0x7f2f1db5387d]
[bt] (6) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(_ctypes_callproc+0x2ce) [0x7f2f45577eee]
[bt] (7) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(+0x13924) [0x7f2f45578924]
[bt] (8) python(_PyObject_FastCallKeywords+0x4ab) [0x55b223bac65b]
[bt] (9) python(_PyEval_EvalFrameDefault+0x532e) [0x55b223c0840e]
Exception in thread Thread-1:
Traceback (most recent call last):
File "/media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "usb_camera.py", line 138, in <lambda>
Process(target=lambda: asyncio.run(embedding_loop(preload))).start()
File "/media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/asyncio/base_events.py", line 573, in run_until_complete
return future.result()
File "usb_camera.py", line 57, in embedding_loop
embedding = face_embedding.EmbeddingModel(preload)
File "/media/mustafa/ubuntu_backup/Projects/mustafa_face_dl/ArcFace-Multiplex-Recognition/face_embedding.py", line 39, in __init__
self.model = get_model(ctx, image_size, args.arcface_model, 'fc1')
File "/media/mustafa/ubuntu_backup/Projects/mustafa_face_dl/ArcFace-Multiplex-Recognition/face_embedding.py", line 23, in get_model
sym, arg_params, aux_params = mx.model.load_checkpoint(prefix, epoch)
File "/media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/site-packages/mxnet/model.py", line 438, in load_checkpoint
save_dict = nd.load('%s-%04d.params' % (prefix, epoch))
File "/media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/site-packages/mxnet/ndarray/utils.py", line 175, in load
ctypes.byref(names)))
File "/media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/site-packages/mxnet/base.py", line 252, in check_call
raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: [20:38:55] src/ndarray/ndarray.cc:1803: Check failed: header == kMXAPINDArrayListMagic Invalid NDArray file format
Stack trace returned 10 entries:
[bt] (0) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(+0x23d55a) [0x7f2f172b755a]
[bt] (1) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(+0x23dbc1) [0x7f2f172b7bc1]
[bt] (2) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(mxnet::NDArray::Load(dmlc::Stream*, std::vector<mxnet::NDArray, std::allocator<mxnet::NDArray> >*, std::vector<std::string, std::allocator<std::string> >*)+0x182) [0x7f2f19df5612]
[bt] (3) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(MXNDArrayLoad+0x263) [0x7f2f19b84d73]
[bt] (4) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.6(ffi_call_unix64+0x4c) [0x7f2f1db53ec0]
[bt] (5) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.6(ffi_call+0x22d) [0x7f2f1db5387d]
[bt] (6) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(_ctypes_callproc+0x2ce) [0x7f2f45577eee]
[bt] (7) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(+0x13924) [0x7f2f45578924]
[bt] (8) python(_PyObject_FastCallKeywords+0x4ab) [0x55b223bac65b]
[bt] (9) python(_PyEval_EvalFrameDefault+0x532e) [0x55b223c0840e]
when i typed npm install
I am getting this error
WARN engine [email protected]: wanted: {"node":">=6"} (current: {"node":"4.2.6loadDep:punycode -> reque - |##################-------------------------------|
WARN engine [email protected]: wanted: {"node":">=6"} (current: {"node":"4.2.6","np
> [email protected] postinstall /media/mustafa/ubuntu_backup/Projects/mustafa_face_dl/ArcFace-Multiplex-Recognition/electron-client/node_modules/electron
> node install.js
sh: 1: node: not found
npm ERR! Linux 4.15.0-52-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] postinstall: `node install.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'node install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /media/mustafa/ubuntu_backup/Projects/mustafa_face_dl/ArcFace-Multiplex-Recognition/electron-client/npm-debug.log```
Hi,
In insightface facemodel.py below code gives error for Arc...model
if len(args.model)>0:
self.model = get_model(ctx, image_size, args.model, 'fc1')
mxnet.base.MXNetError: [22:42:18] src/ndarray/ndarray.cc:1834: Check failed: header == kMXAPINDArrayListMagic: Invalid NDArray file format
Hi 1996,
Please tell me how to Build R-CNN for Retina Face
Best regards,
PeterPham
Hi 1996,
In this code, Are you using python 2.7 or 3.6?
Best regards,
PeterPham
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
[0]
Exception in thread Thread-1:
Traceback (most recent call last):
File "/home/fire/anaconda3/envs/recognition/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/home/fire/anaconda3/envs/recognition/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "usb_camera.py", line 138, in
Process(target=lambda: asyncio.run(embedding_loop(preload))).start()
File "/home/fire/anaconda3/envs/recognition/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/home/fire/anaconda3/envs/recognition/lib/python3.7/asyncio/base_events.py", line 568, in run_until_complete
return future.result()
File "usb_camera.py", line 57, in embedding_loop
embedding = face_embedding.EmbeddingModel(preload)
File "/home/fire/Desktop/experiment/ArcFace-Multiplex-Recognition-master/face_embedding.py", line 39, in init
self.model = get_model(ctx, image_size, args.arcface_model, 'fc1')
File "/home/fire/Desktop/experiment/ArcFace-Multiplex-Recognition-master/face_embedding.py", line 19, in get_model
assert len(_vec) == 2
AssertionError
Exception in thread Thread-3:
Traceback (most recent call last):
File "/home/fire/anaconda3/envs/recognition/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/home/fire/anaconda3/envs/recognition/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "usb_camera.py", line 140, in
Process(target=lambda: asyncio.run(upload_loop())).start()
File "/home/fire/anaconda3/envs/recognition/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/home/fire/anaconda3/envs/recognition/lib/python3.7/asyncio/base_events.py", line 568, in run_until_complete
return future.result()
File "usb_camera.py", line 17, in upload_loop
sio = socketio.AsyncClient()
File "/home/fire/anaconda3/envs/recognition/lib/python3.7/site-packages/socketio/client.py", line 97, in init
self.eio = self._engineio_client_class()(**engineio_options)
File "/home/fire/anaconda3/envs/recognition/lib/python3.7/site-packages/engineio/client.py", line 82, in init
signal_handler)
File "/home/fire/anaconda3/envs/recognition/lib/python3.7/signal.py", line 47, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread
[14:56:07] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v1.4.1. Attempting to upgrade...
[14:56:07] src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded!
[14:56:08] src/operator/nn/./cudnn/./cudnn_algoreg-inl.h:97: Running performance tests to find the best convolution algorithm, this can take a while... (set the environment variable MXNET_CUDNN_AUTOTUNE_DEFAULT to 0 to disable)
Detection cost: 7.369254212000669
然后一直卡在这
Hi 1996,
When I run command line: python3 usb_camera.py -c 0
I have an issue like this:
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "usb_camera.py", line 138, in
Process(target=lambda: asyncio.run(embedding_loop(preload))).start()
AttributeError: module 'asyncio' has no attribute 'run'
Traceback (most recent call last):
File "usb_camera.py", line 141, in
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "usb_camera.py", line 139, in
Process(target=lambda: asyncio.run(detection_loop(preload))).start()
AttributeError: module 'asyncio' has no attribute 'run'
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "usb_camera.py", line 140, in
Process(target=lambda: asyncio.run(upload_loop())).start()
AttributeError: module 'asyncio' has no attribute 'run'
asyncio.run(camera_loop(preload))
AttributeError: module 'asyncio' has no attribute 'run'
PLEASE GIVE ME SOME ADVICE!!
THANK YOU VERY MUCH!
Best regards,
PeterPham
hi, which code need to modify in order to edit bounding boxes output, i wanna display their name in corner of every boxes, yet familiar with mxnet
Sory, could you tell me your nvidia-cuda-toolkit version and mxnet version?
你好,我可以在作业中使用你的项目吗?
WHEN I RUN: python3 usb_camera.py -c 0 --gpu -1, PLS GIVE ME SOME ADVICE
[0]
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/scarlet_ArcFace-Multiplex-Recognition/usb_camera.py", line 144, 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/scarlet_ArcFace-Multiplex-Recognition/usb_camera.py", line 53, 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
[11:13:41] ../src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v1.4.1. Attempting to upgrade...
[11:13:41] ../src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded!
[11:13:41] ../src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v1.4.1. Attempting to upgrade...
[11:13:41] ../src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded!
[11:13:42] ../src/executor/graph_executor.cc:1995: Subgraph backend MKLDNN is activated.
[11:13:42] ../src/executor/graph_executor.cc:1995: Subgraph backend MKLDNN is activated.
FR model loadded: ['Bush', 'Jim', 'Obama', 'Stalin', 'Trump']
Detection cost: 1.246880608000538
(base) hjr@houjingru:~/develop/ArcFace-Multiplex-Recognition-master$ python usb_camera.py -c 0
[0]
aiohttp not installed -- cannot make HTTP requests!
[02:15:41] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v1.4.1. Attempting to upgrade...
[02:15:41] src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded!
Exception in thread Thread-2:
Traceback (most recent call last):
File "/home/hjr/anaconda3/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/home/hjr/anaconda3/lib/python3.7/threading.py", line 870, in run
self._target(self._args, *self._kwargs)
File "usb_camera.py", line 139, in
Process(target=lambda: asyncio.run(detection_loop(preload))).start()
File "/home/hjr/anaconda3/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/home/hjr/anaconda3/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete
return future.result()
File "usb_camera.py", line 67, in detection_loop
detector = face_detector.DetectorModel(preload)
File "/home/hjr/develop/ArcFace-Multiplex-Recognition-master/face_detector.py", line 14, in init
self.detector = RetinaFace(args.retina_model, 0, args.gpu, 'net3')
File "/home/hjr/develop/ArcFace-Multiplex-Recognition-master/retinaface.py", line 84, in init
sym, arg_params, aux_params = mx.model.load_checkpoint(prefix, epoch)
File "/home/hjr/anaconda3/lib/python3.7/site-packages/mxnet/model.py", line 451, in load_checkpoint
save_dict = nd.load('%s-%04d.params' % (prefix, epoch))
File "/home/hjr/anaconda3/lib/python3.7/site-packages/mxnet/ndarray/utils.py", line 175, in load
ctypes.byref(names)))
File "/home/hjr/anaconda3/lib/python3.7/site-packages/mxnet/base.py", line 253, in check_call
raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: [02:15:41] src/ndarray/ndarray.cc:1839: Check failed: header == kMXAPINDArrayListMagic: Invalid NDArray file format
Stack trace:
[bt] (0) /home/hjr/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(+0x2795cb) [0x7fb1ed6345cb]
[bt] (1) /home/hjr/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(mxnet::NDArray::Load(dmlc::Stream, std::vector<mxnet::NDArray, std::allocatormxnet::NDArray >, std::vector<std::string, std::allocatorstd::string >*)+0x161) [0x7fb1ef90a6e1]
[bt] (2) /home/hjr/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(MXNDArrayLoad+0x263) [0x7fb1ef69f463]
[bt] (3) /home/hjr/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.6(ffi_call_unix64+0x4c) [0x7fb200458ec0]
[bt] (4) /home/hjr/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.6(ffi_call+0x22d) [0x7fb20045887d]
[bt] (5) /home/hjr/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(_ctypes_callproc+0x2ce) [0x7fb209cb7ede]
[bt] (6) /home/hjr/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(+0x12914) [0x7fb209cb8914]
[bt] (7) python(_PyObject_FastCallKeywords+0x49b) [0x5558043748fb]
[bt] (8) python(_PyEval_EvalFrameDefault+0x52f8) [0x5558043d86e8]
[02:15:41] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v1.4.1. Attempting to upgrade...
[02:15:41] src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded!
Exception in thread Thread-1:
Traceback (most recent call last):
File "/home/hjr/anaconda3/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/home/hjr/anaconda3/lib/python3.7/threading.py", line 870, in run
self._target(self._args, *self._kwargs)
File "usb_camera.py", line 138, in
Process(target=lambda: asyncio.run(embedding_loop(preload))).start()
File "/home/hjr/anaconda3/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/home/hjr/anaconda3/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete
return future.result()
File "usb_camera.py", line 57, in embedding_loop
embedding = face_embedding.EmbeddingModel(preload)
File "/home/hjr/develop/ArcFace-Multiplex-Recognition-master/face_embedding.py", line 39, in init
self.model = get_model(ctx, image_size, args.arcface_model, 'fc1')
File "/home/hjr/develop/ArcFace-Multiplex-Recognition-master/face_embedding.py", line 23, in get_model
sym, arg_params, aux_params = mx.model.load_checkpoint(prefix, epoch)
File "/home/hjr/anaconda3/lib/python3.7/site-packages/mxnet/model.py", line 451, in load_checkpoint
save_dict = nd.load('%s-%04d.params' % (prefix, epoch))
File "/home/hjr/anaconda3/lib/python3.7/site-packages/mxnet/ndarray/utils.py", line 175, in load
ctypes.byref(names)))
File "/home/hjr/anaconda3/lib/python3.7/site-packages/mxnet/base.py", line 253, in check_call
raise MXNetError(py_str(_LIB.MXGetLastError()))
mxnet.base.MXNetError: [02:15:41] src/ndarray/ndarray.cc:1839: Check failed: header == kMXAPINDArrayListMagic: Invalid NDArray file format
Stack trace:
[bt] (0) /home/hjr/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(+0x2795cb) [0x7fb1ed6345cb]
[bt] (1) /home/hjr/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(mxnet::NDArray::Load(dmlc::Stream, std::vector<mxnet::NDArray, std::allocatormxnet::NDArray >, std::vector<std::string, std::allocatorstd::string >*)+0x161) [0x7fb1ef90a6e1]
[bt] (2) /home/hjr/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(MXNDArrayLoad+0x263) [0x7fb1ef69f463]
[bt] (3) /home/hjr/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.6(ffi_call_unix64+0x4c) [0x7fb200458ec0]
[bt] (4) /home/hjr/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.6(ffi_call+0x22d) [0x7fb20045887d]
[bt] (5) /home/hjr/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(_ctypes_callproc+0x2ce) [0x7fb209cb7ede]
[bt] (6) /home/hjr/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(+0x12914) [0x7fb209cb8914]
[bt] (7) python(_PyObject_FastCallKeywords+0x49b) [0x5558043748fb]
[bt] (8) python(_PyEval_EvalFrameDefault+0x52f8) [0x5558043d86e8]
select timeout
VIDIOC_DQBUF: Resource temporarily unavailable
VIDIOC_QBUF: Invalid argument
Traceback (most recent call last):
File "usb_camera.py", line 141, in
asyncio.run(camera_loop(preload))
File "/home/hjr/anaconda3/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/home/hjr/anaconda3/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete
return future.result()
File "usb_camera.py", line 107, in camera_loop
for code in code_list]
File "usb_camera.py", line 107, in
for code in code_list]
cv2.error: OpenCV(3.4.8) /io/opencv/modules/imgproc/src/resize.cpp:3720: error: (-215:Assertion failed) !ssize.empty() in function 'resize'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.