Face landmark detection error (dlib,python,ubuntu) - python-2.7

I installed Dlib on ubuntu and it's detector works, but when I want to use predictor and using shape_predictor_68_face_landmarks.dat it shows below message:
./face_landmark_detection.py shape_predictor_68_face_landmarks.dat ./100032540_1.jpg
Traceback (most recent call last):
File "./face_landmark_detection.py", line 66, in <module>
predictor = dlib.shape_predictor(predictor_path)
RuntimeError: Unexpected version found while deserializing dlib::shape_predictor.
how can I fix it?
thanks

Related

pytorch-yolov3 train RuntimeError: Unable to find a valid cuDNN algorithm to run convolution

https://github.com/ultralytics/yolov3/
When I started training yolov3 with 'python train.py' this happened, what is the reason?
Traceback (most recent call last):
File "train.py", line 415, in <module>
train() # train normally
File "train.py", line 279, in train
scaled_loss.backward()
File "C:\Users\zst\anaconda3\lib\site-packages\torch\tensor.py", line 198, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "C:\Users\zst\anaconda3\lib\site-packages\torch\autograd\__init__.py", line 100, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: Unable to find a valid cuDNN algorithm to run convolution (try_all at ..\aten\src\ATen\native\cudnn\Conv.cpp:693)
(no backtrace available)
win10 2080ti cuda10.2 cudnn7604 python 3.7 torch1.5 torchvision0.6
Trace screenshot:
Environment screenshot:

caffe:AttributeError: 'module' object has no attribute 'LabelMap'

The caffe is installed on the Ubuntu server,and it test is ok. I just run the following code on the Ubutun(16.04) cloud server:
import caffe
from caffe.proto import caffe_pb2
label_map = caffe_pb2.LabelMap()
and I have run the command as following which provided by the internet, but there is still error:
command:
export PYTHONPATH=$/home2/challenge98/caffe/python:$PYTHONPATH
error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'LabelMap'
Could you guys give me some advices how to solve it. Thanks!
Should install the version of new caffe(https://github.com/weiliu89/caffe) for you work, although you have installed the BVLC caffe. –

Python SpeechRecognition error

I am exploring speech recognition and came across this python library called SpeechRecognition. I am running a linux mint system and have followed the troubleshooting steps on the webpage linked above. However, I get the following error:
Traceback (most recent call last):
File "test.py", line 4, in <module>
audio = r.listen(source) # listen for the first phrase and extract it into audio data
File "/usr/local/lib/python2.7/dist-packages/speech_recognition/__init__.py", line 268, in listen
buffer = source.stream.read(source.CHUNK)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 605, in read
return pa.read_stream(self._stream, num_frames)
KeyboardInterrupt
Any help is greatly appreciated. I also do understand that the KeyboardInterrupt part of the error is from my doing, pressing ctrl+c.

error after build with innosetup

i wrote a program in python
and i make a setup file with innosetup.after install my exe file and rum my installed program i got error:
Traceback (most recent call last):
File "ProductionRules.py", line 3, in <module>
File "zipextimporter.pyo", line 82, in load_module
File "nltk\__init__.pyo", line 40, in <module>
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'
this error does not happen when i run my "ProductionRules.py" before converting to exe.
what should i do ?
please help me.

Matplotlib not showing up plots (EPD compatibility problems)

I recently installed EPD 7.3-2 (the free version) on my Ubuntu 12.04 (64 bits).
I have some problems when trying to use ipython, I got the following error :
ImportError: Gtk* backend requires pygtk to be installed.
SO I found this article :
https://support.enthought.com/entries/22961778-epd-for-mac-os-x-32-and-64-bit-versions
and even thought it is for Mac OSX it did worked on my Linux machine. The modifications I did was putting the backend like this :
backend : Qt4Agg #GTKAgg
backend.qt4 : PySide
So it used to be GTKAgg. But now I have a new problem. When I try to plot with pylab a simple plot, like :
from pylab import *
plot([1,2,3])
show()
Nothing pops up... And I get the following error :
Error in atexit._run_exitfuncs: Traceback (most recent call last):
File
"/home/mela/Librairies/epd_free-7.3-2-rh5-x86_64/lib/python2.7/atexit.py",
line 24, in _run_exitfuncs
func(*targs, **kargs) File "/home/mela/Librairies/epd_free-7.3-2-rh5-x86_64/lib/python2.7/site-packages/matplotlib/_pylab_helpers.py", line 82, in destroy_all
manager.destroy() File "/home/mela/Librairies/epd_free-7.3-2-rh5-x86_64/lib/python2.7/site-packages/matplotlib/backends/backend_qt4.py",
line 367, in destroy
self._widgetclosed )
RuntimeError: Internal C++ object (PySide.QtGui.QMainWindow) already deleted.
Error in sys.exitfunc:
Traceback (most recent call last): File
"/home/mela/Librairies/epd_free-7.3-2-rh5-x86_64/lib/python2.7/atexit.py",
line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/home/mela/Librairies/epd_free-7.3-2-rh5-x86_64/lib/python2.7/site-packages/matplotlib/_pylab_helpers.py", line 82, in destroy_all
manager.destroy()
File "/home/mela/Librairies/epd_free-7.3-2-rh5-x86_64/lib/python2.7/site-packages/matplotlib/backends/backend_qt4.py",
line 367, in destroy
self._widgetclosed )
RuntimeError: Internal C++ object (PySide.QtGui.QMainWindow) already deleted.
And I really don't get what does it mean or what should I do.
Any clue would be appreciated.
So I found my problem.
First of all, from the problem I undestand that it tries to close a window that's already closed, so I searched why and it looks like now the displays of pyplot are supposed to close directly after so when I add pl.show(block=True). Now I have a display but also a segmentation fault.
After trying different backends it looks like TkAgg solves both problems. So no compatibility issues and I can see my plots.
PS : for changing the backend from matplotlib go to ~/.matplotlib and edit the file matplotlibrc