Skip to content

Instantly share code, notes, and snippets.

@MCarlomagno
Created September 19, 2020 03:52
Show Gist options
  • Save MCarlomagno/c193181a8c2671325b16af22f40592d8 to your computer and use it in GitHub Desktop.
Save MCarlomagno/c193181a8c2671325b16af22f40592d8 to your computer and use it in GitHub Desktop.
setCurrentPrediction(CameraImage cameraImage, Face face) {
/// crops the face from the image and transforms it to an array of data
List input = _preProcess(cameraImage, face);
/// then reshapes input and ouput to model format 🧑‍🔧
input = input.reshape([1, 112, 112, 3]);
List output = List(1 * 192).reshape([1, 192]);
/// runs the interpreter and produces the output 🤖
this._interpreter.run(input, output);
output = output.reshape([192]);
this._predictedData = List.from(output);
}
@Achref99
Copy link

the List output is it empty ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment