MCarlomagno / FaceRecognitionAuth

😀🤳 Simple face recognition authentication (Sign up + Sign in) written in Flutter using Tensorflow Lite and Firebase ML vision library.
BSD 3-Clause "New" or "Revised" License
385 stars 193 forks source link

the generated and saved modelData and the predicted data is always null. #24

Open waqadArshad opened 3 years ago

waqadArshad commented 3 years ago

Here are some of the print statements that I have used in the database.dart file:

jsonFile.writeAsStringSync(json.encode(_db)) is:{"Waqad:123456":null} userAndPass is: Waqad:123456 I/flutter (22884): _db[userAndPass] is: null I/flutter (22884): modelData is: null

this._db in loadDB() is: {Waqad:123456: null} _db is: {Waqad:123456: null}

in loadModel() is: I/SurfaceView(22884): updateWindow -- setFrame, this = io.flutter.embedding.android.FlutterSurfaceView{cec499 V.E...... ......I. 0,0-720,1192} I/flutter (22884): Failed to load model.

and What I do not understand is that why "NoSuchMethodError: The method 'run' was called on null." is thrown when pre-process input and output is not empty: [again some of the prints I used]

eglCreateImageKHR:539: [Crop] 0 0 0 0 img[960 540] D/MALI (22884): eglCreateImageKHR:539: [Crop] 0 0 0 0 img[960 540] I/flutter (22884): convertedBytes.buffer.asFloat32List() is: [-0.734375, -0.7109375, -0.765625, -0.734375, -0.7265625, -0.78125, -0.7109375, -0.734375, -0.78125, -0.8046875, -0.84375, -0.875, -0.8671875, -0.8984375, -0.9296875, -0.9296875, -0.9296875, -0.9375, -0.9375, -0.9609375, -0.9453125, -0.9375, -0.96875, -0.96875, -0.9765625, -0.9765625, -0.96875, -0.96875, -0.96875, -0.9609375, -0.9609375, -0.984375, -0.953125, -0.953125, -0.9765625, -0.9453125, -0.953125, -0.9765625, -0.9453125, -0.96875, -0.9765625, -0.9453125, -0.96875, -0.9765625, -0.9453125, -0.9609375, -0.984375, -0.953125, -0.96875, -0.9765625, -0.9453125, -0.953125, -0.9765625, -0.9765625, -0.9765625, -0.984375, -0.953125, -0.96875, -0.9765625, -0.9453125, -0.9609375, -0.96875, -0.9375, -0.9453125, -0.96875, -0.9375, -0.9453125, -0.9765625, -0.9765625, -0.953125, -0.9765625, -0.9609375, -0.953125, -0.9765625, -0.9609375, -0.9453125, -0.96875, -0.953125, -0.9453125, -0.96875, -0.953125, -0.9609375, -0.96875, -0.9375, -0.9453125, -0.96875, -0.9375, -0.96875, -0.9 I/flutter (22884): imageAsList = [-0.734375, -0.7109375, -0.765625, -0.734375, -0.7265625, -0.78125, -0.7109375, -0.734375, -0.78125, -0.8046875, -0.84375, -0.875, -0.8671875, -0.8984375, -0.9296875, -0.9296875, -0.9296875, -0.9375, -0.9375, -0.9609375, -0.9453125, -0.9375, -0.96875, -0.96875, -0.9765625, -0.9765625, -0.96875, -0.96875, -0.96875, -0.9609375, -0.9609375, -0.984375, -0.953125, -0.953125, -0.9765625, -0.9453125, -0.953125, -0.9765625, -0.9453125, -0.96875, -0.9765625, -0.9453125, -0.96875, -0.9765625, -0.9453125, -0.9609375, -0.984375, -0.953125, -0.96875, -0.9765625, -0.9453125, -0.953125, -0.9765625, -0.9765625, -0.9765625, -0.984375, -0.953125, -0.96875, -0.9765625, -0.9453125, -0.9609375, -0.96875, -0.9375, -0.9453125, -0.96875, -0.9375, -0.9453125, -0.9765625, -0.9765625, -0.953125, -0.9765625, -0.9609375, -0.953125, -0.9765625, -0.9609375, -0.9453125, -0.96875, -0.953125, -0.9453125, -0.96875, -0.953125, -0.9609375, -0.96875, -0.9375, -0.9453125, -0.96875, -0.9375, -0.96875, -0.9765625, -0.9453125, -0.95312 D/MALI (22884): eglCreateImageKHR:539: [Crop] 0 0 0 0 img[960 540] I/flutter (22884): pre-process input is: [-0.734375, -0.7109375, -0.765625, -0.734375, -0.7265625, -0.78125, -0.7109375, -0.734375, -0.78125, -0.8046875, -0.84375, -0.875, -0.8671875, -0.8984375, -0.9296875, -0.9296875, -0.9296875, -0.9375, -0.9375, -0.9609375, -0.9453125, -0.9375, -0.96875, -0.96875, -0.9765625, -0.9765625, -0.96875, -0.96875, -0.96875, -0.9609375, -0.9609375, -0.984375, -0.953125, -0.953125, -0.9765625, -0.9453125, -0.953125, -0.9765625, -0.9453125, -0.96875, -0.9765625, -0.9453125, -0.96875, -0.9765625, -0.9453125, -0.9609375, -0.984375, -0.953125, -0.96875, -0.9765625, -0.9453125, -0.953125, -0.9765625, -0.9765625, -0.9765625, -0.984375, -0.953125, -0.96875, -0.9765625, -0.9453125, -0.9609375, -0.96875, -0.9375, -0.9453125, -0.96875, -0.9375, -0.9453125, -0.9765625, -0.9765625, -0.953125, -0.9765625, -0.9609375, -0.953125, -0.9765625, -0.9609375, -0.9453125, -0.96875, -0.953125, -0.9453125, -0.96875, -0.953125, -0.9609375, -0.96875, -0.9375, -0.9453125, -0.96875, -0.9375, -0.96875, -0.9765625, -0.9453125, I/flutter (22884): pre-process reshaped input is: [[[[-0.734375, -0.7109375, -0.765625], [-0.734375, -0.7265625, -0.78125], [-0.7109375, -0.734375, -0.78125], [-0.8046875, -0.84375, -0.875], [-0.8671875, -0.8984375, -0.9296875], [-0.9296875, -0.9296875, -0.9375], [-0.9375, -0.9609375, -0.9453125], [-0.9375, -0.96875, -0.96875], [-0.9765625, -0.9765625, -0.96875], [-0.96875, -0.96875, -0.9609375], [-0.9609375, -0.984375, -0.953125], [-0.953125, -0.9765625, -0.9453125], [-0.953125, -0.9765625, -0.9453125], [-0.96875, -0.9765625, -0.9453125], [-0.96875, -0.9765625, -0.9453125], [-0.9609375, -0.984375, -0.953125], [-0.96875, -0.9765625, -0.9453125], [-0.953125, -0.9765625, -0.9765625], [-0.9765625, -0.984375, -0.953125], [-0.96875, -0.9765625, -0.9453125], [-0.9609375, -0.96875, -0.9375], [-0.9453125, -0.96875, -0.9375], [-0.9453125, -0.9765625, -0.9765625], [-0.953125, -0.9765625, -0.9609375], [-0.953125, -0.9765625, -0.9609375], [-0.9453125, -0.96875, -0.953125], [-0.9453125, -0.96875, -0.953125], [-0.9609375, -0.96875, -0.9375] I/flutter (22884): pre-process output is: [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] I/flutter (22884): NoSuchMethodError: The method 'run' was called on null. I/flutter (22884): Receiver: null I/flutter (22884): Tried calling: run(Instance(length:1) of '_GrowableList', Instance(length:1) of '_GrowableList') I/CameraFramework(22884): handleMessage: 2 I/CameraFramework(22884): handleMessage: 128 I/CameraFramework(22884): handleMessage: 256 I/RequestThread-1(22884): Received jpeg. I/RequestThread-1(22884): Producing jpeg buffer... D/Surface (22884): Surface::setBuffersUserDimensions(this=0x7f5aa6f600,w=496,h=496)

Thanks.