|
1 |
| -## HUAWEI-HMS-MLKit-Sample |
| 1 | +# HUAWEI-HMS-MLKit-Sample |
2 | 2 |
|
3 | 3 |
|
4 | 4 | ## build status
|
|
11 | 11 | * [Installation](#installation)
|
12 | 12 | * [Configuration ](#configuration )
|
13 | 13 | * [Supported Environments](#supported-environments)
|
14 |
| - * [Sample Code](#Sample Code) |
| 14 | + * [Sample-Code](#Sample-Code) |
15 | 15 | * [License](#license)
|
16 | 16 |
|
17 | 17 |
|
18 | 18 | ## Introduction
|
19 |
| - The sample code mainly shows the use of Huawei Machine Learning SDK. |
| 19 | +The sample code mainly shows the use of Huawei Machine Learning SDK. |
20 | 20 |
|
21 |
| - Including face recognition, text recognition, image classification, landmark recognition, object detection and tracking, translation, language detection, image segmentation. Product visual search will coming soon. |
| 21 | +Including face recognition, text recognition, image classification, landmark recognition, object detection and tracking, translation, language detection, image segmentation. Product visual search will coming soon. |
22 | 22 |
|
23 |
| - It includes both camera capture video for real-time detection and still image recognition. |
| 23 | +It includes both camera capture video for real-time detection and still image recognition. |
24 | 24 |
|
25 |
| - If you want to use cloud analyzer, such as cloud text analyzer(document and cloud text), cloud image classification analyzer, landmark analyzer, translation, language detection, |
26 |
| - you need to apply for an agconnect-services.json file in the developer alliance(https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/ml-preparations4), |
27 |
| - replacing the sample-agconnect-services.json in the project. |
28 |
| - Attention: The package name in the sample code can not be used to apply for agconnect-services.json. |
29 |
| - You can use a custom package name to apply for agconnect-services.json. |
30 |
| - You only need to modify the applicationId in app HUAWEI-HMS-MLKit-Sample |
| 25 | +If you want to use cloud analyzer, such as cloud text analyzer(document and cloud text), cloud image classification analyzer, landmark analyzer, translation, language detection, |
| 26 | +you need to apply for an agconnect-services.json file in the developer alliance(https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/ml-preparations4), replacing the sample-agconnect-services.json in the project. |
| 27 | + |
| 28 | +Attention: The package name in this project can not be used to apply for agconnect-services.json. You can use a custom package name to apply for agconnect-services.json. |
| 29 | + |
| 30 | +You only need to modify the applicationId in app HUAWEI-HMS-MLKit-Sample |
31 | 31 | \app\build.gradle to the same package name as the applied agconnect-services.json to experience the mlkit on-Cloud services.
|
32 | 32 |
|
33 | 33 |
|
34 | 34 | ## Installation
|
35 |
| - Download the sample code and open in android Studio. |
| 35 | +You can find the app-release.apk in code->releases->app-release.apk, you can download the APK, copy it to your phone, install and experience it. if you have installed adb on your computer, open the cmd window and install the application on your phone through adb install app-release. apk. |
| 36 | + |
| 37 | +Download the HUAWEI-HMS-MLKit-Sample code and open in Android Studio, after ensuring that your device is connected to the network, obtain the apk through build. |
36 | 38 |
|
37 | 39 |
|
38 | 40 | ## Configuration
|
39 |
| - To use functions provided by packages in examples, You need to add the dependencies to the build.gradle file as follows: |
| 41 | +To use functions provided by packages in examples, You need to add the dependencies to the build.gradle file as follows: |
| 42 | + |
40 | 43 | implementation 'com.huawei.hms:ml-computer-vision-ocr-cn-model:1.0.2.300'
|
41 | 44 | implementation 'com.huawei.hms:ml-computer-vision-ocr-jk-model:1.0.2.300'
|
42 | 45 | implementation 'com.huawei.hms:ml-computer-vision-ocr-latin-model:1.0.2.300'
|
|
51 | 54 | implementation 'com.huawei.hms:ml-computer-language-detection:1.0.2.300'
|
52 | 55 |
|
53 | 56 | ## Supported Environments
|
54 |
| - android 4.4 or a later version is recommended. |
| 57 | +android 4.4 or a later version is recommended. |
55 | 58 |
|
56 | 59 |
|
57 | 60 | ## Sample Code
|
58 |
| - Sample code majors activitys as follows: |
| 61 | +Sample code majors activitys as follows: |
59 | 62 | 1. Choose TakePhotoActivity to see a demo of the following:
|
60 | 63 | - Camera background replacement
|
61 | 64 | - Picture view
|
|
140 | 143 | - LensEngine:camera that generates continuous image data for detection.
|
141 | 144 |
|
142 | 145 | ## License
|
143 |
| - HUAWEI-HMS-MLKit-Sample is licensed under the [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0). |
| 146 | +HUAWEI-HMS-MLKit-Sample is licensed under the [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0). |
0 commit comments