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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file what_the_face_classification-0.0.27.tar.gz
.
File metadata
- Download URL: what_the_face_classification-0.0.27.tar.gz
- Upload date:
- Size: 18.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 798ba5895a7ae8884716c272fd57adfa5d01d9b22ae209835cc9a6d979bb38c1 |
|
MD5 | 987ada09d5b3118ddaae1eae3c98aa3a |
|
BLAKE2b-256 | a2eacdf8ed05dd459c1adc529f7c837344b1b0690fe96dade25b955c199703c4 |
File details
Details for the file what_the_face_classification-0.0.27-py3-none-any.whl
.
File metadata
- Download URL: what_the_face_classification-0.0.27-py3-none-any.whl
- Upload date:
- Size: 18.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dec139258240b39ae3853ce7eae37128bf9329cb3171fe6758c67715199d2478 |
|
MD5 | 6d3374b8c2403ef41eb6eb7d82889a05 |
|
BLAKE2b-256 | 921c824b7a91de1f9dfc265a3c0c59af56a80742bb58c5108b16516708c2621a |