Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 1f09c82

Browse files
#699 Add ML Kit support (doc++)
1 parent b78c8aa commit 1f09c82

File tree

1 file changed

+23
-18
lines changed

1 file changed

+23
-18
lines changed

docs/ML_KIT.md

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/features/mlkit.png" height="84px" alt="ML Kit"/>
1+
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/issue699-mlkit-support/docs/images/features/mlkit.png" height="84px" alt="ML Kit"/>
22

3-
Make sure to check out [this demo app](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/tree/master/demo-ng) because it has almost all ML Kit features this plugin currently supports! Steps:
3+
Make sure to check out [this demo app](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/tree/issue699-mlkit-support/demo-ng) because it has almost all ML Kit features this plugin currently supports! Steps:
44

55
```bash
66
git clone https://github.com/EddyVerbruggen/nativescript-plugin-firebase
@@ -18,8 +18,8 @@ then clean your platforms folder (`rm -rf platforms`) and build your app again.
1818
## ML Kit Features
1919
There are two ways of using ML Kit:
2020

21-
- *On-device*. These features have been enhanced to not only interpret still images, but you can also run ML against a live camera feed. Why? Because it's fr***ing cool!
22-
- *Cloud*. The cloud has much larger and always up to date models, so results will be more accurate. Since this is a remote service reconition speed depends heavily on the size of the images you send to the cloud.
21+
- **On-device**. These features have been enhanced to not only interpret still images, but you can also run ML against a live camera feed. Why? Because it's fr***ing cool!
22+
- **Cloud**. The cloud has much larger and always up to date models, so results will be more accurate. Since this is a remote service reconition speed depends heavily on the size of the images you send to the cloud.
2323

2424
### On-device configuration
2525
Optionally (but recommended) for Android, you can have the device automatically download the relevant ML model(s) to the device
@@ -66,8 +66,9 @@ To nbe able to use Cloud features you need to do two things:
6666
*) _Currently detecting faces from still images doesn't work on iOS (from the camera stream works fine tho)._
6767

6868
### Text recognition
69-
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/features/mlkit_text_recognition.png" height="153px" alt="ML Kit - Text recognition"/>
70-
[Firebase documentation](https://firebase.google.com/docs/ml-kit/recognize-text)
69+
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/issue699-mlkit-support/docs/images/features/mlkit_text_recognition.png" height="153px" alt="ML Kit - Text recognition"/>
70+
71+
[Firebase documentation 🌎](https://firebase.google.com/docs/ml-kit/recognize-text)
7172

7273
#### Still image (on-device)
7374

@@ -107,7 +108,7 @@ Plugin-specific are the optional property `processEveryNthFrame` and optional ev
107108
You can `processEveryNthFrame` set to a lower value than the default (5) to put less strain on the device.
108109
Especially 'Face detection' seems a bit more CPU intensive, but for 'Text recognition' the default is fine.
109110

110-
> Look at [the demo app](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/tree/master/demo-ng) to see how to wire up that `onTextRecognitionResult` function.
111+
> Look at [the demo app](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/tree/issue699-mlkit-support/demo-ng) to see how to wire up that `onTextRecognitionResult` function.
111112
112113
##### Angular / Vue
113114
Register a custom element like so in the component/module:
@@ -133,11 +134,11 @@ Now you're able to use the registered element in the view:
133134
Declare a namespace at the top of the embedding page, and use it anywhere on the page:
134135

135136
```xml
136-
<Page xmlns:MLKitTextRecognition="nativescript-plugin-firebase/mlkit/textrecognition">
137+
<Page xmlns:FirebaseMLKitTextRecognition="nativescript-plugin-firebase/mlkit/textrecognition">
137138

138139
<OtherTags/>
139140

140-
<MLKitTextRecognition:MLKitTextRecognition
141+
<FirebaseMLKitTextRecognition:MLKitTextRecognition
141142
class="my-class"
142143
width="260"
143144
height="380"
@@ -150,8 +151,9 @@ Declare a namespace at the top of the embedding page, and use it anywhere on the
150151
> Note that with NativeScript 4 the `Page` tag may actually be a `TabView`, but adding the namespace declaration to the TabView works just as well.
151152
152153
### Face detection
153-
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/features/mlkit_face_detection.png" height="153px" alt="ML Kit - Face detection"/>
154-
[Firebase documentation](https://firebase.google.com/docs/ml-kit/detect-faces)
154+
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/issue699-mlkit-support/docs/images/features/mlkit_face_detection.png" height="153px" alt="ML Kit - Face detection"/>
155+
156+
[Firebase documentation 🌎](https://firebase.google.com/docs/ml-kit/detect-faces)
155157

156158
#### Still image (on-device)
157159

@@ -183,8 +185,9 @@ registerElement("MLKitFaceDetection", () => require("nativescript-plugin-firebas
183185
```
184186

185187
### Barcode scanning
186-
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/features/mlkit_text_barcode_scanning.png" height="153px" alt="ML Kit - Barcode scanning"/>
187-
[Firebase documentation](https://firebase.google.com/docs/ml-kit/read-barcodes)
188+
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/issue699-mlkit-support/docs/images/features/mlkit_text_barcode_scanning.png" height="153px" alt="ML Kit - Barcode scanning"/>
189+
190+
[Firebase documentation 🌎](https://firebase.google.com/docs/ml-kit/read-barcodes)
188191

189192
#### Still image (on-device)
190193

@@ -218,8 +221,9 @@ registerElement("MLKitBarcodeScanner", () => require("nativescript-plugin-fireba
218221
```
219222

220223
### Image labeling
221-
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/features/mlkit_text_image_labeling.png" height="153px" alt="ML Kit - Image labeling"/>
222-
[Firebase documentation](https://firebase.google.com/docs/ml-kit/label-images)
224+
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/issue699-mlkit-support/docs/images/features/mlkit_text_image_labeling.png" height="153px" alt="ML Kit - Image labeling"/>
225+
226+
[Firebase documentation 🌎](https://firebase.google.com/docs/ml-kit/label-images)
223227

224228
#### Still image (on-device)
225229

@@ -268,8 +272,9 @@ registerElement("MLKitImageLabeling", () => require("nativescript-plugin-firebas
268272
```
269273

270274
### Landmark recognition
271-
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/features/mlkit_text_landmark_recognition.png" height="153px" alt="ML Kit - Landmark recognition"/>
272-
[Firebase documentation](https://firebase.google.com/docs/ml-kit/recognize-landmarks)
275+
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/issue699-mlkit-support/docs/images/features/mlkit_text_landmark_recognition.png" height="153px" alt="ML Kit - Landmark recognition"/>
276+
277+
[Firebase documentation 🌎](https://firebase.google.com/docs/ml-kit/recognize-landmarks)
273278

274279
#### Still image (cloud)
275280

@@ -287,6 +292,6 @@ firebase.mlkit.landmarkrecognition.recognizeLandmarksCloud({
287292
```
288293

289294
### Custom model inference
290-
[Firebase documentation](https://firebase.google.com/docs/ml-kit/use-custom-models)
295+
[Firebase documentation 🌎](https://firebase.google.com/docs/ml-kit/use-custom-models)
291296

292297
Coming soon (probably with plugin version 6.1.0).

0 commit comments

Comments
 (0)