I’m trying to run a yolov8 model that I fine-tuned and compiled for Hailo 8l which I have attached to a Raspberry pi 5. I want to run this as real-time object detection partially at night thus I want to implement an enhancement algo such as Zero Dce. I’ve tried this from many different angles but I’m just stuck now. When I tried running the Zero Dce model on the CPU, I could get to write these enhanced images back to the pipeline buffer efficiently. Next I read about joining models which I don’t know much about but it could be a clean solution to join the YOLOv8m with zero_dce into a single model and then run it on the TPU (if possible, please show how). Is there any other and better way? I’m trying to implement this with the default detection.py file from the examples repo
Hey @JanDev ,
To use Zero dce and yolov8m , you have two options :
Option 1: Join YOLOv8 + Zero-DCE into One Model
Not currently practical with Hailo Dataflow Compiler. Hailo supports multi-model pipelines, but actually joining models like Zero-DCE and YOLO into a single .onnx/.hef isn’t natively supported because:
- Zero-DCE is a low-level enhancement network (pixel operations)
- YOLO is a high-level object detector (outputs bounding boxes)
- They have fundamentally incompatible I/O formats
You’d need to completely rearchitect both models so Zero-DCE becomes a preprocessing stage with outputs that YOLO can directly consume, then re-train and compile this composite model. This is very complex and not worth it in my opinion.
Option 2: Run Two Sequential Hailo Models (Zero-DCE + YOLOv8)
This is probably your best approach:
- Compile Zero-DCE separately using the Hailo Dataflow Compiler
- Run inference on Zero-DCE model with HailoRT
- Feed the output frames directly into YOLOv8’s input buffer
You’ll need to:
- Verify Zero-DCE can be successfully quantized and compiled (ONNX → HEF)
- Handle preprocessing/postprocessing of the intermediate tensors properly
Performance-wise, if both run on the Hailo8l, you’ll significantly reduce CPU overhead.
1 Like