Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/verifid/facereg
Python module for face recognition with OpenCV and Deep Learning.
https://github.com/verifid/facereg
cnn-for-visual-recognition computer-vision deep-learning face-recognition hog-features opencv
Last synced: 7 days ago
JSON representation
Python module for face recognition with OpenCV and Deep Learning.
- Host: GitHub
- URL: https://github.com/verifid/facereg
- Owner: verifid
- License: mit
- Created: 2019-01-06T20:52:16.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-02-17T20:41:40.000Z (over 3 years ago)
- Last Synced: 2024-10-07T17:36:48.876Z (about 1 month ago)
- Topics: cnn-for-visual-recognition, computer-vision, deep-learning, face-recognition, hog-features, opencv
- Language: Python
- Homepage: https://facereg.verifid.app/
- Size: 1.57 MB
- Stars: 21
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: COPYING
Awesome Lists containing this project
README
facereg
=======.. image:: https://img.shields.io/pypi/v/facereg.svg
:target: https://pypi.org/pypi/facereg/.. image:: https://img.shields.io/pypi/pyversions/facereg.svg
:target: https://pypi.org/project/facereg.. image:: https://github.com/verifid/facereg/workflows/facereg%20ci/badge.svg
:target: https://github.com/verifid/facereg/actions.. image:: https://codecov.io/gh/verifid/facereg/branch/master/graph/badge.svg
:target: https://codecov.io/gh/verifid/facereg.. image:: https://pepy.tech/badge/facereg
:target: https://pepy.tech/project/facereg**facereg** is a module for face recognition with OpenCV and Deep Learning.
For now it can be used for just images. It is easy to use with a handy feature
which downloads images from Google for you with given keywords to create dataset/s.Uses two different technics **CNN** and **HoG** for recognition based on `dlib `_'s
face recognition system with using `face_recognition `_.
**facereg** has totally three different layers and only recognizer has connection on encoder.|image_layers|
Prerequisites
=============* `CMake `_
* All dependencies are listed on ``requirements.txt`` and will be installed when you install with **pip**.Installation
============* Install module using ``pip``::
$ pip install facereg
* Download the latest ``facereg`` library from: https://github.com/verifid/facereg and install module using ``pip``::
$ pip install -e .
* Extract the source distribution and run::
$ python setup.py build
$ python setup.py installUsage
=====* ``google_images``:
.. code:: python
import os
from facereg import google_imagesoutput_directory = os.getcwd() + '/datasets' # directory path where you want to save photos
image_paths = google_images.download('michael jordan', limit=3)* ``face_encoder``:
.. code:: python
import os
from facereg import face_encoderdatasets_path = os.getcwd() + '/datasets'
encodings_path = os.path.dirname(os.path.realpath(__file__)) + '/encodings.pickle'
# these are default values for this method
face_encoder.encode_faces(datasets=datasets_path, encodings=encodings_path, detection_method='cnn')* ``recognize_faces``:
.. code:: python
from facereg import recognize_faces
image_path = 'DIRECTORY PATH OF YOUR_IMAGE'
names = recognize_faces.recognize(image_path)
# returns found names from your datasetsCLI Usage
=========* Download images
.. code::
# -d: keyword, -l: limit
$ python -m facereg -d 'michael jordan'
$ python -m facereg -d 'michael jordan' -l 5* Recognition
.. code::
# -i: Directory path for image
$ python -m facereg -i tests/resources/michael_jordan.jpegSample Result
=============|image_sample|
.. |image_layers| image:: https://raw.githubusercontent.com/verifid/facereg/master/resources/layers.png
.. |image_sample| image:: https://raw.githubusercontent.com/verifid/facereg/master/resources/mj&sp.png