setCurrentPrediction method
void
setCurrentPrediction(
- CameraImage cameraImage,
- Face? face
Implementation
void setCurrentPrediction(CameraImage cameraImage, Face? face) {
if (_interpreter == null) throw Exception('Interpreter is null');
if (face == null) throw Exception('Face is null');
List input = _preProcess(cameraImage, face);
input = input.reshape([1, 112, 112, 3]);
// List output = List.generate(1, (index) => List.filled(192, 0));
List output = List.filled(1 * 192, null, growable: true).reshape([1, 192]);
// print("userss ${output}");
_interpreter?.run(input, output);
output = output.reshape([192]);
_predictedData = List.from(output);
}