Issue Parsing ONNX Model in Hailo Model Zoo: “Expecting value: line 1 column 1 (char 0)”

Hi everyone,

I’m working on deploying a lightweight green pixel classifier model using the Hailo8L accelerator as part of my honours research. The aim is to classify green pixels from camera input for an Open Weed Locator (OWL)-inspired weed detection system, with real-time inference using a Raspberry Pi 5 + Hailo AI Kit. The model is trained on synthetic ExG/HSV data, and I’m using the Hailo Model Zoo flow to convert a trained PyTorch → ONNX model into a .hef file for Hailo deployment.

The model is intentionally minimal, with an input shape of [1, 4] and output [1, 1], corresponding to a 4-channel input per pixel (e.g., [R, G, B, ExG]) and a binary classification output (weed or no weed).

What I’ve Done So Far:

  1. Model Training:
    Trained using a custom train_green_detector_HALIO.py script in PyTorch with a 4-input → 1-output MLP. Exported to ONNX using:
torch.onnx.export(model, dummy_input, "green_detector_model.onnx", input_names=['input'], output_names=['output'], opset_version=11)

Model Validation:

ONNX passes onnx.checker and onnx.load without issue:

input: [1, 4]
output: [1, 1]

Confirmed ONNX validity:

✓ ONNX model is valid

Calibration Data:

  • Collected 200,000 calibration samples as float64, converted to float32.
  • Saved as raw binary using
data.astype(np.float32).tofile('calibration_data.bin')

YAML File:
green_detector.yaml:

network:
  network_name: green_detector

parser:
  nodes:
    - input
    - output
  start_node_shapes:
    input: [1, 4]

evaluation:
  classes: 2

YAML validated via:

python3 -c "import yaml; yaml.safe_load(open('green_detector.yaml'))"

Hailo Compile Command:

CUDA_VISIBLE_DEVICES=0 hailomz compile \
  --ckpt green_detector_model.onnx \
  --calib-path calibration_data.bin \
  --yaml green_detector.yaml \
  --classes 2 \
  --hw-arch hailo8l

Issue:
Compilation always fails at the parsing step with the following error:

Exception: Encountered error during parsing: Expecting value: line 1 column 1 (char 0)

Things I’ve tried:

  • Using .npy vs .bin calibration data (both validated as float32 and non-empty).
    Parsing separately via:
hailomz parse --ckpt ... --yaml ... --hw-arch hailo8l

→ still fails at same point.

  • Verified ONNX file is not empty, YAML file is valid, and .bin is not 0 bytes.
  • GPU is working correctly (nvidia-smi confirms RTX 3080 Laptop GPU), and used CUDA_VISIBLE_DEVICES=0.

Versions & Environment:

Hailo Model Zoo (latest from GitHub)

Hailo SDK 4.15

Python 3.10

Ubuntu 22.04

CUDA 12.4

GPU: RTX 3080 Laptop

Goal:
My end goal is to deploy this model onto the Hailo8L to perform pixel-wise green classification. The dataset and model are intentionally simple for rapid inference. Once this pipeline is validated, I’ll scale it up for real-time weed spraying with a turret system using camera alignment and pixel prediction.

Any Help Appreciated:
Has anyone encountered this "Expecting value: line 1 column 1" error with hailomz compile before?

Could it be that the input shape [1, 4] or the single output is unsupported by the parser?

Happy to upload model files or any debug logs — thanks in advance!