Hey,
I’m a UCSD student working on a project using DonkeyCar and an RPI. I trained a self-driving model on my car and converted that model to a .hef file. I am trying to integrate HailoRT into the drive function of donkeycars manage.py, which is currently set to use .h5/.tflite models generally.
How could I go about doing this?
omria
March 18, 2025, 10:11am
2
Hey @user136 ,
Welcome to the Hailo Community!
I recommend this Async Python API: Hailo-Application-Code-Examples/runtime/python/utils.py at main · hailo-ai/Hailo-Application-Code-Examples · GitHub
You can see how it’s used here:
#!/usr/bin/env python3
import argparse
import os
import sys
from pathlib import Path
import numpy as np
from loguru import logger
import queue
import threading
import cv2
from typing import List
from object_detection_utils import ObjectDetectionUtils
# Add the parent directory to the system path to access utils module
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from utils import HailoAsyncInference, load_images_opencv, validate_images, divide_list_to_batches
CAMERA_CAP_WIDTH = 1920
This file has been truncated. show original
If you prefer something more built-in that uses GStreamer and pipeline-based approaches, please check out our examples here:
Contribute to hailo-ai/hailo-rpi5-examples development by creating an account on GitHub.