Friday, August 30, 2024

How to set up the Raspberry Pi AI Kit with Raspberry Pi 5

This guide will help you set up the Raspberry Pi AI Kit with your Raspberry Pi 5. This will enable you to run rpicam-apps camera demos using the Hailo AI neural network accelerator.

The image shows a Raspberry Pi 5 with an attached Raspberry Pi M.2 HAT+ board. The Raspberry Pi 5 is the base component, identifiable by its HDMI ports, USB ports, and Ethernet port visible at the bottom right. The M.2 HAT+ board is mounted on top of the Raspberry Pi using four standoffs, which elevate it above the main board. The M.2 HAT+ board has an M.2 module installed, which is secured in place and connected to the HAT+ board. The setup appears to be compact and well-organized, with the M.2 module's connector edge visible and fitted into the HAT+ board. The ribbon cable is connected to the HAT+ board, indicating that it might be used for additional connectivity or power. This configuration is used to enhance the capabilities of the Raspberry Pi 5 by adding support for M.2 devices, which could include high-speed storage solutions or other peripherals, thus expanding the functionality and performance of the Raspberry Pi system.

If you need help installing your AI Kit before we start, this guide provides step-by-step images of the process.

Prerequisites

For this guide, you will need the following:

Hardware setup

1. Attach the camera to your Raspberry Pi 5 board following the instructions at Install a Raspberry Pi Camera. You can skip reconnecting your Raspberry Pi to power, because you’ll need to disconnect your Raspberry Pi from power for the next step.

    2. Follow the installation instructions to get your AI Kit hardware connected to your Raspberry Pi 5.

    3. Follow the instructions to enable PCIe Gen 3.0. This step is optional, but highly recommended to achieve the best performance with your AI Kit.

    4. Install the dependencies required to use the AI Kit. Run the following command from a terminal window:

    $ sudo apt install hailo-all

    This installs the following dependencies:

    • Hailo kernel device driver and firmware
    • HailoRT middleware software
    • Hailo Tappas core post-processing libraries
    • The rpicam-apps Hailo post-processing software demo stages

    5. Finally, reboot your Raspberry Pi with sudo reboot for these settings to take effect.

    6. To ensure everything is running correctly, run the following command:

    $ hailortcli fw-control identify

    If you see output similar to the following, you’ve successfully installed the AI Kit and its software dependencies:

    Executing on device: 0000:01:00.0
    Identifying board
    Control Protocol Version: 2
    Firmware Version: 4.17.0 (release,app,extended context switch buffer)
    Logger Version: 0
    Board Name: Hailo-8
    Device Architecture: HAILO8L
    Serial Number: HLDDLBB234500054
    Part Number: HM21LB1C2LAE
    Product Name: HAILO-8L AI ACC M.2 B+M KEY MODULE EXT TMP

    Additionally, you can run dmesg | grep -i hailo to check the kernel logs, which should yield output similar to the following:

    [    3.049657] hailo: Init module. driver version 4.17.0
    [    3.051983] hailo 0000:01:00.0: Probing on: 1e60:2864...
    [    3.051989] hailo 0000:01:00.0: Probing: Allocate memory for device extension, 11600
    [    3.052006] hailo 0000:01:00.0: enabling device (0000 -> 0002)
    [    3.052011] hailo 0000:01:00.0: Probing: Device enabled
    [    3.052028] hailo 0000:01:00.0: Probing: mapped bar 0 - 000000000d8baaf1 16384
    [    3.052034] hailo 0000:01:00.0: Probing: mapped bar 2 - 000000009eeaa33c 4096
    [    3.052039] hailo 0000:01:00.0: Probing: mapped bar 4 - 00000000b9b3d17d 16384
    [    3.052044] hailo 0000:01:00.0: Probing: Force setting max_desc_page_size to 4096 (recommended value is 16384)
    [    3.052052] hailo 0000:01:00.0: Probing: Enabled 64 bit dma
    [    3.052055] hailo 0000:01:00.0: Probing: Using userspace allocated vdma buffers
    [    3.052059] hailo 0000:01:00.0: Disabling ASPM L0s
    [    3.052070] hailo 0000:01:00.0: Successfully disabled ASPM L0s
    [    3.221043] hailo 0000:01:00.0: Firmware was loaded successfully
    [    3.231845] hailo 0000:01:00.0: Probing: Added board 1e60-2864, /dev/hailo0

    7. To ensure the camera is operating correctly, run the following command:

    $ rpicam-hello -t 10s

    This starts the camera and shows a preview window for ten seconds. Once you have verified everything is installed correctly, it’s time to run some demos.

    The documentation section on our website is full of guides, datasheets, and other useful information like this.

    You can also visit our forums to get answers to specific question from our engineers and the wider Raspberry Pi community.

    The post How to set up the Raspberry Pi AI Kit with Raspberry Pi 5 appeared first on Raspberry Pi.



    from News - Raspberry Pi https://ift.tt/HPBsFRD

    Labels: ,

    0 Comments:

    Post a Comment

    Subscribe to Post Comments [Atom]

    << Home