Code Monkey home page Code Monkey logo

face-recognition-using-deep-learning's Issues

recognizer.pickle

Thank you for this amazing repository.
I have found out that directly cloning and running the code results in unexpected behaviors (sometimes crashes). This is a result of the .pickle extension being omitted on line that dumps the recognizer into the output folder.
Please update line 26 of the train_model.py file to the following

f = open("output/recognizer.pickle", "wb")

sklearn.svm.classes error

"recognize_video.py", line 22, in
recognizer = pickle.loads(open("output/recognizer.pickle", "rb").read())
ModuleNotFoundError: No module named 'sklearn.svm.classes'

File "recognize_video.py", line 87, in <module>

File "recognize_video.py", line 87, in
preds = recognizer.predict_proba(vec)[0]
File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/sklearn/svm/_base.py", line 657, in predict_proba
self._check_proba()
File "/home/pi/.virtualenvs/cv/lib/python3.7/site-packages/sklearn/svm/_base.py", line 623, in _check_proba
if not self.probability:
AttributeError: 'SVC' object has no attribute 'probability'

ModuleNotFoundError: No module named 'copy_reg\r'

When I try to run the file recognize_video.py, I get an error:
Traceback (most recent call last):
File "C:/Users/%username%/Desktop/face-recognition-using-deep-learning/recognize_video.py", line 22, in
recognizer = pickle.loads(open("output/recognizer.pickle", "rb").read())
ModuleNotFoundError: No module named 'copy_reg\r'.
'copy_reg\r' - its a first line of text from 'recognizer.pickle' - file

[Contrib] Is this repo active ?

I love the concept behind the project and would like to contribute to the project. I am planning to make jupyter notebook to demonstrate the project. Are you currently accepting any PR?

UnicodeDecodeError: 'ascii'

File "recognize_video.py", line 22, in
recognizer = pickle.loads(open("output/recognizer.pickle", "rb").read())
UnicodeDecodeError: 'ascii' codec can't decode byte 0x80 in position 512: ordinal not in range(128)

I am get error in mac ox Catalina

help pls

python3 recognize_video.py
Loading Face Detector...
Loading Face Recognizer...
Traceback (most recent call last):
File "/home/hamza/face-recognition-using-opencv/recognize_video.py", line 22, in
recognizer = pickle.loads(open("output/recognizer.pickle", "rb").read())
ModuleNotFoundError: No module named 'sklearn.svm.classes'

TypeError: an integer is required (got type bytes)

using these libraries below and their versions in python 3.8
imutils==0.5.4
joblib==1.1.0
numpy==1.22.1
opencv-python==4.5.5.62
scikit-learn==0.20.4
scipy==1.7.3
threadpoolctl==3.1.0
i got the error below

Loading Face Detector...
Loading Face Recognizer...
Traceback (most recent call last):
File "recognize_video.py", line 22, in
recognizer = pickle.loads(open("output/recognizer.pickle", "rb").read())
File "/home/adesoji/sojiface/lib/python3.8/site-packages/sklearn/init.py", line 64, in
from .base import clone
File "/home/adesoji/sojiface/lib/python3.8/site-packages/sklearn/base.py", line 14, in
from .utils.fixes import signature
File "/home/adesoji/sojiface/lib/python3.8/site-packages/sklearn/utils/init.py", line 14, in
from . import _joblib
File "/home/adesoji/sojiface/lib/python3.8/site-packages/sklearn/utils/_joblib.py", line 22, in
from ..externals import joblib
File "/home/adesoji/sojiface/lib/python3.8/site-packages/sklearn/externals/joblib/init.py", line 119, in
from .parallel import Parallel
File "/home/adesoji/sojiface/lib/python3.8/site-packages/sklearn/externals/joblib/parallel.py", line 28, in
from ._parallel_backends import (FallbackToBackend, MultiprocessingBackend,
File "/home/adesoji/sojiface/lib/python3.8/site-packages/sklearn/externals/joblib/_parallel_backends.py", line 22, in
from .executor import get_memmapping_executor
File "/home/adesoji/sojiface/lib/python3.8/site-packages/sklearn/externals/joblib/executor.py", line 14, in
from .externals.loky.reusable_executor import get_reusable_executor
File "/home/adesoji/sojiface/lib/python3.8/site-packages/sklearn/externals/joblib/externals/loky/init.py", line 12, in
from .backend.reduction import set_loky_pickler
File "/home/adesoji/sojiface/lib/python3.8/site-packages/sklearn/externals/joblib/externals/loky/backend/reduction.py", line 125, in
from sklearn.externals.joblib.externals import cloudpickle # noqa: F401
File "/home/adesoji/sojiface/lib/python3.8/site-packages/sklearn/externals/joblib/externals/cloudpickle/init.py", line 3, in
from .cloudpickle import *
File "/home/adesoji/sojiface/lib/python3.8/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py", line 152, in
_cell_set_template_code = _make_cell_set_template_code()
File "/home/adesoji/sojiface/lib/python3.8/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py", line 133, in _make_cell_set_template_code
return types.CodeType(
TypeError: an integer is required (got type bytes)

How do i rectify this problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.