if self._arguments.large:
self._frames.save_image(self._faces_dir, output, face.aligned.face)
else:
output = os.path.join(self._faces_dir, output)f_hash = self._extracted_faces.save_face_with_hash(output,
extension,
face.aligned.face)
if self._is_legacy: // Generate the new thumbnail and store new face data for save
face.thumbnail = generate_thumbnail(face.aligned.face, size=96, quality=60)
self._alignments.data[filename]["faces"][idx] = face.to_alignment()
self._alignments.data[filename]["faces"][idx]["hash"] = f_hash
After Change
face.thumbnail = generate_thumbnail(face.aligned.face, size=96, quality=60)
self._alignments.data[filename]["faces"][idx] = face.to_alignment()
face_count += 1
self._saver.close()
return face_count
def _select_valid_faces(self, frame, image):
Return the aligned faces from a frame that meet the selection criteria,