Skip to main content

Recognize and detect faces in an extremely easy way

Project description

happy_face

Terminal install:

pip install happy_face

Import:

from happy_face.happy_face import HappyFace

Introduction:

happy_face was built on many different amazing libraries, mainly face_recognition from Adam Geitgey, dlib and many more. I do not take any accomplishment in doing this, it is just an easy way of implementing face_recognition for people that are starting.

The main purpose of happy_face is to show the magic of deep learning to people that are just starting with programming.

It has few functions, but it is extremely easy to use, this motivates people that are just starting because in python you do not see visual results until later in the journey, this can sometimes kill the creative energy.

Brief Explanation:

You just need to create a variable, instantiate it with HappyFace and fill three params:

  • known_person_path_file: is the path to the SINGLE image of the face that you want to be recognized.
  • unknown_images_path_file: here is the path to the FOLDER where you have all the other images that you want to recognize.
  • known_name : The name of the known_person_path_file, this will display Found U! If left empty.

IMPORTANT!!! Make sure your files (folders or pictures) DO NOT START WITH A DOT --> . <---, if they do, the application will have troubles to execute, this is because sometimes there are hidden files and they start with a dot. This was taken into consideration so the application runs smoothly, just make sure that your folders and files (images) do NOT start with a dot ---> . <---

Sample Code:

tiger_woods = HappyFace(known_person_path_file= '/Users/Desktop/tiger.png', 
                    unknown_images_path_file = '/Users/Desktop/unknown_pictures', 
                        known_name= 'Tiger Woods')

Functions:

  • display_known_im() -- will display the known_person_path_file image
  • detects_known_face() -- will detect the face of the known person
  • detects_unknown_faces() -- will detect all the faces of the images provided in the unknown_images_path_file folder
  • recognize_faces() -- Will recognize either the person is you (or whoever you provided) or a stranger

Sample Code:

tiger_woods.display_known_im() #Will display the image

tiger_woods.detects_known_face() #Will detect the face of (in this case) Tiger Woods

tiger_woods.detects_unknown_faces() #Will detect all the faces provided of the unknown people

tiger_woods.recognize_faces() -- # Will recognize either the person is tiger woods or a stranger

EXAMPLE:

from happy_face.happy_face import HappyFace

# Instantiate a variable to HappyFace and provide YOUR path file to the image and folder
tiger_woods = HappyFace(known_person_path_file='/Users/Desktop/tiger.png', 
                        unknown_images_path_file='/Users/Desktop/unknown_pictures', 
                        known_name='Tiger Woods')

# Execute
tiger_woods.recognize_faces()

OUTPUT:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

happy_face-0.0.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

happy_face-0.0.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file happy_face-0.0.1.tar.gz.

File metadata

  • Download URL: happy_face-0.0.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for happy_face-0.0.1.tar.gz
Algorithm Hash digest
SHA256 2d437951258031a9bf95895bb2f82f2f8735da9327a810a250a1fbef8e9d216c
MD5 19ea703e56dac67552a1d0d4ae904505
BLAKE2b-256 af581ebc098d36715a59bc71ab4482805d6052b7f4d2136492a3c195595e963f

See more details on using hashes here.

File details

Details for the file happy_face-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: happy_face-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.6.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for happy_face-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 072b1ab944a1eecd9395f0a9d7ab9530e15598acd88e6cf6f0c99c03d59ea98c
MD5 77afe4e6b6868905d675cd33948baea5
BLAKE2b-256 4a82a5bea9c24d7ab3f1dfd611fd2523cbd34749673dc0c33b9d6d7e3f6ee512

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page