Simplifying Edge AI Development with DeGirum PySDK and Hailo

scrfd_10g is available at: hailo_model_zoo/docs/public_models/HAILO8/HAILO8_face_detection.rst at master · hailo-ai/hailo_model_zoo
arcface is available at:
hailo_model_zoo/docs/public_models/HAILO8/HAILO8_face_recognition.rst at master · hailo-ai/hailo_model_zoo

Thanks for that
When i downloading the links that i am getting it was there in the onnx format,But i need hef right to run in the my setup.
Or Help me out is there any way that i can convert the onnx into hef

Hi @Dendukuri_Narendra_v
In github tables you probably are not seeing all the columns. Please scroll to the right so that you will find links to precompiled models.

FYI: If you use our PySDK and the cloud zoo, the models will be downloaded automatically.

Thanks,you made my day
And is there any steps that i can follow to use directly the pysdk and cloud zoo to complete my face recogntion project .
Any reference links for that
Again thank you

Hi @Dendukuri_Narendra_v
We have a comprehensive guide to build face recognition that include all the steps you outlined at: A Comprehensive Guide to Building a Face Recognition System

Hi Shashi, I’m trying to run SC‑Depth v3 using DeGirum PySDK via the tutorial thread here (linked above), but I’m running into persistent errors and cannot get depth values out.

My Depth.py file:

import os, sys
sys.path.insert(0, "/home/pi/hailo_model_zoo")
os.environ["PYTHONPATH"] = "/home/pi/hailo_model_zoo:" + os.environ.get("PYTHONPATH", "")

import degirum as dg
import cv2
import numpy as np
from picamera2 import Picamera2

# 1. Load your SC-Depth V3 model
model = dg.load_model(
    model_name='scdepthv3',
    inference_host_address='@local',
    zoo_url='/home/pi/my_hailo_zoo'
)

#  2. Initialize the AI camera
picam2 = Picamera2()
cfg = picam2.create_preview_configuration(main={"size": (384, 384), "format": "RGB888"})
picam2.configure(cfg)
picam2.start()

print("Starting depth inference. Press 'q' or 'x' to exit.")
while True:
    frame = picam2.capture_array()  # RGB image
    
    # 1. Resize to (width=320, height=256)
    resized = cv2.resize(frame, (320, 256), interpolation=cv2.INTER_LINEAR)
    
    # Manually apply TensorFlow-like preprocessing:
    img = resized.astype(np.uint8) 
    # e.g. resize with OpenCV or PIL and multiply by 255 as needed
    result = model(img)
    

    # 4. Get normalized depth overlay
    overlay = result.image_overlay  # already visualized by your postprocessor

    # 5. Resize for display (optional)
    display = cv2.resize(overlay, (640, 480))

    # 6. Show result
    cv2.imshow("SC-Depth V3 output", display)

    if cv2.waitKey(1) & 0xFF in (ord('q'), ord('x')):
        break

# Cleanup
cv2.destroyAllWindows()
picam2.stop()

My current JSON configuration:

{
  "ConfigVersion": 10,
  "DEVICE": [
    {
      "DeviceType": "HAILO8",
      "RuntimeAgent": "HAILORT",
      "SupportedDeviceTypes": "HAILORT/HAILO8"
    }
  ],
  "PRE_PROCESS": [
    {
      "InputType": "Tensor",
      "InputN": 1,
      "InputH": 256,
      "InputW": 320,
      "InputC": 3,
      "InputRawDataType": "DG_UINT8"
    }
  ],
  "MODEL_PARAMETERS": [
    { "ModelPath": "scdepthv3.hef" }
  ],
  "POST_PROCESS": [
    {
      "OutputPostprocessType": "Python",
      "PythonFile": "depth_estimation_postprocessing.py",
      "MetaArch": "scdepthv3"
    }
  ]
}

Post-processor used

I’ve referenced and copied this post‑processing code from the official Hailo Model Zoo GitHub:
sample snippet from depth_estimation_postprocessing.py

Errors I encounter

  • Many of the errors previously shared include:
    • AttributeError: module 'depth_estimation_postprocessing' has no attribute 'PostProcessor'
    • Other runtime exceptions in Python worker threads

My goals

  1. Successfully infer using SC‑Depth v3 on Hailo‑8 with DeGirum PySDK on Raspberry Pi.
  2. Retrieve numeric per-pixel depth values (not just overlays), especially at the center or arbitrary pixel coordinates.

Questions

  • Did I set "OutputPostprocessType": "Python" and "MetaArch": "scdepthv3" correctly?
  • Do I need to register or implement a custom PostProcessor class instead of a standalone function?
  • Should I instead set "OutputPostprocessType": "None" and manually extract results using model.predict() or predict_batch()?

If anyone could share a minimal working JSON configuration or Python postprocessor that successfully returns depth map data (rather than raising module or attribute errors), I’d be very grateful.

Thanks in advance!