Skip to main content

Facial Expression Recognizer

Give the function an input and it will return a dictionary of detected faces and expression predictions.


About

This is a python3 cli for Facial Expression Recognition (FER) using Keras and OpenCV.

This project uses the haarcascade xml for facial detection.

We recommend using our model for this application, but you may use your own as well. This project could be easily modified to do other types of object detection if you wish.

If you fork this project, please contribute back with any fixes or features the community may find useful. All PRs will go through a member of our Engineering team.

Please follow GitHub's template for bug reporting.


Install

Note this requires the installation of Tensorflow 2+

Using pip

$ pip3 install fer-capture

From source

$ git clone git@github.com:IntrospectData/id-fer-capture.git

$ python3 -m venv env

$ source env/bin/activate

(env) $ pip3 install id-fer-capture

  • To include tensorflow:
    • id-fer_capture[cpu] for cpu based tensorflow
    • id-fer_capture[gpu] for gpu based tensorflow

Use:

>>> from fer_capture.main import check_stream
>>> from fer_capture.main import check_image
>>> check_stream("/mnt/storage/face_test.mp4")
    [{'faces': {...}}, ...]
>>> check_image("/mnt/storage/face.jpeg")
    {'faces': {...}}

Append the argument show=True to either function to have a window display. You can press/hold any key for the frame to update in this mode.

Metadata

Release files for id-fer 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for id-fer 0.4.0
File Size Uploaded Provenance Actions
id-fer-0.4.0.tar.gz 5.0 kB Without provenance Details for id-fer-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for id-fer 0.4.0
File Interpreter ABI Platform Actions
id_fer-0.4.0-py3-none-any.whl Python 3 none any Details for id_fer-0.4.0-py3-none-any.whl

Total release size: 10.1 kB

Release files / id-fer-0.4.0.tar.gz

Download URL id-fer-0.4.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b91e350782c94df003dd5a4d1fd87d3fe7ca4102a1d1bb934d131a92e6cda059
BLAKE2b-256 checksum
How to use checksums
86e90011457814a82bc6356401a8638964daf12cbff9a4d47e7b1c88344b0609
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.45.0 CPython/3.8.2

Release files / id_fer-0.4.0-py3-none-any.whl

Download URL id_fer-0.4.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8938fd49b08285983f1efec735f95f03cedd0bc1713ca6d357b8aa79b0c766ab
BLAKE2b-256 checksum
How to use checksums
93b34a147d5b80af60697c06edc04ab746d829c648a494f3c01b77db16d03d86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.45.0 CPython/3.8.2

Security for id-fer 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page