This post was last edited by Beifang on 2022-6-21 16:57
Transplantation of artificial intelligence framework and implementation
1 There are many ways to port the AI framework and implementation. The following three are provided. Among them, the CMSIS-NN provided by ARM does not have a suitable library, and it is not so easy to test on other chips, so it is skipped for this series.
GitHub - TexasInstruments/tvm: Open deep learning compiler stack for cpu, gpu and specialized accelerators
3.14. TI Deep Learning (TIDL) — Processor SDK Linux Documentation
TensorFlow Lite | TensorFlow Chinese official website (google.cn)
2 You can change the startup logo according to the instructions, that is, edit a custom 80x80 bmp file and directly replace the logo.bmp in the boot directory.
3 First test the video capture, using the USB camera and HDMI for display.
3.1 Has switched to HDMI display mode. If not, execute the following command:
- setenv optargs omapdrm.displays=1,0
- saveenv
- reset
3.2 Then you need to close the default startup graphics program
- /etc/init.d/matrix-gui-2.0 stop //Close the Matrix interface
- /etc/init.d/weston stop //Shut down the Weston window system
3.3 Testing GStreamer commands
- gst-launch-1.0 videotestsrc ! 'video/x-raw, width=1920, height=1080' ! kmssink
Display normal
3.4 Reading the Camera
- gst-launch-1.0 v4l2src device=/dev/video1 io-mode=4 ! 'video/x-raw,format=(string)YUY2,width=640,height=480' ! kmssink
After reading, write h264 file as follows
- gst-launch-1.0 v4l2src device=/dev/video1 io-mode=4 ! 'video/x-raw,format=(string)YUY2,width=640,height=480' ! vpe num-input-buffers=8 ! 'video/x-raw, format=NV12, width=640, height=480' ! queue ! ducatih264enc level=51 ! filesink location=test.h264
The background cpu resource test is as follows
4 After testing, GSstream has been integrated into the system and can work normally.
5. All the AI engines mentioned in the first point were not loaded successfully. The model using Google tensorfowlite was successful in embedded operation, and it also provided a wheel installation using python3.5, but pip was not configured in this system, so it still needed to be installed online. Relatively speaking, this model can only use the CPU and cannot fully utilize the various acceleration modules of TLX570x, so there is no need to continue in-depth testing. Although it took a lot of time and failed, it was worth excluding these options.
The TIDL model is already built into prosessorSDK version 8.0. If you can upgrade it successfully, it is the best way to use it. Later, use the latest version of ubuntu20 to try the new development environment upgrade.