RE: NPU Demo and source code

Hello Richard, you can download the toolkit directly from this link: https://www.khadas.com/so/tr/b38d2b03-e85e-4fa6-aaef-f41eec6cf234?cid=a25b4d59-cbb6-4c11-b18f-b505a06cd63b#/main

Hi
Have already downloaded the toolkit and ran the demo.
I need to modify to run video input from rtsp stream.
How can I modify and more importantly how to rebuild?
Thanks
Rgds
Richard

You’ll have to ask Frank to help you with that. It may help to rephrase your questions clearly, because his first language is Chinese.

@RichardG Hello . We have written how to use it on the document. You can refer to the document.

If you can’t understand anywhere, you can @me

Hi
I have aleady downloaded those documents and ran them.
But I am unable to modify darknet.
On intel system, we modified src/image.c and “make”.
But the demos and sources we downloaded for VIM3 does not have a makefile
to make,
Also dont have image.c.
We need to modify your darknet demo to accept RTSP stream.
These links are not relevent.
Please advise.
Thank you

你好
我已经有铅地下载了那些文件并运行了它们。
但是我无法修改Darknet。
在英特尔系统上,我们修改了src / image.c和“ make”。
但是我们为VIM3下载的演示和资源没有makefile
做,
也没有image.c。
我们需要修改您的darknet演示以接受RTSP流。
这些链接不是关系。
请指教。
谢谢

@RichardG What is the specific step that you cannot modify ? Our Darknet is based on the direct clone on the GitHub of Darknet.It’s not about Inter or anything

Hi
I have previously downloaded and run darknet but at that time it could not use the NPU.
If it now can the NPU, please how to use the NPU, how to install CUDA etc

Now I have downloaded from https://gitlab.com/khadas/aml_npu_app the NPU demo and source code.
I dont know how to modify and rebuild the source code.

This is the directory listing, which file to modify and how to build?

你好
我之前已经下载并运行darknet,但当时它无法使用NPU。
如果现在可以使用NPU,请如何使用NPU,如何安装CUDA等

现在,我已经从https://gitlab.com/khadas/aml_npu_app下载了NPU演示和源代码。
我不知道如何修改和重建源代码。

这是目录列表,该文件要修改以及如何构建?

