TAPPAS pipeline on raspberry pi 5

Hey everybody,

I want to write a custom pipeline for a raspberry pi with a Ai kit.
I already used the DFC to complile a network i want to use.
Currently i am a bit overwhelmed with the amount of information so I will briefly describe my position:

I followed the installation guide from.

I executed the test command to check if the installation is successful.
Every output looks like the one in the setup guide.

Now I don’t really find a good explanation where to start. I have read some parts of the TAPPAS User Guide and the HailoRT User Guide.

So now where do i have to start?
Do i have to develop the pipeline on the raspberry pi or is there a way to develop it on a PC?

1 Like

Hey @lukasOST,

Here’s where to begin working with TAPPAS pipelines:

  1. Start with RPi5 Examples

  2. Explore More Examples

These repositories will give you practical, working examples to build upon for your own applications.

I am trying to use the Image part of clip on the raspberry Pi hardware accelerator. I just want to process pictures. I have found the example for clip which processes a video.
I also found the detection pipeline in GitHub - hailo-ai/hailo-rpi5-examples.

@omria what do you suggest where should i start.
From my viewpoint the detection pipeline looks a bit simpler to use.

Greetings,
I am currently trying to run a net on Raspberry Pi 5. I modified the detection pipeline example from GitHub - hailo-ai/hailo-rpi5-examples.
When i run it i get the error:

[HailoRT] [error] CHECK failed - Failed to mmap buffer with errno:12
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_OUT_OF_HOST_MEMORY(3)

I didn`t realy find a good description of this error other than Link to error description.
I suspected that my hef file maybe is to large(52 MB) but i found other examples where a network is used which is even bigger. I also tried with smaller networks but i get the same error.
So what does this error mean?

Wrong link. The right one to the example is GitHub - hailo-ai/Hailo-Application-Code-Examples.

Hey everybody, i found some code which helped me to run a network on the Raspberry Pi with the AI Kit.
I found it here How do I increase the max queue size for HailoRT? - #4 by omria.

import numpy as np
from hailo_platform import (
    HEF, VDevice, HailoStreamInterface, InferVStreams,
    ConfigureParams, InputVStreamParams, OutputVStreamParams, FormatType
)

def run_inference(hef_path, num_images=1):
    # Load model
    hef = HEF(hef_path)
    
    # Setup device and configure model
    with VDevice() as device:
        # Configure network
        config_params = ConfigureParams.create_from_hef(
            hef=hef, 
            interface=HailoStreamInterface.PCIe
        )
        configuration = device.configure(hef, config_params)
        network_group = configuration[0]
        
        # Setup streams
        input_params = InputVStreamParams.make(
            network_group, 
            format_type=FormatType.FLOAT32
        )
        output_params = OutputVStreamParams.make(
            network_group, 
            format_type=FormatType.FLOAT32
        )
        
        # Prepare input data
        input_info = hef.get_input_vstream_infos()[0]
        h, w, c = input_info.shape
        dataset = np.random.rand(num_images, h, w, c).astype(np.float32)
        
        # Run inference
        with network_group.activate():
            with InferVStreams(network_group, input_params, output_params) as pipeline:
                results = pipeline.infer({input_info.name: dataset})
                return results

This was a good starting point for me.

1 Like