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

Exception in thread Thread-2: #6

Open
tomriddle54 opened this issue Jul 2, 2019 · 4 comments
Open

Exception in thread Thread-2: #6

tomriddle54 opened this issue Jul 2, 2019 · 4 comments

Comments

@tomriddle54
Copy link

tomriddle54 commented Jul 2, 2019

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]
@1996scarlet
Copy link
Owner

The reason for this error should be the lack of some dependencies:

pip3 install coloredlogs h5py sklearn \
mxnet-cu101 gluoncv pandas \
ujson mss python-socketio easydict \
matplotlib eventlet scikit-image \
aiohttp imutils websockets Cython --user

The requirements.txt will be updated in a few days.

NOTE: I am using cuda 10.1, so I install mxnet-cu101.

@tomriddle54
Copy link
Author

Still the same error i have cuda 9.1 and cuda 10.1 installed mxnet 101 but still the same issue

[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: [15:15:50] 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(+0x40ba6a) [0x7f70e612ea6a]
[bt] (1) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(+0x40c081) [0x7f70e612f081]
[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) [0x7f70e8c1a9a2]
[bt] (3) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(MXNDArrayLoad+0x263) [0x7f70e8966cf3]
[bt] (4) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.6(ffi_call_unix64+0x4c) [0x7f711a412ec0]
[bt] (5) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.6(ffi_call+0x22d) [0x7f711a41287d]
[bt] (6) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(_ctypes_callproc+0x2ce) [0x7f7141e52eee]
[bt] (7) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(+0x13924) [0x7f7141e53924]
[bt] (8) python(_PyObject_FastCallKeywords+0x4ab) [0x560dbeae165b]
[bt] (9) python(_PyEval_EvalFrameDefault+0x532e) [0x560dbeb3d40e]



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: [15:15:50] 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(+0x40ba6a) [0x7f70e612ea6a]
[bt] (1) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(+0x40c081) [0x7f70e612f081]
[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) [0x7f70e8c1a9a2]
[bt] (3) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/site-packages/mxnet/libmxnet.so(MXNDArrayLoad+0x263) [0x7f70e8966cf3]
[bt] (4) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.6(ffi_call_unix64+0x4c) [0x7f711a412ec0]
[bt] (5) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/lib-dynload/../../libffi.so.6(ffi_call+0x22d) [0x7f711a41287d]
[bt] (6) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(_ctypes_callproc+0x2ce) [0x7f7141e52eee]
[bt] (7) /media/mustafa/ubuntu_backup/anaconda3/lib/python3.7/lib-dynload/_ctypes.cpython-37m-x86_64-linux-gnu.so(+0x13924) [0x7f7141e53924]
[bt] (8) python(_PyObject_FastCallKeywords+0x4ab) [0x560dbeae165b]

@tomriddle54
Copy link
Author

even there is no such file ./build_darknet_and_rcnn.sh so i used build_rcnn.sh

@rena-ganba
Copy link

I think it is the problem of model file, you should use this:

weight files are stored in git lfs, so you must download them to run:
sudo apt-get install git-lfs
git lfs install
git lfs pull

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

3 participants