return np.atleast_2d(np.squeeze(features))
def index_faces(self, paths, paths_to_pk, output_dir, video_pk):
self.load()
entries = []
output_dir = os.path.expanduser(output_dir)
if not os.path.isdir(output_dir):
os.makedirs(output_dir)
After Change
return np.atleast_2d(np.squeeze(features))
def index_faces(self, paths, paths_to_pk, output_dir, video_pk):
if self.graph_def is None or self.session is None:
self.load()
entries = []
output_dir = os.path.expanduser(output_dir)
if not os.path.isdir(output_dir):
os.makedirs(output_dir)