I’m trying to measure the accuracy of an image using a label folder I have, but I keep getting the following error:

[HailoRT] [error] CHECK failed - Trying to write to vstream yolov10s/input_layer1 before its network group is activated

Hey @user325,

Welcome to the Hailo Community!

So that error you’re seeing happens because you’re trying to write data to the input vstream before the network group has been activated. With HailoRT, you need to activate the ConfiguredNetworkGroup first (or wait for the scheduler to activate it), and only after that can you start writing to the input vstreams. If you try to write before activation, you’ll hit this error every time.

I’d recommend taking a look at how we handle inference in this example:

Quick fix for your code (PyHailoRT pattern)

import hailo_platform.pyhailort as hrt

vdevice = hrt.VDevice.create()
hef = hrt.Hef.create("yolov10s.hef")
configured = vdevice.configure(hef).release()  # ConfiguredNetworkGroup

# Build vstreams from the same configured network group
inputs, outputs = hrt.VStreamsBuilder.create_vstreams(configured).release()

# Important: Activate before doing any I/O operations
with configured.activate():  # This ensures the network group is active
    # Alternatively: configured.wait_for_activation() if activation happens elsewhere
    frame_size = inputs[0].get_frame_size()
    buf = bytearray(frame_size)
    inputs[0].write(buf)  # Now this is safe to call

Hope this clears things up!

1 Like