如何跑SDK中的demo code "solution_kdp2_hico_mipi"?

我们购买了development Kit (KL720_DMB_BGA386_SCHEMATIC_VOP2)。之后想学习一下怎么把它跑起来,下载了SDK,查看到有solution_kdp2_hico_mipi这个例子,但是目录中只有SCPU的代码,不知道NCPU也是下面说1-3步中是怎么做的,为了跑这个demo有相对应的NCPU例子吗?


Below is a recommended flow of AI application construction:

  1. Prepare your AI model(s)
  2. Convert and verify model(s) via Kneron Toolchain
  3. With a PC, it is convenient to verify converted NEF models and easy to test variant data on target device via Kneron PLUS
  4. note: If your application is designed as host-companion architecture with USB interface, you can stop here and go ahead with Kneron PLUS.
  5. Replace implementation of data Input and result output flow according to application requirement if your application is not designed as host-companion architecture. That's to replace the related code for data-in/data-out over USB interface which is designed for Kneron PLUS control protocol library by your implementation.

For example, to consider an application which requires a connected MIPI sensor to chip as image source and output result through UART interface.

After step 1-3, implementation of model inference flow and verification is done. Refer to the diagram below. The inference flow behind kmdw_inference_image_dispatcher_thread is verified and ready. All you have to do is to modify the firmware, solution_kdp2_user_ex, which is used with Kneron PLUS for model verification by replacing the threads for data/input and result/output to become a customized firmware. The implementation is easy by calling kmdw_fifiq_manager_XXX() APIs to arrange data flow for inference tasks.

 


Comments

  • 您好,

    要跑solution_kdp2_hico_mipi,會需要準備相對應的KL720板子(KL720_DMB_BGA386_SCHEMATIC_VOP2)與Hico MIPI camera。

    如果沒有Hico MIPI camera,可以先跑Kneron PLUS的基本範例。Kneron PLUS有提供範例模型可以直接使用。

    您可以在Kneron的網站下載Kneron PLUS,然後用現有的firmware (SCPU跟NCPU)來跑範例。

    下載網址: 开发中心 | Kneron - 人工智能无处不在

    燒錄firmware方法(KL720): Getting Started - Document Center (kneron.com)

    Firmware path:


  • Maria Chen,非常感谢你的回复,我们已可以在PC跑你们的dongle 的demo了,这个应就是你说的Kneron PLUS吧,对吗?Kneron PLUS是通过PC的USB作为数据输入

  • 您好,

    是的,Kneron PLUS是通過PC的USB做輸入的。

    如果後續有任何問題,請再跟我們說,謝謝!

  • Maria Chen, 我们购买了KL720板子(KL720_DMB_BGA386_SCHEMATIC_VOP2)。 还要再买一个Hico MIPI camera才可以跑上面的demo是吧。如果我们买好了Camera后怎么跑demo code呢,SDK中只有SCPU的代码,没NCPU的

  • 您好,

    是的,會需要Hico MIPI camera。Firmware的SCPU需要自行去build,而NCPU照理上可以直接使用Kneron PLUS裡面的NCPU。

    我們有Kneron PLUS Enterprise (含有Hico MIPI的demo code) 開放給特定的客戶,如果有需要開放權限可以向我們的業務窗口詢問與申請。

    Enterprise的範例demo: Run Examples for Enterprise - Document Center (kneron.com)

  • Hi Maria,我下载了 KL720_SDK_2.1.0 。 里面有个MIPI的demo, 这个SDK的demo跟Kneron PLUS Enterprise (含有Hico MIPI的demo code) 里面的demo是不同的?

  • 您好,

    KL720 SDK的solution_kdp2_hico_mipi與Kneron PLUS Enterprise的HICO Camera Inference demo是相對應的。

    要跑HICO Camera Inference,會需要build在KL720 SDK裡面的solution_kdp2_hico_mipi,生成firmware燒進KL720板子,才可以讓Kneron PLUS Enterprise裡面的HICO Camera Inference demo成功執行。

  • Maria, 我理解到的KL720有两个内核SCPU和NCUP,KL720 SDK裡面的solution_kdp2_hico_mipi是SCPU的代码。如果说KL720 SDK的solution_kdp2_hico_mipi與Kneron PLUS Enterprise的HICO Camera Inference demo是相對應的。可以理解为Kneron PLUS Enterprise的HICO Camera Inference demo是跑在NCPU吗?我们下周有一个会议和你们沟通,到时他们可能谈商务上如何申请访问权限。

  • 您好,

    是的,KL720的firmware有SCPU和NCPU。KL720 SDK的solution_kdp2_hico_mipi裡面SCPU和NCPU都有包含。Kneron PLUS的res/firmware裡面已有的fw_scpu.bin和fw_ncpu.bin都是在KL720 SDK裡面build好的。

    Kneron PLUS是一個我們可以用Kneron的產品跑inference的介面,要跑這些inference demo會需要有Kneron的產品(dongle, board, etc.)、firmware (scpu和ncpu)、model才可以跑。

    這個網址有詳細解釋Kneron PLUS與firmware: Introduction - Document Center (kneron.com)


  • 可是我看到下载的SDK的MIPI示例NCPU里面是空的

  • 您好,

    KL720 SDK裡面有包含SCPU與NCPU,但是NCPU的project位置並不是直接放在solution_kdp2_hico_mipi裡面。

  • Maria Chen, 你说在别的地方,是要我早请到权限之后才能看到NCPU的例子吗?如果不是在MIPI同一个目录下

  • 您好,

    除非有用自己的模型的需求,一般來說NCPU不需要做改動。您要跑HICO Camera Inference Demo的話,可以直接使用在PLUS裡面已有的fw_ncpu.bin,不需要額外去build NCPU。

    如果要編輯或build NCPU,會需要跟我們的業務窗口申請開放權限,也需要有DSP (Xtensa Xplorer)的授權。

  • hi Maria, 那如果我直接用PLUS裡面已有的fw_ncpu.bin,我们要把识别的物体的数据发给另个MCU(比如用IIC去发给另一个MCU),是不是在SCPU里拿到识别的数据加上IIC通讯就可以发过去了?

  • 您好,

    是的,要把識別的物體的數據(inference的結果)發給另一個MCU,會需要自行加上IIC通訊,還有模型需要用我們NCPU支援的模型,理論上就可以發過去了。

The discussion has been closed due to inactivity. To continue with the topic, please feel free to post a new discussion.