Skip to main content

Recognizing facial expressions from images, videos and real-time stream

Project description


Cerebro is a python package for Facial Expression Detection, we provide a trained model with accuracy around 98% of 8 emotions [Happy, surprise, contempt, sad ,angry,disgust,Neutral,Fear], with a very simple interface for detection from image,video with any rotation and Real time streaming.


Example In this Example we get an image , predict an emotion then save it with the emotion.

from interface import video_stream as vs
from interface import process_image as pi

def main():
	im = cv2.imread("interface/7.jpg")
	items =pi.extract_faces_emotions(im)
	im =pi.mark_faces_emotions(im)
	cv2.imshow("detected emotions",im)

if __name__ == '__main__': main()

alt text

Installition Cerebro depends on some python packages, once you install Cerebro any missing Module will be automatically installed, for FFmpeg use this link.

Installation by hand: download the sources, either from PyPI or, if you want the development version, from GitHub, clone the project then use this command in terminal to setup.

$ (sudo) python install

Installation with pip: if you have pip installed, just type this in a terminal:

$ (sudo) pip install CEREBRO8 Using Model : once You install Cerebro You have to dowenload our trained model from this link and full model link then add them to new foldercalled saved-models Using Landmark : if you want to use Landmark feature extractor you have to dowenload this file landmarks with 68 point using this link in this path saved-models/face-landmarks "create new folder called landmarks in saved-models"

Video demo

Real Time demo


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

CEREBRO8-0.0.1.tar.gz (14.0 kB view hashes)

Uploaded source

Built Distribution

CEREBRO8-0.0.1-py3-none-any.whl (31.8 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page