How to convert the HEF output from uint8 back to float

I converted the palm detection model from Google to a HEF and ran it on the Raspberry Pi. Everything works fine, but the output of the inference is something like this:
{‘palm_detection/conv34’: array([[[[178, 148],
[168, 149],
[164, 147],
…,
[169, 153],
[168, 156], …
While the output from running on CPU is something like this:
[[[ -4.10298634 -4.51319408 21.12065315 … 8.04391384 6.85777426
6.99167013] …
Obviously there has been a conversion from float to uint8 but I wonder what I should do to convert it back such that I can use the output for postprocessing. Is there some conversion function which I can find somewhere? I can’t seem to find it in the docs.

Thanks in advance

Rik

HailoRT can return the results of a inference ether quantized or dequantized. In most cases you will use the dequantized results.

Have a look at the Inference examples in the Hailo AI Software Suite tutorials or our Application Example GitHub repo.

GitHub.com - Hailo Application Code Examples

However in some cases you may want to filter the results and dequantize them yourself after filtering. This can reduce the load on the host if you have a weak CPU.

You can find the dequantization parameters (qp_scale, qp_zp) with get_output_vstreams_infos(). Have a look at the HailoRT User Guide and search for hailo_quant_info.