Skip to content

cv2.error: OpenCV(3.4.8) /io/opencv/modules/imgproc/src/resize.cpp:3720: error: (-215:Assertion failed) !ssize.empty() in function 'resize' #14

@jingruhou

Description

@jingruhou

(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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions