xamarin / GooglePlayServicesComponents

Other
315 stars 148 forks source link

Detector classes completely missing from Firebase.ML.Vision binding #200

Closed KthProg closed 5 years ago

KthProg commented 5 years ago

Missing in 71.1500.0-preview2:

FirebaseVisionTextRecognizer and FirebaseVisionBarcodeDetector.

Needless to say MLKit is kind of useless without these. The properties/methods to get a text/barcode recognizer are also missing on the FirebaseVision.Instance object.

KthProg commented 5 years ago

The FirebaseVisionText class is also missing the Text property.

moljac commented 5 years ago

@KthProg In a lot of cases when we bind we have very little idea about whole SDK, so any feedback helps.

Of course if the classes are missing that the SDK is useless. I will look into that ASAP.

Thanks for feedback, just keep on providing it.

KthProg commented 5 years ago

Thanks for the quick response :). Here's the documentation: https://firebase.google.com/docs/ml-kit/.

The most important thing is the detector/recognizer classes, the FirebaseVision.Instance methods/properties, and any results that those return. VisionImage appears to be fully implemented.

moljac commented 5 years ago

I'm working on preview3, so "you re welcome for quick response" 8)

Seems like those are supposed to be in firebase-ml-vision... I need to decompile to see why those were not surfaced.

moljac commented 5 years ago

com.google.firebase:firebase-ml-vision:19.0.3

This will be the problem. Version. Bumping is quite a problem right now because of dependencies.

KthProg commented 5 years ago

I don't totally understand. Does that mean it can't be fixed right now or does that mean it will be awhile?

moljac commented 5 years ago

In these moments I'm trying to bump the version. It CAN happen that some other artifact will expect other version than Vision (or other dependent artifacts) - then it may take a while.

Is this better explanation?

KthProg commented 5 years ago

Yes that makes sense, thank you :)

moljac commented 5 years ago

FYI - firebase-ml-vision artifacts with versions >= 18.0.0 do depend on AndroidX and this will have to wait a bit. I hope those missing classes are in lower versions. Confirmation would help me a lot. Thanks

KthProg commented 5 years ago

I just looked at the jar for firebase-ml-vision 17.0.0 and it appears to have the exact same classes and methods on first glance :)

moljac commented 5 years ago

Good news. I managed to update/bump it to 17.0.0 (it was 16.x.x).

Now I need to rebuild and see what is missing and why

KthProg commented 5 years ago

How goes?

moljac commented 5 years ago

Hanging loose! 8)

Read: Done with bindings. Now onto CI issues, before publishing preview3

moljac commented 5 years ago

preview3 tagged and published on git

https://github.com/xamarin/GooglePlayServicesComponents/releases/tag/71-preview3

If this is all green:

https://dev.azure.com/xamarin/public/_build/results?buildId=1344

nugets should be out soon.

KthProg commented 5 years ago

@moljac Sweet, thanks

KthProg commented 5 years ago

@moljac I don't see a preview3 NuGet even though all the build stuff passed.

moljac commented 5 years ago

I did everything I was supposed, but never got an email to manually publish the nugets.

It was supposed some kind of magic to happen...

And the problem is - sometimes I have problems understanding the magic.

61315 commented 5 years ago

@KthProg Make sure you hit the Clear All Nuget Cache(s) in the [Option->Nuget Package Manager->General] then try following command on Package Manager Console.

Install-Package Xamarin.Firebase.ML.Vision -Version 71.1700.0-preview3

moljac commented 5 years ago

@61315 We published it an hour ago. I did not have rights on CI side to approve nuget publishing (and did not get email for approval).

Now everything should be out.

KthProg commented 5 years ago

FirebaseVision.Instance is still missing the GetVisionBarcodeDetector methods. And the FirebaseVisionBarcodeDetector class is missing as well.

KthProg commented 5 years ago

This isn't as important, but the FirebaseVisionTextRecognizer.ProcessImage method returns Android.Gms.Task when it should probably return an awaitable System.Threading.Task.

moljac commented 5 years ago

@KthProg @61315 Missing classes surfaced! Some obfuscated internal interfaces and classes in other dependency artifacts caused those to be left under the surface.

Coming in preview4.

Now my ML algorithm tells me someone might ask: "When will preview4 be released?" and it gives me suggested answer: "No idea. We (I) have issues in other artifacts and am trying to fix em!"

Regarding:

FirebaseVisionTextRecognizer.ProcessImage method returns Android.Gms.Task when it should probably return an awaitable System.Threading.Task

Right now we'll have very few resources for API prettifying, so I'm (for now) sorry.

Suggestion: Open issue with this suggestion.

Closing this one. Reopen it or open a new issue with new missing classes, please

KthProg commented 5 years ago

@moljac Cool thank you very much. I'll give it a try when I back from my vacation and see how it works. The Android task stuff is easy enough to wrap in a TaskCompletionSource so I'll make another issue but it's certainly not a priority. Thanks again!

KthProg commented 5 years ago

I still can't use FirebaseVisionBarcodeDetector or the GetVisionBarcodeDetector method.

jessejiang0214 commented 5 years ago

I met the same problem, it missing FirebaseVisionBarcodeDetector in 71.1700.0-preview4

moljac commented 5 years ago

@KthProg @jessejiang0214

Just reopen the issue with the info what is missing

KthProg commented 5 years ago

I don't have the ability to re-open issues on this repository. The missing classes are working in preview5 though.