Appendix

Host Mode Example

This sample code is an application which KL520 chip plays as a host chip with connected display and cameras for Object detection. You will need to program the flash image to device first. The flash image includes SCPU/NCPU firmware and model. Then, you can Start/Stop object detection by simple command via UART.

Hardware Requirements

Kneron KL520 series AI SoC Development Kit

Firmware Preparation

Commands

  1. Type "1" in UART console window to Start Tiny Yolo
    When a person is detected, yellow box is drawn around the person.
    Other detected objects are drawn around by blue boxes.
    Console window shows detected objects with FPS info.

  2. Type "2" to Stop Object detection

  3. Type "3" to turn off Pipeline mode, or toggle the mode, at runtime.
    This pipeline mode can be toggled on/off (1/0) to demonstrate performance improvement.
    Note that there may be delay to see first good inference due to opening camera/sensor.


Host Mode with USB Example

Besides Host Model example, this example shows how to output inference result via USB interface. You will need to program the flash image to device first. The flash image includes SCPU/NCPU firmware and model. Then, you can output inference result via USB interface

in scpu/project/tiny_yolo_v3/host_usbout/main/kapp_tiny_yolo_inf.c, usb_com_write()is called to send data out

Hardware Requirements

Kneron KL520 series AI SoC Development Kit

Firmware Preparation

Software Preparation

[OS]

win 10 64bits/mingw64

[build host side receiver]

cd host_usb_receiver
mkdir build
cd build
cmake .. -G"MSYS Makefiles"
make -j
cd bin

#./usbhost.exe will be created

[using a prebuilt binary]

cd host_usb_receiver/bin
cp ../dll/* .
-> then, you can use "usbhost.exe"

Run example

  1. run FW: example_projects/tiny_yolo_v3_host_usbout
  2. select 1 to Start Tiny Yolo. Now, no bunding box is shown in KL520 display
  3. in a PC terminal console
    cd host_usb_receiver/build/bin
    ./usbhost.exe
  4. in PC terminal console, you can BBOX result is shown
  5. also, bounding box result is drawn in KL520 display