getFaceEmbeddingFromFilepath method

Future<Float32List> getFaceEmbeddingFromFilepath(
  1. Face face,
  2. String path
)

Generates a face embedding from an image file at path.

Convenience wrapper that reads the file and calls getFaceEmbedding. Not available on Flutter Web (uses dart:io).

Implementation

Future<Float32List> getFaceEmbeddingFromFilepath(
  Face face,
  String path,
) async {
  final bytes = await File(path).readAsBytes();
  return getFaceEmbedding(face, bytes);
}