TadasBaltrusaitis / OpenFace

OpenFace – a state-of-the art tool intended for facial landmark detection, head pose estimation, facial action unit recognition, and eye-gaze estimation.
Other
6.72k stars 1.82k forks source link

inconsistent outputs in regards to number of frames #956

Open farshidrayhancv opened 3 years ago

farshidrayhancv commented 3 years ago

Describe the bug I have video file that is 20 min long with 24fps. If I use openCV to extract all the frames, it sums up to 10867. Then I used openface FeatureExtraction on the same video and the number of rows in the features csv file (the one with pose, gaze and etc) was 9857. I have tried this 3 times and I get the same outcome.

To Reproduce N/A

Expected behavior I was expecting that the number of rows in the CSV will match with the number of frames of the image.

Screenshots N/A

Desktop (please complete the following information): No compilation error

Additional context In the dataset I am working on, the class values correspond to the index number of the images. Therefore if the number of output from openFace doesn't match with the actual number of frames then I cannot maintain corresponding class labels

TadasBaltrusaitis commented 3 years ago

Any way you could share the video?

One way to circumvent this issue is by converting the video into a collection of images using a tool such as ffmpeg, and then running OpenFace on the images as a sequence, this should force it to use all of them as input and the rows in output should correspond to the frames.

My suspicion is that OpenCV may have skipped some frames.