Hey @Bohdan_Veremii,
Welcome to the Hailo Community!
Getting the actual output names
So yeah, when you use get_output_vstream_infos(), it tends to give you the internal layer names instead of the nice friendly names you might be expecting (like output_layer1). That’s just how it works - the vstream names come from the last computational layer in your model graph.
The good news is there are a few ways to map between these internal names and what you actually want:
get_sorted_output_names(network_group_name=None) - This gives you the user-facing output names in the order the SDK expects them:
hef.get_sorted_output_names(network_group_name)
get_vstream_name_from_original_name(original_name, network_group_name=None) - If you know your original output name, you can find the corresponding vstream name:
hef.get_vstream_name_from_original_name("output_layer1", network_group_name)
get_original_names_from_vstream_name(vstream_name, network_group_name=None) - This does the reverse - maps from vstream name back to original names:
hef.get_original_names_from_vstream_name("vstream_name", network_group_name)
Making output names more meaningful
For your second question about changing names to something like cls_head - unfortunately you can’t do this after the HEF is already created. Those names get baked in during the model export/conversion stage (when you’re going from TensorFlow, ONNX, etc. to HEF).
If you want better names, you’ll need to:
- Rename the output layers in your original model before converting
- Make sure those names stick through the whole export/conversion process
Once the HEF exists, HailoRT doesn’t have any way to rename things - you can only use those mapping methods I mentioned above to work with what you’ve got.
Hope this helps!