This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import struct | |
def read_hog(filename, batch_size=5000): | |
""" | |
Read HoG features file created by OpenFace. | |
For each frame, OpenFace extracts 12 * 12 * 31 HoG features, i.e., num_features = 4464. These features are stored in row-major order. | |
:param filename: path to .hog file created by OpenFace | |
:param batch_size: how many rows to read at a time |