名称 最近提交 最新更新
[DDK_6.3.2](https://gitlab.com/khadas/aml_npu_app/tree/master/DDK_6.3.2) [npu_app:改回NN_SLT目录](https://gitlab.com/khadas/aml_npu_app/ commit / b2adde01c5ba83c121c85ba817d4969d93ee88d7) 9个月前
[DDK_6.3.2.3](https://gitlab.com/khadas/aml_npu_app/tree/master/DDK_6.3.2.3) [npu_app:DDK 6.3.3.4 [1/2]]更新检测库https://gitlab.com/khadas/aml_npu_app/commit/438f05d04d9952238122f569126012d864bc706a) 5个月前
[DDK_6.3.2.5](https://gitlab.com/khadas/aml_npu_app/tree/master/DDK_6.3.2.5) [为MIPI相机添加yoloface_demo_mipi演示](https://gitlab.com/khadas / aml_npu_app / commit / 5370aefbf3477ba0b3f0095f42a5c71f63fcd26e) 1个月前
[DDK_6.3.3.4 / detect_library / model_code](https://gitlab.com/khadas/aml_npu_app/tree/master/DDK_6.3.3.4/detect_library/model_code) [添加khadas yolo_v3源代码](https: //gitlab.com/khadas/aml_npu_app/commit/bd1219a0a85a69eecea49ee88cb0e17a0934191a) 1周前
[NN_SLT / DnCnn-test](https://gitlab.com/khadas/aml_npu_app/tree/master/NN_SLT/DnCnn-test) [npu_app:发行6.3.3.4 [1/1]]的slt(https: //gitlab.com/khadas/aml_npu_app/commit/17f0e491c988361ed8b82fcf4e012077a6f77db7) 5个月前
[detect_library](https://gitlab.com/khadas/aml_npu_app/tree/master/detect_library) [detect_library / yoloface_demo_mipi:更新帮助信息](https://gitlab.com/khadas/aml_npu_app/commit/b71d73d909371821828ee68c295 1个月前
[.gitignore](https://gitlab.com/khadas/aml_npu_app/blob/master/.gitignore) [添加.gitignore](https://gitlab.com/khadas/aml_npu_app/commit/c36548ad53d7167c74d7c733521bb4a260d7bbfd) 2几个月前
[许可](https://gitlab.com/khadas/aml_npu_app/blob/master/LICENSE) [添加许可](https://gitlab.com/khadas/aml_npu_app/commit/fb0c2376f13c964ebbb58de198726897e2a2ef61) 1个月前

@RichardG 我感觉你没有搞明白这些工具之间的关系。

  1. 训练过程是在PC上进行的。因此关于CUDA的安装,只要到nvdia的开发者网站下载,按步骤运行就行了。
  2. 你如果想运行使用NPU的demo,可以下载我们gitlab上的这个仓库:

这是在VIM3上可运行的文件。

  1. 如果你想训练自己的模型并且转换成可使用NPU的,那么你需要在这里申请SDK。里面有转换的工具。

我已经下载了Darknet并为yolov3训练了新模型

我可以在Nvidia GPU上运行新的yolov3模型
https://youtu.be/akkCxEU1L2c实时ANPR NIght

我已经从https://gitlab.com/khadas/aml_npu_app下载了您的NPU演示和资源

您的演示只能在图片,mipi或uvc摄像机上运行。我想修改您的NPU演示以在rtsp相机上运行。如何修改您的NPU演示?

@RichardG demo的源码在https://gitlab.com/khadas/aml_npu_app。你可以修改detect_library/yoloface_demo_gst_uvc、main.cpp文件里面关于摄像头的那个线程。

谢谢。
修改main.cpp之后,我们如何 "make " 或 “build”?

@RichardG 执行./build,会有提示,安装提示来就可以了

谢谢
“ ./build”脚本在哪里?

Thanks
Where is the “./build” script?

Khadas:root:/deeplearning/aml_npu_app-master/detect_library/yoloface_demo_gst_uvc >sh ./build_vx.sh
usage: ./build_vx.sh "[linux sdk dir] [fenix dir] "

find /deeplearning/aml_npu_app-master/ -name “build” -print
/deeplearning/aml_npu_app-master/DDK_6.3.3.4/detect_library/model_code/detect_yolo_v2_khadas/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.3.4/detect_library/model_code/detect_yolo_v3_khadas/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.3.4/detect_library/model_code/detect_yolo_v2/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.3.4/detect_library/model_code/detect_yolo_v3/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.3.4/detect_library/model_code/detect_yoloface/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.3.4/detect_library/model_code/facenet/build_vx.sh
/deeplearning/aml_npu_app-master/detect_library/yoloface_demo_mipi/build_vx.sh
/deeplearning/aml_npu_app-master/detect_library/sample_demo/build_vx.sh
/deeplearning/aml_npu_app-master/detect_library/source_code/build_vx.sh
/deeplearning/aml_npu_app-master/detect_library/yoloface_demo_gst_uvc/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.2.3/opencv3/mtcnn_binary/NonMaxSuppression/.settings/org.eclipse.cdt.managedbuilder.core.prefs
/deeplearning/aml_npu_app-master/DDK_6.3.2.3/opencv3/mtcnn_binary/rgbScale/.settings/org.eclipse.cdt.managedbuilder.core.prefs
/deeplearning/aml_npu_app-master/DDK_6.3.2.3/opencv3/yoloface/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.2.3/opencv3/yoloface_vsi/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.2.3/opencv2/yolo_face/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.2.3/opencv2/yolo_face_vsi/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.2.3/inceptionv1/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.2/opencv3/mtcnn_binary/NonMaxSuppression/.settings/org.eclipse.cdt.managedbuilder.core.prefs
/deeplearning/aml_npu_app-master/DDK_6.3.2/opencv3/mtcnn_binary/rgbScale/.settings/org.eclipse.cdt.managedbuilder.core.prefs
/deeplearning/aml_npu_app-master/DDK_6.3.2/opencv3/yoloface/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.2/opencv2/yolo_face/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.2/inceptionv1/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.2.5/opencv3/mtcnn_binary/NonMaxSuppression/.settings/org.eclipse.cdt.managedbuilder.core.prefs
/deeplearning/aml_npu_app-master/DDK_6.3.2.5/opencv3/mtcnn_binary/rgbScale/.settings/org.eclipse.cdt.managedbuilder.core.prefs
/deeplearning/aml_npu_app-master/DDK_6.3.2.5/opencv3/yoloface_vsi_vdata/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.2.5/opencv3/yoloface_vsi/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.2.5/detect_library/model_code/detect_yolo_v2/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.2.5/detect_library/model_code/detect_yolo_v3/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.2.5/detect_library/model_code/detect_yoloface/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.2.5/detect_library/model_code/facenet/log_build.log
/deeplearning/aml_npu_app-master/DDK_6.3.2.5/detect_library/model_code/facenet/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.2.5/detect_library/source_code/build_vx.sh
/deeplearning/aml_npu_app-master/DDK_6.3.2.5/inceptionv1/build_vx.sh
/deeplearning/aml_npu_app-master/NN_SLT/DnCnn-test/build_vx.sh

@RichardG detect_library/yoloface_demo_gst_uvc 目录里面的build_vx.sh

Hi Frank,

我尝试了build_vx.sh
它回答询问“ linux sdk dir”和“ fenix dir”
这些目录在哪里?

@RichardG fenix仓库在我们github上下载,linux sdk 需要通过邮箱申请https://www.khadas.com/npu-toolkit-vim3

谢谢
可以修改和编译。

但它挂在这里

Khadas:root:/deeplearning/aml_npu_app-master/DDK_6.3.3.4/detect_library/model_code/detect_yolo_v3 >detect_demo “rtsp://root:opt12345@192.168.1.93/live.sdp” 2
init_fb…
1920x1080, 32bpp
W Detect_api:[det_set_log_level:19]Set log level=1
W Detect_api:[det_set_log_level:21]output_format not support Imperfect, default to DET_LOG_TERMINAL
W Detect_api:[det_set_log_level:26]Not exist VSI_NN_LOG_LEVEL, Setenv set_vsi_log_error_level
det_set_log_config Debug
det_set_model success!!

model.width:416
model.height:416
model.channel:3

open video successfully!
video_width: 1920, video_height: 1080
prepare 1080p image ok
[ HANG }

@RichardG 什么意思,我没看明白,你是说你的程序运行卡主了是么?还是编译的时候卡主了