Skip to main content

CNN image classification trained on FER2013 for the 7 emotion categories.

Project description

This package was created as a part of Talentsprint and Techwise program by James Rodgers of team "What The Face". It uses a pytorch CNN network trained on FER2013 and CK+ images to classify an image passed into it.

Initialize class and pass a jpg PIL image to the predict() method.

classes: Image_classifier() returns self

functions: predict(image) returns [classified_name: str, probability: double]

    Exceptions for predict:
        If the face detection fails and the probability of a category is low it will return:
            returns ['no face detected', '0'] 

Example:

from PIL import Image from what_the_face_classification.inference import Image_classifier

classifier = Image_classifier() image = Image.open(test.jpg)

prediction = classifier(image)

print(prediction)

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

what_the_face_classification-0.0.27.tar.gz (18.3 MB view details)

Uploaded Source

Built Distribution

File details

Details for the file what_the_face_classification-0.0.27.tar.gz.

File metadata

File hashes

Hashes for what_the_face_classification-0.0.27.tar.gz
Algorithm Hash digest
SHA256 798ba5895a7ae8884716c272fd57adfa5d01d9b22ae209835cc9a6d979bb38c1
MD5 987ada09d5b3118ddaae1eae3c98aa3a
BLAKE2b-256 a2eacdf8ed05dd459c1adc529f7c837344b1b0690fe96dade25b955c199703c4

See more details on using hashes here.

File details

Details for the file what_the_face_classification-0.0.27-py3-none-any.whl.

File metadata

File hashes

Hashes for what_the_face_classification-0.0.27-py3-none-any.whl
Algorithm Hash digest
SHA256 dec139258240b39ae3853ce7eae37128bf9329cb3171fe6758c67715199d2478
MD5 6d3374b8c2403ef41eb6eb7d82889a05
BLAKE2b-256 921c824b7a91de1f9dfc265a3c0c59af56a80742bb58c5108b16516708c2621a

See more details on using hashes here.

Supported by

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