Progressive Teacher: Boosting Facial Expression Recognition by A Semi-Supervised Progressive Teacher
Note:
- Progressive Teacher is contributed by Jing Jiang.
- MobileFaceNet is used as the backbone and the model is able to classify seven basic facial expressions (angry, disgust, fearful, happy, neutral, sad, surprised).
- facial_expression_recognition_mobilefacenet_2022july.onnx is implemented thanks to Chengrui Wang.
facial_expression_recognition_mobilefacenet_2022july_int8bq.onnx
represents the block-quantized version in int8 precision and is generated using block_quantize.py withblock_size=64
.
Results of accuracy evaluation on RAF-DB.
Models | Accuracy |
---|---|
Progressive Teacher | 88.27% |
NOTE: This demo uses ../face_detection_yunet as face detector, which supports 5-landmark detection for now (2021sep).
Run the following command to try the demo:
# recognize the facial expression on images
python demo.py --input /path/to/image -v
Install latest OpenCV and CMake >= 3.24.0 to get started with:
# A typical and default installation path of OpenCV is /usr/local
cmake -B build -D OPENCV_INSTALLATION_PATH=/path/to/opencv/installation .
cmake --build build
# detect on camera input
./build/opencv_zoo_face_expression_recognition
# detect on an image
./build/opencv_zoo_face_expression_recognition -i=/path/to/image
# get help messages
./build/opencv_zoo_face_expression_recognition -h
Note: Zoom in to to see the recognized facial expression in the top-left corner of each face boxes.
All files in this directory are licensed under Apache 2.0 License.