Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A revised DeepFace to have callback function for saving emotion inside program

NotificationsYou must be signed in to change notification settings

dhchenx/DeepFaceEmotion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

A revised DeepFace to have callback function for saving emotion inside program

Background

Although theDeepFace project has an amazing abilities to retrieve facial attriburtes in realtime video analysis, the library is not able to provide a callback function so developers can obtain the identified attributes inside their codes. This limits the developer to write automated programs for data mining, for example, automatically retrive the attributes and save the attributes to a csv plain text file.

Hence, I revised thedeepface class in the library to fulfile the needs.

Usage

Replace the attacheddeepface.py andcommons/realtime.py inside the installed deepface lib in python package directory and perform the below example code:

fromdeepfaceimportDeepFacecount=0# this function ensures we can write codes to save the timestamp-based facial attributes during processing videodefcall_back_func(emotions,age,gender,ts):globalcountcount+=1print(emotions)print(age)print(gender)print()DeepFace.stream(# db_path="../doctor_images",# source=0,source="video/test2.mp4",enable_face_recognition=False,call_back_func=call_back_func,time_threshold=2)# pass call_back_func to the stream function# do some work based on the retrieved attributes in time seriesprint("Total Emotions Identification: ",count)

Credit

Say thanks to theDeepFace project.

Note

This revised feature may be unnecessary if the deepface library team adds new features to their library.

About

A revised DeepFace to have callback function for saving emotion inside program

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp