-
Notifications
You must be signed in to change notification settings - Fork 441
Add ML Kit support #699
Comments
Yasssss!!!! So excited by this! |
Is there some sort of beta on npm yet? I'd really like to use this in my app, or at least try it out. If there's no beta, can you reference some build instructions please, I wasnt able to find any 😝 |
@psrcek Thanks for asking! As you found out you can create a local package of this branch, but you're best off waiting a day or two because I'm currently hammering down on this feature like a madman. Expect it to be more stable very soon! |
So what you're saying is that you will make a release after a day or two with mlkit included? |
My comment was about trying this branch. I'll make a release once I'm happy with all parts of the release and there's no regression. That's not gonna happen in two days, but I hope to find enough time to release it next week. |
@EddyVerbruggen Hey dude, you are the man. Thanks for the great work! Following :) |
@EddyVerbruggen I've successfuly used the new features! Seems awesome, the only thing i'm bummed about is that i can't get the elements and their location in the text recognition like I can in pure java on android: By looking at the code it doesn't seem that hard to add and it is IMO a must have feature! |
Ha, @psrcek very cool that you've already tried it! Indeed, that feature is not exposed through the plugin yet but it can easily be added. I'll add it to the featurelist above. To anyone interested, I just published a beta release: @psrcek In your case you seem to know how to install the plugin from a cloned Git repo so don't bother installing the beta. |
@psrcek The ML Kit branch has been updated to give you more details when recognizing text locally on a device. If you're using a still image then it's good to know the function name has changed from |
… clear it's always Cloud based)
UPDATE:
|
Over-the-moon excited to try this, just in time for My Epic Next Demo 💃 #ThanksEddy |
@EddyVerbruggen I used the new text recognition and I have a suggestion: your interfaces should look like this IMO to reduce confusion, somewhat match the java implementation and make lines accessible (they aren't right now): export interface MLKitRecognizeTextResultBounds {
x: number;
y: number;
width: number;
height: number;
}
export interface MLKitRecognizeTextResultElement {
text: string;
bounds: MLKitRecognizeTextResultBounds;
}
export interface MLKitRecognizeTextResultLine {
text: string;
bounds: MLKitRecognizeTextResultBounds;
elements: MLKitRecognizeTextResultElement[];
}
export interface MLKitRecognizeTextResultBlock {
text: string;
bounds: MLKitRecognizeTextResultBounds;
lines: MLKitRecognizeTextResultLine[];
}
export interface MLKitRecognizeTextOnDeviceResult extends MLKitResult {
blocks: MLKitRecognizeTextResultBlock[];
} |
I made a pull request with changes to the android code, I didn't change the iOS code though as I don't have a mac so I haven't even tried making anything with iOS and I don't know how to code for iOS. 🤣 |
Hey @psrcek I'll check it out.. I was actually implementing your changes myself and have the iOS part ready so should be easy :) Thanks! UPDATE: yep, we aligned quite perfectly. The only change I'm making is the type of export interface MLKitRecognizeTextResultBounds {
x: number;
y: number;
width: number;
height: number;
} Becomes export interface MLKitRecognizeTextResultBounds {
origin: {
x: number;
y: number;
},
size: {
width: number;
height: number;
}
} |
6.0.1 has been RELEASED!
To configure and play with ML Kit, follow the instructions in the doc. In case of issues: please post them here, on GitHub. Not on Slack/Twitter/Email. Thanks! |
@EddyVerbruggen I made my friend lend me his mac and tried to compile my project on iOS, but I keep getting this message spammed in console whenever i try to use any live preview components:
The preview is displayed just fine, but does not detect anything. EDIT: I found this on StackOverflow, it seems like it's a bug. |
@psrcek Is that with the demo app mentioned at the top of the ML Kit readme in this repo (linked in my previous post)? If not, please try that first. The steps are in the readme. It's working fine on my iPhone X... Otherwise please share a repo reproducing this issue. For instance, do you have all these set to The reason I ask is because the message "An empty result returned from from GMVDetector for VisionTextDetector." is a symptom of the Btw please open a new issue as this one is closed and shipped ;) |
Yeah, oops i only had "ml_kit" set to true, you must have added those at some point in between me trying this 😛 |
That's a very good point, I did add those (I don't want to ship stuff with your app you don't actually need). 👍 |
I just want to leave a comment here that you all sirs are heroes to us! Thanks for making this plugin happen! 😄 |
Yesterday at Google I/O a new feature was announced for Firebase: ML Kit. Let's see how neatly we can integrate its features into this plugin.
Feature checklist
If you're curious about the implementation: I'm continuously pushing my changes to this branch.
The checkboxes indicate my progress (on both platforms). Some items may move to different issues/versions.
Generic
Text Recognition
Barcode Scanning
Face Detection 👩👧👦
Image Labeling 🏷 🏷
Landmark Recognition 🗼🗽
Custom Models (moved to 6.1.0, see #702)
Use a custom TensorFlow Lite model, on the deviceUse a custom TensorFlow Lite model, stored in Firebase (so users always have the latest model)The text was updated successfully, but these errors were encountered: