Hi, not sure if this is the right place to report the issue, but I've been facing a weird issue with Firebase MLKit's Custom model hosting feature.
Firebase Hosting allows us to upload the tensorflow model on Firebase instead of packaging it with the apk and Firebase downloads the model onto the user's device when the app is launched.
This sounds great, but the underlying issue here is that there's no callback in the Firebase Android SDK that lets the developer know when the download for hosted model is started and when it has been completed.
I was not able to find any callback in the package reference either : https://firebase.google.com/docs/reference/android/com/google/firebase/ml/custom/model/package-summary
As a result, till the model has been downloaded, the app is still usable by the user and that results in an exception as the model isn't yet available.
It would be nice if there were 3 callbacks for the following scenarios :
This will ensure that the developer is aware of this action and can update the UI accordingly by blocking operations that rely on the model.
P.S. It's might also be a good idea to allow the developers to version their models, in case I have a newer model packaged with the app but the model hosted on Firebase was outdated
cc @isaisachen what do you think of this feature request?
@the-dagger I am going to file this internally and close it here. Will update if I hear anything.
Sounds good, thanks!
On Thursday, August 9, 2018, Sam Stern notifications@github.com wrote:
Closed #586 https://github.com/firebase/quickstart-android/issues/586.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/firebase/quickstart-android/issues/586#event-1780720166,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGQtlsWgMH16TWH3OslLPcB7zpV0A24xks5uPGwVgaJpZM4VyvPN
.
--
Best,
Harshit Dwivedi
@samtstern curious if this one had any updates from the team?
@the-dagger nothing to share yet, sorry!
Hi, I won't bother you for an ETA, but would like to also state that my project is in desperate need of this! In fact I can't seem to use Cloud models at all, hopefully this will fix it. Looking forward to an update.
No ETA but I can confirm we're making consistent progress on this feature!
@samtstern Good to hear, turns out my project is working with cloud models, but it just took ages for them to download for me, so it looked like it was just failing. At the moment my only solution is to keep trying until an exception isn't thrown, then it knows it's downloaded and ready. Obviously not a great solution, but it'll do for now.
I'm having this problem, when I update my model, the firebase page appears as published but the device is not immediately available, it can take between 5 to 10 minutes to download and only after this the application works with the new changes . there is no way to know if you are downloading the model or not. It would be very useful to implement these methods.
Hi @samtstern any updates on this thread.
Hey all. Sorry for my lack of responses here but I believe this has been solved by the new FirebaseModelManager API. You can see an example of using that here (and in many other places throughout this repo):
https://github.com/firebase/quickstart-android/blob/master/mlkit/app/src/main/java/com/google/firebase/samples/apps/mlkit/java/custommodel/CustomImageClassifier.java#L137
@samtstern is there any way for a custom model to be used with Object Detection? How do I swop out the default model that it currently uses for a custom model?
@samtstern There are other issues about this feature but concerning ML-Kit base models that points to this issue. https://github.com/firebase/quickstart-android/issues/784 and https://github.com/firebase/firebase-android-sdk/issues/47 .
The FirebaseModelManager.getInstance().isModelDownloaded(remoteModel) method you give in exemple here requires us to have a remoteModel.
How can we have these for the barcode / label detection / face detection / ... models?
@GauthierChan I believe that the APIs you mentioned have offline models only (with the exception of image labeling where it has both on-device and cloud model available), so as soon as you create the detector, it should be available for you to use.
Hey @LintonAchmad, did you find a way to use your custom model for object detection? I'm currently having an issue in using my custom model. There's nowhere in the docs that mentioned about using a custom model for object detection. @samtstern please help too.
Thanks.
Most helpful comment
No ETA but I can confirm we're making consistent progress on this feature!