amitshekhariitbhu / Android-TensorFlow-Lite-Example

Android TensorFlow Lite Machine Learning Example
https://outcomeschool.com
Apache License 2.0
752 stars 228 forks source link

Image Scanner activity not close on finish() and onBackPressed() not working #5

Open sodiqOladeni opened 6 years ago

sodiqOladeni commented 6 years ago

Hi @amitshekhariitbhu this work has been great so far, But when i tried to call the Image Scanner activity from another activity and get the result it is not working(activity not close) also onBackPressed() working and finally how can we train the model to recognize more object.

Below is my code:

Intent sendCapturedCode = new Intent(); sendCapturedCode.putExtra(getString(R.string.captured_image_tflow_result), imageAnalysesResult); sendCapturedCode.putExtra(getString(R.string.captured_image_bitmap), capturedBitmap); setResult(RESULT_OK, sendCapturedCode); finish();

amitshekhariitbhu commented 6 years ago

There may be some issue in the Image Scanner. In order to train the model to recognize more object. You will have to train with more images. Refer this to train.