.. |br| raw:: html
.. _machine-learning-guide-index: Machine Learning Guide ====================== Introduction ------------ Our newest `QSXP-ML81 `_ CoM with the NXP i.MX8M Plus processor comes with a Machine-Learning-Unit (*MLU*) on-board. There are different Machine Learning demos you can run on the processor's NPU. Further information can be read at the `i.MX Machine Learning User's Guide `_ Demo Video ---------- .. youtube:: lsnqDzAqquU Precompiled Images ------------------ +--------------------------------+--------------------------------------------+---------------------------------------------------------+ | Module | Precompiled Image | Description | +================================+============================================+=========================================================+ | QSXP-ML81 | *qsxp-ml81-ml* in `Download Area`_ | Machine Learning Demo Image. | | | | | +--------------------------------+--------------------------------------------+---------------------------------------------------------+ | TX8P-ML81 | *tx8p-ml81-ml* in `Download Area`_ | Machine Learning Demo Image. | | | | | +--------------------------------+--------------------------------------------+---------------------------------------------------------+ | TX8P-ML82 | *tx8p-ml82-ml* in `Download Area`_ | Machine Learning Demo Image. | | | | | +--------------------------------+--------------------------------------------+---------------------------------------------------------+ | QSXP-ML81 | *qsxp-ml81-basler* in `Download Area`_ | Machine Learning Demo Image with Basler Camera support. | | | | | +--------------------------------+--------------------------------------------+---------------------------------------------------------+ Yocto Setup ----------- For creating the neccessary RootFS, a complete Yocto build environment is required. Depending on your module choose the correct guide - if not already set up. .. note:: **QSXP, TX8P** use :ref:`nxp-yocto-guide-index` 1. Setup the Yocto build-directory as described in the Yocto guide for your machine. Use the following values: * ``DISTRO=karo-xwayland`` * ``MACHINE=`` 2. Compile the image. .. prompt:: :prompts: $ bitbake karo-image-ml .. tip:: If you want to compile the image with basler camera support, follow the additional steps described at :ref:`basler-camera-yocto`. Then compile: .. prompt:: :prompts: $ bitbake karo-image-basler Demos ----- Live Object Detection ~~~~~~~~~~~~~~~~~~~~~ .. note:: For this demo a **camera** is mandatory. The following example was tested with *karo-image-basler* and a Basler camera. The pre-trained **eIQ DeepViewRT** model from NXP allows it, to run a live eIQ DeepViewRT GStreamer Detection Demo on the NPU of the i.MX8M Plus. 1. Download the :download:`eIQ Demo File Archive <./files/eiq-deepview-detection-demo.zip>` and unpack it to your target. 2. On the target, run the following command to show the example using the **CPU**: .. prompt:: :prompts: # ./ssdcam-gst -m mobilenet_ssd_v1_1.00_trimmed_quant_anchors.rtm -c /dev/video2 3. Run the following commands to show the example using the **NPU**: .. prompt:: :prompts: # modelrunner -m mobilenet_ssd_v1_1.00_trimmed_quant_anchors.rtm -e ovx -H 10818 & ./ssdcam-gst -m mobilenet_ssd_v1_1.00_trimmed_quant_anchors.rtm -r 127.0.0.1 -u 1 -c /dev/video2 .. _`Download Area`: https://www.karo-electronics.com/downloads