GithubHelp home page GithubHelp logo

Comments (16)

nischi avatar nischi commented on August 25, 2024 1

maybe an issue with the swap file. but you shouldnt have this to high, otherwise you can burn your SD Card. I think Raspi 3 has to less power for dnn cnn

from mmm-face-reco-dnn.

HorstBaerbel avatar HorstBaerbel commented on August 25, 2024

See #17 for the pictures in the "unknown" folder.
640x480 should be fine. Pictures are rescaled to 500px anyway for faster face detection...

from mmm-face-reco-dnn.

nischi avatar nischi commented on August 25, 2024

Yes thats because the OpenCV detect a face. The detection is not perfect. Which method do you use for face detection?

I think it's possible to increase the resolution, but it will be much slower. And i'm not sure it would be better recognition after that.

from mmm-face-reco-dnn.

HorstBaerbel avatar HorstBaerbel commented on August 25, 2024

Images are rescaled to 500px anyway

# grab the frame from the threaded video stream and resize it
# to 500px (to speedup processing)
originalFrame = vs.read()
frame = imutils.resize(originalFrame, width=500)

so I suspect a higher resolution would no make much of a difference. It might be better to make sure you use the newer DNN, not the HaarCascades method and add some more training pictures and update you encodings (see README).

from mmm-face-reco-dnn.

ChrizZz90 avatar ChrizZz90 commented on August 25, 2024

I use DNN and I have lots of training pictures (400+). Maybe the problem is that I use a widescreen camera?

from mmm-face-reco-dnn.

nischi avatar nischi commented on August 25, 2024

dnn is the recognition method (i realized that i wrote it a little bit wrong in the readme) the "detectionMethod" is the detection of the face which make some issues here. which settings do you have? hog or cnn?

from mmm-face-reco-dnn.

ChrizZz90 avatar ChrizZz90 commented on August 25, 2024

Ah alright, I use hog. So I should try cnn, right?

from mmm-face-reco-dnn.

nischi avatar nischi commented on August 25, 2024

yes, give a try

from mmm-face-reco-dnn.

ChrizZz90 avatar ChrizZz90 commented on August 25, 2024

so I changed to cnn, created new embeddings with "python3 encode.py" and now my MM doesn't recognize anything. Do I have to add "-d cnn" by creating new embeddings?

from mmm-face-reco-dnn.

nischi avatar nischi commented on August 25, 2024

its not necessary, should also work without. thats only how to detect faces while check your pictures. if that isnt a problem, you dont need to

from mmm-face-reco-dnn.

ChrizZz90 avatar ChrizZz90 commented on August 25, 2024

after changing the type this modul doesn't recognize anything

from mmm-face-reco-dnn.

nischi avatar nischi commented on August 25, 2024

any error message?

from mmm-face-reco-dnn.

ChrizZz90 avatar ChrizZz90 commented on August 25, 2024

`[16:24:30.878] [ERROR] { Error: MemoryError: std::bad_alloc
at PythonShell.parseError (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:246:21)
at terminateIfNeeded (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:129:32)
at ChildProcess. (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:121:13)
at ChildProcess.emit (events.js:182:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)

----- Python Traceback -----
File "modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line 106, in <module>
  model=args["detectionMethod"])
File "/usr/local/lib/python3.7/dist-packages/face_recognition/api.py", line 116, in face_locations
  return [_trim_css_to_bounds(_rect_to_css(face.rect), img.shape) for face in _raw_face_locations(img, number_of_times_to_upsample, "cnn")]
File "/usr/local/lib/python3.7/dist-packages/face_recognition/api.py", line 100, in _raw_face_locations
  return cnn_face_detector(img, number_of_times_to_upsample)

traceback:
'Traceback (most recent call last):\n File "modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line 106, in \n model=args["detectionMethod"])\n File "/usr/local/lib/python3.7/dist-packages/face_recognition/api.py", line 116, in face_locations\n return [_trim_css_to_bounds(_rect_to_css(face.rect), img.shape) for face in _raw_face_locations(img, number_of_times_to_upsample, "cnn")]\n File "/usr/local/lib/python3.7/dist-packages/face_recognition/api.py", line 100, in _raw_face_locations\n return cnn_face_detector(img, number_of_times_to_upsample)\nMemoryError: std::bad_alloc\n',
executable: 'python3',
options: null,
script: 'modules/MMM-Face-Reco-DNN/tools/facerecognition.py',
args:
[ '--cascade=modules/MMM-Face-Reco-DNN/tools/haarcascade_frontalface_default.xml',
'--encodings=modules/MMM-Face-Reco-DNN/tools/encodings.pickle',
'--usePiCamera=0',
'--method=dnn',
'--detectionMethod=cnn',
'--interval=2000',
'--output=0',
'--extendDataset=True',
'--dataset=modules/MMM-Face-Reco-DNN/dataset/' ],
exitCode: 1 }`

from mmm-face-reco-dnn.

nischi avatar nischi commented on August 25, 2024

phu seems like a RAM issue. Do you use the "old" Raspberry Pi 3?

from mmm-face-reco-dnn.

ChrizZz90 avatar ChrizZz90 commented on August 25, 2024

yes I use a Raspberry Pi 3 - 350 MB of 874 MB RAM is used when MM is running

from mmm-face-reco-dnn.

nischi avatar nischi commented on August 25, 2024

Close it because no activity here. If still a case, you can reopen it.

from mmm-face-reco-dnn.

Related Issues (20)

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.