diff --git a/lite/tutorials/source_en/images/side_infer_process.png b/lite/tutorials/source_en/images/side_infer_process.png deleted file mode 100644 index eb63d0858cbfb92acab10bc62a0ca1ce6a09e512..0000000000000000000000000000000000000000 Binary files a/lite/tutorials/source_en/images/side_infer_process.png and /dev/null differ diff --git a/lite/tutorials/source_en/quick_start/Quick Start.md b/lite/tutorials/source_en/quick_start/quick_start.md similarity index 96% rename from lite/tutorials/source_en/quick_start/Quick Start.md rename to lite/tutorials/source_en/quick_start/quick_start.md index 2ea2af87df3cf92c5278c635a2ca838eb8a1050e..970385a74446206461d1bf793b7c6c9111965e1f 100644 --- a/lite/tutorials/source_en/quick_start/Quick Start.md +++ b/lite/tutorials/source_en/quick_start/quick_start.md @@ -36,7 +36,7 @@ In addition, you can use the preset model to perform migration learning to imple ## Converting a Model -After you retrain a model provided by MindSpore, export the model in the [.mindir format](https://www.mindspore.cn/tutorial/en/master/use/saving_and_loading_model_parameters.html#mindir). Use the MindSpore Lite [model conversion tool](https://gitee.com/mindspore/docs/blob/master/lite/tutorials/source_en/use/converter_tool.md) to convert the .mindir model to a .ms model. +After you retrain a model provided by MindSpore, export the model in the [.mindir format](https://www.mindspore.cn/tutorial/en/master/use/saving_and_loading_model_parameters.html#mindir). Use the MindSpore Lite [model conversion tool](https://www.mindspore.cn/lite/tutorial/zh-CN/master/use/converter_tool.html) to convert the .mindir model to a .ms model. Take the MindSpore MobileNetV2 model as an example. Execute the following script to convert a model into a MindSpore Lite model for on-device inference. ```bash @@ -86,7 +86,7 @@ The following section describes how to build and execute an on-device image clas ## Detailed Description of the Sample Program -This image classification sample program on the Android device includes a Java layer and a JNI layer. At the Java layer, the Android Camera 2 API is used to enable a camera to obtain image frames and process images. At the JNI layer, the model inference process is completed in [Runtime](https://gitee.com/mindspore/docs/blob/master/lite/tutorials/source_en/use/runtime.md). +This image classification sample program on the Android device includes a Java layer and a JNI layer. At the Java layer, the Android Camera 2 API is used to enable a camera to obtain image frames and process images. At the JNI layer, the model inference process is completed in [Runtime](https://www.mindspore.cn/lite/tutorial/zh-CN/master/use/runtime.html). > This following describes the JNI layer implementation of the sample program. At the Java layer, the Android Camera 2 API is used to enable a device camera and process image frames. Readers are expected to have the basic Android development knowledge. @@ -132,7 +132,7 @@ app ### Configuring MindSpore Lite Dependencies -When MindSpore C++ APIs are called at the Android JNI layer, related library files are required. You can use MindSpore Lite [source code compilation](https://gitee.com/mindspore/docs/blob/master/lite/tutorials/source_en/compile.md) to generate the `libmindspore-lite.so` library file. +When MindSpore C++ APIs are called at the Android JNI layer, related library files are required. You can use MindSpore Lite [source code compilation](https://www.mindspore.cn/lite/docs/zh-CN/master/compile.html) to generate the `libmindspore-lite.so` library file. In Android Studio, place the compiled `libmindspore-lite.so` library file (which can contain multiple compatible architectures) in the `app/libs/ARM64-V8a` (Arm64) or `app/libs/armeabi-v7a` (Arm32) directory of the application project. In the `build.gradle` file of the application, configure the compilation support of CMake, `arm64-v8a`, and `armeabi-v7a`.   @@ -178,7 +178,7 @@ target_link_libraries( -In this example, the download.gradle File configuration auto download ` libmindspot-lite.so `and OpenCV_ Java4.so library file, placed in the 'app / libs / arm64-v8a' directory. +In this example, the download.gradle File configuration auto download ` libmindspot-lite.so `and `libopencv_ Java4.so` library file, placed in the 'app / libs / arm64-v8a' directory. Note: if the automatic download fails, please manually download the relevant library files and put them in the corresponding location. diff --git a/lite/tutorials/source_zh_cn/quick_start/quick_start.md b/lite/tutorials/source_zh_cn/quick_start/quick_start.md index 3f96cbec95225c16661313d89ea385644f020b3b..ae3a881b243158477d7b7c8fa6b226ce1c3dfa7e 100644 --- a/lite/tutorials/source_zh_cn/quick_start/quick_start.md +++ b/lite/tutorials/source_zh_cn/quick_start/quick_start.md @@ -28,7 +28,7 @@ 2. 将模型转æ¢æˆMindSpore Liteæ¨¡åž‹æ ¼å¼ã€‚ 3. 在端侧使用MindSpore Lite推ç†æ¨¡åž‹ã€‚详细说明如何在端侧利用MindSpore Lite C++ API(Android JNI)和MindSpore Lite图åƒåˆ†ç±»æ¨¡åž‹å®Œæˆç«¯ä¾§æŽ¨ç†ï¼Œå®žçŽ°å¯¹è®¾å¤‡æ‘„åƒå¤´æ•èŽ·çš„内容进行分类,并在APP图åƒé¢„览界é¢ä¸ï¼Œæ˜¾ç¤ºå‡ºæœ€å¯èƒ½çš„分类结果。 -> ä½ å¯ä»¥åœ¨è¿™é‡Œæ‰¾åˆ°[Android图åƒåˆ†ç±»æ¨¡åž‹](https://download.mindspore.cn/model_zoo/official/lite/mobilenetv2_openimage_lite)å’Œ[示例代ç ](https://gitee.com/mindspore/mindspore/blob/master/model_zoo/official/lite/ image_classification)。 +> ä½ å¯ä»¥åœ¨è¿™é‡Œæ‰¾åˆ°[Android图åƒåˆ†ç±»æ¨¡åž‹](https://download.mindspore.cn/model_zoo/official/lite/mobilenetv2_openimage_lite)å’Œ[示例代ç ](https://gitee.com/mindspore/mindspore/blob/master/model_zoo/official/lite/image_classification)。 ## 选择模型 @@ -38,7 +38,7 @@ MindSpore Model Zooä¸å›¾åƒåˆ†ç±»æ¨¡åž‹å¯[在æ¤ä¸‹è½½]((https://download.mind ## 转æ¢æ¨¡åž‹ -如果预置模型已ç»æ»¡è¶³ä½ è¦æ±‚ï¼Œè¯·è·³è¿‡æœ¬ç« èŠ‚ã€‚ å¦‚æžœä½ éœ€è¦å¯¹MindSporeæ供的模型进行é‡è®ï¼Œé‡è®å®ŒæˆåŽï¼Œéœ€è¦å°†æ¨¡åž‹å¯¼å‡ºä¸º[.mindiræ ¼å¼](https://www.mindspore.cn/tutorial/zh-CN/master/use/saving_and_loading_model_parameters.html#mindir)。然åŽä½¿ç”¨MindSpore Lite[模型转æ¢å·¥å…·](https://gitee.com/mindspore/docs/blob/master/lite/tutorials/source_zh_cn/use/converter_tool.md)å°†.mindir模型转æ¢æˆ.msæ ¼å¼ã€‚ +如果预置模型已ç»æ»¡è¶³ä½ è¦æ±‚ï¼Œè¯·è·³è¿‡æœ¬ç« èŠ‚ã€‚ å¦‚æžœä½ éœ€è¦å¯¹MindSporeæ供的模型进行é‡è®ï¼Œé‡è®å®ŒæˆåŽï¼Œéœ€è¦å°†æ¨¡åž‹å¯¼å‡ºä¸º[.mindiræ ¼å¼](https://www.mindspore.cn/tutorial/zh-CN/master/use/saving_and_loading_model_parameters.html#mindir)。然åŽä½¿ç”¨MindSpore Lite[模型转æ¢å·¥å…·](https://www.mindspore.cn/lite/tutorial/zh-CN/master/use/converter_tool.html)å°†.mindir模型转æ¢æˆ.msæ ¼å¼ã€‚ 以MindSpore MobilenetV2模型为例,如下脚本将其转æ¢ä¸ºMindSpore Lite模型用于端侧推ç†ã€‚ ```bash @@ -90,7 +90,7 @@ MindSpore Model Zooä¸å›¾åƒåˆ†ç±»æ¨¡åž‹å¯[在æ¤ä¸‹è½½]((https://download.mind ## 示例程åºè¯¦ç»†è¯´æ˜Ž -本端侧图åƒåˆ†ç±»Android示例程åºåˆ†ä¸ºJAVA层和JNI层,其ä¸ï¼ŒJAVA层主è¦é€šè¿‡Android Camera 2 API实现摄åƒå¤´èŽ·å–图åƒå¸§ï¼Œä»¥åŠç›¸åº”的图åƒå¤„ç†ç‰åŠŸèƒ½ï¼›JNI层在[Runtime](https://gitee.com/mindspore/docs/blob/master/lite/tutorials/source_zh_cn/use/runtime.md)ä¸å®Œæˆæ¨¡åž‹æŽ¨ç†çš„过程。 +本端侧图åƒåˆ†ç±»Android示例程åºåˆ†ä¸ºJAVA层和JNI层,其ä¸ï¼ŒJAVA层主è¦é€šè¿‡Android Camera 2 API实现摄åƒå¤´èŽ·å–图åƒå¸§ï¼Œä»¥åŠç›¸åº”的图åƒå¤„ç†ç‰åŠŸèƒ½ï¼›JNI层在[Runtime](https://www.mindspore.cn/lite/tutorial/zh-CN/master/use/runtime.html)ä¸å®Œæˆæ¨¡åž‹æŽ¨ç†çš„过程。 > æ¤å¤„详细说明示例程åºçš„JNI层实现,JAVA层è¿ç”¨Android Camera 2 API实现开å¯è®¾å¤‡æ‘„åƒå¤´ä»¥åŠå›¾åƒå¸§å¤„ç†ç‰åŠŸèƒ½ï¼Œéœ€è¯»è€…具备一定的Androidå¼€å‘基础知识。 @@ -134,19 +134,19 @@ app ### é…ç½®MindSpore Liteä¾èµ–项 -Android JNI层调用MindSpore C++ API时,需è¦ç›¸å…³åº“文件支æŒã€‚å¯é€šè¿‡MindSpore Lite[æºç 编译]https://gitee.com/mindspore/docs/blob/master/lite/tutorials/source_zh_cn/compile.md)生æˆ`libmindspore-lite.so`库文件。 +Android JNI层调用MindSpore C++ API时,需è¦ç›¸å…³åº“文件支æŒã€‚å¯é€šè¿‡MindSpore Lite[æºç 编译](https://www.mindspore.cn/lite/docs/zh-CN/master/compile.html)生æˆ`libmindspore-lite.so`库文件。 -本示例ä¸ï¼Œbulid过程由download.gradle文件é…置自动下载`libmindspore-lite.so`以åŠOpenCVçš„libopencv_java4.so库文件,并放置在`app/libs/arm64-v8a`目录下。 +本示例ä¸ï¼Œbulid过程由download.gradle文件é…置自动下载`libmindspore-lite.so`以åŠOpenCVçš„`libopencv_java4.so`库文件,并放置在`app/libs/arm64-v8a`目录下。 注: 若自动下载失败,请手动下载相关库文件并将其放在对应ä½ç½®ï¼š -libmindspore-lite.so [下载链接]((https://download.mindspore.cn/model_zoo/official/lite/lib/mindspore%20version%200.7/libmindspore-lite.so)) +libmindspore-lite.so [下载链接](https://download.mindspore.cn/model_zoo/official/lite/lib/mindspore%20version%200.7/libmindspore-lite.so) -libmindspore-lite include文件 [下载链接]((https://download.mindspore.cn/model_zoo/official/lite/lib/mindspore%20version%200.7/include.zip)) +libmindspore-lite include文件 [下载链接](https://download.mindspore.cn/model_zoo/official/lite/lib/mindspore%20version%200.7/include.zip) -libopencv_java4.so [下载链接]((https://download.mindspore.cn/model_zoo/official/lite/lib/opencv%204.4.0/libopencv_java4.so)) +libopencv_java4.so [下载链接](https://download.mindspore.cn/model_zoo/official/lite/lib/opencv%204.4.0/libopencv_java4.so) -libopencv include文件 [下载链接]((https://download.mindspore.cn/model_zoo/official/lite/lib/opencv%204.4.0/include.zip)) +libopencv include文件 [下载链接](https://download.mindspore.cn/model_zoo/official/lite/lib/opencv%204.4.0/include.zip) @@ -192,9 +192,9 @@ target_link_libraries( ### 下载åŠéƒ¨ç½²æ¨¡åž‹æ–‡ä»¶ -从MindSpore Model Hubä¸ä¸‹è½½æ¨¡åž‹æ–‡ä»¶ï¼Œæœ¬ç¤ºä¾‹ç¨‹åºä¸ä½¿ç”¨çš„终端图åƒåˆ†ç±»æ¨¡åž‹æ–‡ä»¶ä¸º`mobilenet_v2.ms`,åŒæ ·é€šè¿‡download.gradle脚本在APP构建时自动下载,并放置在`app/src/main/assets`工程目录下。 +从MindSpore Model Hubä¸ä¸‹è½½æ¨¡åž‹æ–‡ä»¶ï¼Œæœ¬ç¤ºä¾‹ç¨‹åºä¸ä½¿ç”¨çš„终端图åƒåˆ†ç±»æ¨¡åž‹æ–‡ä»¶ä¸º`mobilenet_v2.ms`,åŒæ ·é€šè¿‡`download.gradle`脚本在APP构建时自动下载,并放置在`app/src/main/assets`工程目录下。 -注:若下载失败请手工下载模型文件,mobilenetv2.ms [下载链接]((https://download.mindspore.cn/model_zoo/official/lite/mobilenetv2_openimage_lite/mobilenetv2.ms)) +注:若下载失败请手工下载模型文件,mobilenetv2.ms [下载链接](https://download.mindspore.cn/model_zoo/official/lite/mobilenetv2_openimage_lite/mobilenetv2.ms) ### 编写端侧推ç†ä»£ç