|
21 | 21 | <div align='center'> |
22 | 22 | <img src='https://github.com/DefTruth/lite.ai.toolkit/assets/31974251/44dbf4ac-0f38-41b6-930b-55b032b3c2ee' height="90px" width="90px"> |
23 | 23 | <img src='https://github.com/DefTruth/lite.ai.toolkit/assets/31974251/5b28aed1-e207-4256-b3ea-3b52f9e68aed' height="90px" width="90px"> |
24 | | - <img src='https://github.com/DefTruth/lite.ai.toolkit/assets/31974251/e3743596-1efb-48c6-95d5-b5a62f34eff3' height="90px" width="90px"> |
25 | 24 | <img src='https://github.com/DefTruth/lite.ai.toolkit/assets/31974251/28274741-8745-4665-abff-3a384b75f7fa' height="90px" width="90px"> |
26 | | - <img src='https://github.com/DefTruth/lite.ai.toolkit/assets/31974251/64fea806-f13b-4dc9-98fc-cd01319b75f4' height="90px" width="90px"> |
27 | | - <img src='https://github.com/DefTruth/lite.ai.toolkit/assets/31974251/c802858c-6899-4246-8839-5721c43faffe' height="90px" width="90px"> |
28 | | - <img src='https://github.com/DefTruth/lite.ai.toolkit/assets/31974251/20a18d56-297c-4c72-8153-76d4380fc9ec' height="90px" width="90px"> |
29 | 25 | <img src='https://github.com/DefTruth/lite.ai.toolkit/assets/31974251/f4dd5263-8514-4bb0-a0dd-dbe532481aff' height="90px" width="90px"> |
30 | | - <br> |
31 | 26 | <img src='https://github.com/DefTruth/lite.ai.toolkit/assets/31974251/c1411bb7-5537-4d6e-81f7-c902c2256a72' height="90px" width="90px"> |
32 | | - <img src='https://github.com/DefTruth/lite.ai.toolkit/assets/31974251/6344f307-15e3-4593-9866-50f5ee777f43' height="90px" width="90px"> |
33 | | - <img src='https://github.com/DefTruth/lite.ai.toolkit/assets/31974251/42bb2991-333a-4524-b874-6ab6156b3425' height="90px" width="90px"> |
34 | 27 | <img src='https://github.com/DefTruth/lite.ai.toolkit/assets/31974251/f8d65d8c-2a3d-4634-9169-3bc36452d997' height="90px" width="90px"> |
35 | | - <img src='https://github.com/DefTruth/lite.ai.toolkit/assets/31974251/7f6983f2-7319-4c26-a71b-dcdf89a4e483' height="90px" width="90px"> |
36 | | - <img src='https://github.com/DefTruth/lite.ai.toolkit/assets/31974251/3d8ec05e-f850-40e5-b4a9-2914c4ac5b9e' height="90px" width="90px"> |
37 | 28 | <img src='https://github.com/DefTruth/lite.ai.toolkit/assets/31974251/5684e1d9-b3b1-45af-ac38-d9201490d46e' height="90px" width="90px"> |
38 | 29 | <img src='https://github.com/DefTruth/lite.ai.toolkit/assets/31974251/b6a431d2-225b-416b-8a1e-cf9617d79a63' height="90px" width="90px"> |
39 | 30 | </div> |
@@ -88,6 +79,19 @@ add_executable(lite_yolov5 test_lite_yolov5.cpp) |
88 | 79 | target_link_libraries(lite_yolov5 ${lite.ai.toolkit_LIBS}) |
89 | 80 | ``` |
90 | 81 |
|
| 82 | +## Mixed with MNN or ORT |
| 83 | +The goal of lite.ai.toolkit is not to abstract on top of MNN and ORT. So, you can use lite.ai.toolkit mixed with MNN(-DENABLE_MNN=ON) or ORT. The lite.ai.toolkit installation package contains complete MNN and ORT. The workflow may looks like: |
| 84 | +```C++ |
| 85 | +#include "lite/lite.h" |
| 86 | +// 0. use yolov5 from lite.ai.toolkit to detect objs. |
| 87 | +auto *yolov5 = new lite::cv::detection::YoloV5(onnx_path); |
| 88 | +// 1. use naive OnnxRuntime or MNN to implement classfier. |
| 89 | +interpreter = std::shared_ptr<MNN::Interpreter>(MNN::Interpreter::createFromFile(mnn_path)); |
| 90 | +// or: ort_session = new Ort::Session(ort_env, onnx_path, session_options); |
| 91 | +classfier = interpreter->createSession(schedule_config); |
| 92 | +// 2. classify the detected objs use your own classfier ... |
| 93 | +``` |
| 94 | +The included headers of MNN and ORT can be found at [mnn_config.h](./lite/mnn/core/mnn_config.h) and [ort_config.h](./lite/ort/core/ort_config.h). |
91 | 95 | <details> |
92 | 96 | <summary> 🔑️ Check the output log!Click here! </summary> |
93 | 97 | |
|
0 commit comments