I have a pre-trained model that predicts facial emotion correctly 50% of the time for the new mp4 videos.
The model was trained on a dataset that is not fully representative, hence the difference. On the datasets that the model was trained, a similar test dataset gives an accuracy of over 66%.
I have to work with this model only. So looking to get average predictions of the faces over a for example n frames rather than using prediction from just a single frame.
For a single frame, I could show the emotion easily on the video (detect all faces in a frame, for each detected face, get model predictions and display emotions on faces in a bounding box using cv2 and haarcascade)
If I have to show the video with emotion labels, where the emotion is the average emotion (predicted by my model of the same detected face over a number of frames), how can I do this in python?
question from:
https://stackoverflow.com/questions/66047516/what-is-the-best-way-to-embed-emotion-in-video 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…