JeVoisBase
1.22
JeVois Smart Embedded Machine Vision Toolkit Base Modules
|
|
Human facial emotion recognition using OpenCV Deep Neural Networks (DNN) More...
Public Member Functions | |
__init__ (self) | |
Constructor. | |
process (self, inframe, outframe) | |
JeVois main processing function. | |
Public Attributes | |
inpWidth | |
inpHeight | |
scale | |
mean | |
rgb | |
timer | |
classes | |
model | |
net | |
Human facial emotion recognition using OpenCV Deep Neural Networks (DNN)
This module runs an emotion classification deep neural network using the OpenCV DNN library. The network is from the FER+ emotion recognition project, "Training Deep Networks for Facial Expression Recognition with Crowd-Sourced Label Distribution" arXiv:1608.01041
The module outputs a score from -1000 to 1000 for each of: neutral, happiness, surprise, sadness, anger, disgust, fear, contempt.
Note that this module does not include any face detection. Hence it always assumes that there is a face well centered in the image. You should enhance this module with first applying a face detector (see, e.g., PyDetectionDNN) and to only run the emotion recognition network on the detected faces.
Definition at line 33 of file PyEmotion.py.
PyEmotion.PyEmotion.__init__ | ( | self | ) |
Constructor.
Definition at line 36 of file PyEmotion.py.
PyEmotion.PyEmotion.process | ( | self, | |
inframe, | |||
outframe | |||
) |
JeVois main processing function.
Definition at line 50 of file PyEmotion.py.
PyEmotion.PyEmotion.classes |
Definition at line 57 of file PyEmotion.py.
Referenced by PyPostClassify.PyPostClassify.freeze(), PyPostDAMOyolo.PyPostDAMOyolo.freeze(), PyPostYolo.PyPostYolo.freeze(), PyPostYOLOv8seg.PyPostYOLOv8seg.freeze(), PyDetectionDNN.PyDetectionDNN.postprocess(), and PyClassificationDNN.PyClassificationDNN.process().
PyEmotion.PyEmotion.inpHeight |
Definition at line 38 of file PyEmotion.py.
Referenced by PyClassificationDNN.PyClassificationDNN.process(), and PyDetectionDNN.PyDetectionDNN.process().
PyEmotion.PyEmotion.inpWidth |
Definition at line 37 of file PyEmotion.py.
Referenced by PyClassificationDNN.PyClassificationDNN.process(), and PyDetectionDNN.PyDetectionDNN.process().
PyEmotion.PyEmotion.mean |
Definition at line 40 of file PyEmotion.py.
Referenced by transform.Normalize.__call__(), quantize-inc.Dataset.__getitem__(), mobilenet_v1.MobileNetV1._preprocess(), mobilenet_v2.MobileNetV2._preprocess(), PyPreBlob.PyPreBlob.process(), PyClassificationDNN.PyClassificationDNN.process(), and PyDetectionDNN.PyDetectionDNN.process().
PyEmotion.PyEmotion.model |
Definition at line 59 of file PyEmotion.py.
Referenced by lpd_yunet.LPD_YuNet.__init__(), PyNetKSNN.PyNetKSNN.freeze(), PyNetOpenCV.PyNetOpenCV.freeze(), PyNetORT.PyNetORT.freeze(), PyNetURetinex.PyNetURetinex.freeze(), mobilenet_v1.MobileNetV1.infer(), mobilenet_v2.MobileNetV2.infer(), lpd_yunet.LPD_YuNet.infer(), mp_palmdet.MPPalmDet.infer(), PyNetKSNN.PyNetKSNN.load(), PyNetOpenCV.PyNetOpenCV.load(), PyNetORT.PyNetORT.load(), PyNetURetinex.PyNetURetinex.load(), PyClassificationDNN.PyClassificationDNN.process(), PyCoralClassify.PyCoralClassify.process(), PyCoralDetect.PyCoralDetect.process(), PyCoralSegment.PyCoralSegment.process(), PyDetectionDNN.PyDetectionDNN.process(), PyCoralClassify.PyCoralClassify.processGUI(), PyCoralDetect.PyCoralDetect.processGUI(), PyCoralSegment.PyCoralSegment.processGUI(), PyLicensePlate.PyLicensePlate.processGUI(), mobilenet_v1.MobileNetV1.setBackend(), mobilenet_v2.MobileNetV2.setBackend(), lpd_yunet.LPD_YuNet.setBackend(), mp_palmdet.MPPalmDet.setBackend(), mobilenet_v1.MobileNetV1.setTarget(), mobilenet_v2.MobileNetV2.setTarget(), lpd_yunet.LPD_YuNet.setTarget(), and mp_palmdet.MPPalmDet.setTarget().
PyEmotion.PyEmotion.net |
Definition at line 60 of file PyEmotion.py.
Referenced by PyNetKSNN.PyNetKSNN.load(), PyNetOpenCV.PyNetOpenCV.load(), PyDetectionDNN.PyDetectionDNN.postprocess(), PyNetKSNN.PyNetKSNN.process(), PyNetOpenCV.PyNetOpenCV.process(), PyClassificationDNN.PyClassificationDNN.process(), and PyDetectionDNN.PyDetectionDNN.process().
PyEmotion.PyEmotion.rgb |
Definition at line 41 of file PyEmotion.py.
Referenced by PyClassificationDNN.PyClassificationDNN.process(), PyCoralClassify.PyCoralClassify.process(), PyCoralDetect.PyCoralDetect.process(), PyCoralSegment.PyCoralSegment.process(), PyDetectionDNN.PyDetectionDNN.process(), PyCoralClassify.PyCoralClassify.processGUI(), PyCoralDetect.PyCoralDetect.processGUI(), and PyCoralSegment.PyCoralSegment.processGUI().
PyEmotion.PyEmotion.scale |
Definition at line 39 of file PyEmotion.py.
Referenced by PyPreBlob.PyPreBlob.process(), PyClassificationDNN.PyClassificationDNN.process(), and PyDetectionDNN.PyDetectionDNN.process().
PyEmotion.PyEmotion.timer |
Definition at line 46 of file PyEmotion.py.
Referenced by FirstPython.FirstPython.process(), PyClassificationDNN.PyClassificationDNN.process(), PyCoralClassify.PyCoralClassify.process(), PyCoralDetect.PyCoralDetect.process(), PyCoralSegment.PyCoralSegment.process(), PyDetectionDNN.PyDetectionDNN.process(), PyDMTX.PyDMTX.process(), PythonObject6D.PythonObject6D.process(), PythonOpenCV.PythonOpenCV.process(), PythonParallel.PythonParallel.process(), PythonSandbox.PythonSandbox.process(), AprilTag.AprilTag.processGUI(), PyCoralClassify.PyCoralClassify.processGUI(), PyCoralDetect.PyCoralDetect.processGUI(), PyCoralSegment.PyCoralSegment.processGUI(), PyFaceMesh.PyFaceMesh.processGUI(), PyHandDetector.PyHandDetector.processGUI(), PyLicensePlate.PyLicensePlate.processGUI(), PyObjectron.PyObjectron.processGUI(), PyPoseDetector.PyPoseDetector.processGUI(), PySceneText.PySceneText.processGUI(), PySelfie.PySelfie.processGUI(), PythonOpenCV.PythonOpenCV.processGUI(), PythonSandbox.PythonSandbox.processGUI(), PythonTest.PythonTest.processGUI(), FirstPython.FirstPython.processNoUSB(), PythonObject6D.PythonObject6D.processNoUSB(), and PythonSandbox.PythonSandbox.processNoUSB().