[PYTHON] Facial expression detection using Yolov5

Contents of this time

This time, I would like to write about the facial expression detection program using Yolov5. Please note that it is not possible to post the progress image of the learning data due to the dataset rules.

Model content

Build a model to detect two facial expressions, positive or negative. The model used was: [1]

Based on this data set, we created a positive or negative data set visually. image.png


part1(epoch50) results.png part2(epoch1000) results.png

The result looks like this.


This time, I trained only with images of women, so I tested with 4 images for men and women. part1(epoch50) 1.jpg 2.jpg 4.jpg 5.jpg part2(epoch1000) 1.jpg 2.jpg 4.jpg 5.jpg


This time, there were various biases in the learning model, so the accuracy was not very good, but it seems that facial expression analysis using yolo can be done as an experience, so I would like to make my own model and try again.

Data set used

[1] The Japanese Female Facial Expression (JAFFE) Dataset

Michael J. Lyons, Miyuki Kamachi, Jiro Gyoba.
Coding Facial Expressions with Gabor Wavelets (IVC Special Issue)
arXiv:2009.05938 (2020) https://arxiv.org/pdf/2009.05938.pdf

Recommended Posts

Facial expression detection using Yolov5
Facial expression recognition using Pepper's API
[Ubuntu] [Python] Facial organ detection using dlib
Object detection using Jetson Nano (YOLOv3)-(1) Jetson Nano settings-
Kaggle Facial Keypoints Detection
I tried using Microsoft's Cognitive Services facial expression recognition API
Feature detection using opencv (corner detection)
Logo detection using TensorFlow Object Detection API
[Python] Using OpenCV with Python (Edge Detection)
Outlier detection using One Class SVM
Face detection using a cascade classifier