def compute_features(fe,frames,phashes,phash_thresh=1):
  """Get vector embedding using FeatureExtractor
    :param fe: FeatureExtractor class
    :param frames: list of frame images as numpy.ndarray
    :param phash_thresh: perceptual hash threshold
    :returns: list of feature vectors
  """
  vals = []
  phash_pre = phashes[0]
  for i,im in enumerate(frames):
    if i == 0 or (phashes[i] - phashes[i-1]) > phash_thresh:
      vals.append(fe.extract(im))
    else:
      vals.append(vals[i-1])
  return vals