Convert my model to hailo format and detection

Hello, I have my trained model and I need to convert it to hailo format and run detection with my video. I found hailo model zoo and I understand that I need to convert the model to hef format, but I can’t find out how to do it with my own model, which is already trained, and how to launch it with a video.

Hey @vlad.purhin,

Here’s how you can proceed:

  1. Download and Use the DFC: You need to have the DFC (Dataflow Compiler), which you can download from our Developer Zone. For installation and usage instructions, refer to the documentation available there. The DFC is used to convert models from ONNX or TFLite formats to HEF.

    You can also search for “DFC” in the community forums and check out these guides:

  2. After Model Conversion: Once you’ve converted and tested your model, and you’re ready to perform detection with it, you can explore our examples available here: Hailo Application Code Examples.
    Hailo-Application-Code-Examples/runtime/python/object_detection at main · hailo-ai/Hailo-Application-Code-Examples · GitHub

Hello @omria,
Thank you for your help. I managed to install DFC and hailo model zoo. But when I start to work with my model in onxx format, namely, I write the command hailomz parser … , I get the error no module name ‘hailo_sdk_client’.

Hey @vlad.purhin,

Did you run the Hailo Model Zoo from within the virtual environment where DFC is installed? If not, you need to work inside that virtual environment. You can activate the environment by running:

source ~/hailo_env/bin/activate

Hello @omria,
Yes, I am running from a virtual environment with python version 3.8
photo_2024-09-05_11-21-37

It’s ok. When I reinstalled dfc, it worked and created a haf file for me. But now I have an error on step hailomz optimize.