YOLO Object Detection on the Raspberry Pi AI Hat+ | How to Write Custom Python Code

Hi,
How do you flip the Camera in the example codes. Is anyone elses camera flipped? Can the resolution be changed when running these programs?
Thank you in advance I am a noobie at this and have been trying for a few days with out any luck

Hey Chris, welcome to the forums!

First of all, these things may seem like simple options to change, but to change them we need to dive deep into the pipelines which is quite an involved task. It took us half a day of experimenting just to figure out how to change the resolution without causing it to crash.

We have a section in the pose estimation version of this guide where we change the camera resolution. This only changes the initial capture resolution and not the processing resolution so its impact on performance is near zero. Since publishing it, Hailo has also juggled the repository a few times so the file may be located somewhere else in the project folder.

As for flipping the camera, your best bet would be to investigate the common folder from the section above. It also handles Gstreamer which is what manages the camera input. However, I don’t think it may even be possible to modify the pipeline to flip the camera input - its pretty tricky to work with this all.

Your best bet would be to maybe see if you can flip the camera before it goes into the pipeline. I’m unsure how this would be done, maybe @Dan might know?

Best of luck!

Thank you for the reply,
I had a look at the video you refered to and those files dont exist in my folders. I can see what I need to change on the video but i cant access this.

Hey @Chris257700

I’ve not had a chance to test it, but looking at the documentation for the regular pi cam either vflip or hflip will flip the camera, the syntax that’s used for changing the resolution looks similar to the documentation for doing so with the normal rpicam library. Potentially you can add in a line or modify an existing one to have either of these commands added.

I have also tried this with no luck as the camera setup is in the pipeline.

I have a found an easy workaround and aslo a way to change it in the pipeline thats is a bit harder.
For the easy option you can just set the input to libcamera. In the pipeline this camera feed has not been flipped.

for the harder option if you want to modify the pipline you need to install some tools from here

You can also adjust resolution in here.
Thanks again for the suggestions.

1 Like

Hi @Chris257700

Great to hear that you managed to get it sorted out. :slight_smile:

Hi, my project involves detecting and counting cars. I was wondering if there is a way to filter or hide detections of other classes and display only the car class. I do not plan to train a custom model, as I would like to use the existing Hailo detection model directly. Is this possible?

1 Like

Hi @Afif298506, welcome to the forums!

This sounds like a fun project and should absolutely be possible. Our guide for this includes a section for doing exactly this for the ā€˜person’ object type under the subheading Example Code 1: Object Detection.

You should be able to set up and run this code exactly as described, but change the object label in the code from ā€œpersonā€ to ā€œcarā€. This particular model has a ton of class names that it can use! This page contains a big list of all the possible object types that it can identify.

Hope this helps!

1 Like

Hello, I tried your video tutorial on my Raspberry Pi 5 with AI Hat+ and it works. I just have one tiny problem, when ever i bash with --input rpi, the Hailo Detect App camera is blurry. Same with the --input libcamera. How can i change its quality resolution? …btw I’m using a Arducam IMX519 16MP AutofocusšŸ˜…

Hi @Bobby302015, welcome to the forum.

Jarryd mentions how to change the resolution of the image in a previous post in this thread:

ā€œWe have a section in the pose estimation version of this guide where we change the camera resolution. This only changes the initial capture resolution and not the processing resolution so its impact on performance is near zero. Since publishing it, Hailo has also juggled the repository a few times so the file may be located somewhere else in the project folder.ā€ - Jarryd

Try modifying your code as per the linked article and let us know how it goes! :slight_smile:

Hi, I have followed the tutorial and have got the detection.py working but any edits I make to the code do not have an effect on the output. I have attempted to add an FPS counter to the overlay but nothing I do seems to make a difference to the final result.

I have even attempted to comment out the person counter that is built into the example to see if it changes the output but it is still the same. Can you offer any assistance or recommendations?

2 Likes

Hey @Liam295783, welcome to the forum!

It has been a while since we made these guides, and HAILO have altered the pipelines a tad, but there used to be an in-built FPS counter deep in the pipeline files. In the pose estimation version of this guide, we take a look at how to under the section we change camera resolution - might be worth checking out.

The AI Hat uses Gstreamer instead of OpenCV, which is the usual way to add an FPS counter, and I would wager that you might need to alter the pipeline itsel,f where a lot of the displaying behaviour is coded, rather than the higher-level detection.py.

Let us know how it goes!

2 Likes

Hi Do you guys have an updated version of this walkthrough? I am having trouble installing the Ai hat installation. it keeps failing when it starts building the ninja stuff. I have a brand new RPi 5 with a AI hat+ 2 26 tops. even the repo in the read me says our dated but the link it sends me for the new repo doesn’t look right. Here are where the errors start:

Building project with Ninja…
\[1/19\] Compiling C++ object cpp/libdepth_postprocess.so.p/depth_estimation.cpp.o
FAILED: cpp/libdepth_postprocess.so.p/depth_estimation.cpp.o
c++ -Icpp/libdepth_postprocess.so.p -Icpp -I../cpp -I/usr/include/hailo/tappas -I/usr/include/hailo/tappas/gsthailometa -I/usr/include/hailo/tappas/general -I/usr/include/hailo/tappas/plugins/common -I/usr/include/hailo/tappas/tracking -I/usr/include/hailo/tappas/sources/Catch2/include -I/usr/include/hailo/tappas/sources/cxxopts/include -I/usr/include/hailo/tappas/sources/pybind11/include -I/usr/include/hailo/tappas/sources/rapidjson/include -I/usr/include/hailo/tappas/sources/xtensor-blas/include -I/usr/include/hailo/tappas/sources/xtensor/include -I/usr/include/hailo/tappas/sources/xtl/include -I/usr/include/hailo/ -I/usr/include/gstreamer-1.0/gst/hailo/ -I/usr/include/opencv4 -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -I/usr/include/sysprof-6 -fvisibility=default -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -Wall -Winvalid-pch -std=c++17 -O3 -Wno-psabi -Wno-class-memaccess -Wno-deprecated-declarations -fPIC -fvisibility=default -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++17 -Wpessimizing-move -Wredundant-move -fconcepts -fPIC -pthread -MD -MQ cpp/libdepth_postprocess.so.p/depth_estimation.cpp.o -MF cpp/libdepth_postprocess.so.p/depth_estimation.cpp.o.d -o cpp/libdepth_postprocess.so.p/depth_estimation.cpp.o -c ../cpp/depth_estimation.cpp
In file included from ../cpp/depth_estimation.hpp:8,
from ../cpp/depth_estimation.cpp:5:
/usr/include/hailo/tappas/hailo_common.hpp: In function ā€˜void hailo_common::flatten_hailo_roi(HailoROIPtr, HailoROIPtr, hailo_object_t)’:
/usr/include/hailo/tappas/hailo_common.hpp:256:48: warning: moving a temporary object prevents copy elision \[-Wpessimizing-move\]
256 | sub_obj_roi->set_bbox(std::move(create_flattened_bbox(sub_obj_roi->get_bbox(), roi->get_bbox())));
| \~~~^~~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~
/usr/include/hailo/tappas/hailo_common.hpp:256:48: note: remove ā€˜std::move’ call
../cpp/depth_estimation.cpp: In function ā€˜void filter_scdepth(HailoROIPtr)’:
../cpp/depth_estimation.cpp:29:88: error: ā€˜using std::\__shared_ptr_access<HailoTensor, \__gnu_cxx::\_S_atomic, false, false>::element_type = class HailoTensor’ {aka ā€˜class HailoTensor’} has no member named ā€˜vstream_info’
29 | xt::xarray logits_dequantized = common::dequantize(tensor_data, tensor_ptr->vstream_info().quant_info.qp_scale, tensor_ptr->vstream_info().quant_info.qp_zp);
| ^\~\~\~\~\~\~\~\~\~\~\~
../cpp/depth_estimation.cpp:29:136: error: ā€˜using std::\__shared_ptr_access<HailoTensor, \__gnu_cxx::\_S_atomic, false, false>::element_type = class HailoTensor’ {aka ā€˜class HailoTensor’} has no member named ā€˜vstream_info’
29 | xt::xarray logits_dequantized = common::dequantize(tensor_data, tensor_ptr->vstream_info().quant_info.qp_scale, tensor_ptr->vstream_info().quant_info.qp_zp);
| ^\~\~\~\~\~\~\~\~\~\~\~
\[2/19\] Compiling C++ object cpp/libyol…\_postprocess.so.p/yolo_hailortpp.cpp.o
FAILED: cpp/libyolo_hailortpp_postprocess.so.p/yolo_hailortpp.cpp.o
c++ -Icpp/libyolo_hailortpp_postprocess.so.p -Icpp -I../cpp -I/usr/include/hailo/tappas -I/usr/include/hailo/tappas/gsthailometa -I/usr/include/hailo/tappas/general -I/usr/include/hailo/tappas/plugins/common -I/usr/include/hailo/tappas/tracking -I/usr/include/hailo/tappas/sources/Catch2/include -I/usr/include/hailo/tappas/sources/cxxopts/include -I/usr/include/hailo/tappas/sources/pybind11/include -I/usr/include/hailo/tappas/sources/rapidjson/include -I/usr/include/hailo/tappas/sources/xtensor-blas/include -I/usr/include/hailo/tappas/sources/xtensor/include -I/usr/include/hailo/tappas/sources/xtl/include -I/usr/include/hailo/ -I/usr/include/gstreamer-1.0/gst/hailo/ -I/usr/include/opencv4 -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -I/usr/include/sysprof-6 -fvisibility=default -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -Wall -Winvalid-pch -std=c++17 -O3 -Wno-psabi -Wno-class-memaccess -Wno-deprecated-declarations -fPIC -fvisibility=default -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++17 -Wpessimizing-move -Wredundant-move -fconcepts -fPIC -pthread -isystem/usr/include/hailo/tappas/sources/rapidjson/include -MD -MQ cpp/libyolo_hailortpp_postprocess.so.p/yolo_hailortpp.cpp.o -MF cpp/libyolo_hailortpp_postprocess.so.p/yolo_hailortpp.cpp.o.d -o cpp/libyolo_hailortpp_postprocess.so.p/yolo_hailortpp.cpp.o -c ../cpp/yolo_hailortpp.cpp
In file included from /usr/include/hailo/tappas/common/nms.hpp:8,
from ../cpp/hailo_nms_decode.hpp:12,
from ../cpp/yolo_hailortpp.cpp:12:
/usr/include/hailo/tappas/hailo_common.hpp: In function ā€˜void hailo_common::flatten_hailo_roi(HailoROIPtr, HailoROIPtr, hailo_object_t)’:
/usr/include/hailo/tappas/hailo_common.hpp:256:48: warning: moving a temporary object prevents copy elision \[-Wpessimizing-move\]
256 | sub_obj_roi->set_bbox(std::move(create_flattened_bbox(sub_obj_roi->get_bbox(), roi->get_bbox())));
| \~~~^~~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~
/usr/include/hailo/tappas/hailo_common.hpp:256:48: note: remove ā€˜std::move’ call
../cpp/hailo_nms_decode.hpp: In constructor ā€˜HailoNMSDecode::HailoNMSDecode(HailoTensorPtr, std::map<unsigned char, std::\__cxx11::basic_string >&, float, uint, bool)’:
../cpp/hailo_nms_decode.hpp:65:176: error: ā€˜using std::\__shared_ptr_access<HailoTensor, \__gnu_cxx::\_S_atomic, false, false>::element_type = class HailoTensor’ {aka ā€˜class HailoTensor’} has no member named ā€˜vstream_info’
65 | : \_nms_output_tensor(tensor), labels_dict(labels_dict), \_detection_thr(detection_thr), \_max_boxes(max_boxes), \_filter_by_score(filter_by_score), \_vstream_info(tensor->vstream_info())
| ^\~\~\~\~\~\~\~\~\~\~\~
\[3/19\] Compiling C++ object cpp/libyolov5seg_postprocess.so.p/yolov5seg.cpp.o
FAILED: cpp/libyolov5seg_postprocess.so.p/yolov5seg.cpp.o
c++ -Icpp/libyolov5seg_postprocess.so.p -Icpp -I../cpp -I/usr/include/hailo/tappas -I/usr/include/hailo/tappas/gsthailometa -I/usr/include/hailo/tappas/general -I/usr/include/hailo/tappas/plugins/common -I/usr/include/hailo/tappas/tracking -I/usr/include/hailo/tappas/sources/Catch2/include -I/usr/include/hailo/tappas/sources/cxxopts/include -I/usr/include/hailo/tappas/sources/pybind11/include -I/usr/include/hailo/tappas/sources/rapidjson/include -I/usr/include/hailo/tappas/sources/xtensor-blas/include -I/usr/include/hailo/tappas/sources/xtensor/include -I/usr/include/hailo/tappas/sources/xtl/include -I/usr/include/hailo/ -I/usr/include/gstreamer-1.0/gst/hailo/ -I/usr/include/opencv4 -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -I/usr/include/sysprof-6 -fvisibility=default -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -Wall -Winvalid-pch -std=c++17 -O3 -Wno-psabi -Wno-class-memaccess -Wno-deprecated-declarations -fPIC -fvisibility=default -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++17 -Wpessimizing-move -Wredundant-move -fconcepts -fPIC -pthread -MD -MQ cpp/libyolov5seg_postprocess.so.p/yolov5seg.cpp.o -MF cpp/libyolov5seg_postprocess.so.p/yolov5seg.cpp.o.d -o cpp/libyolov5seg_postprocess.so.p/yolov5seg.cpp.o -c ../cpp/yolov5seg.cpp
In file included from ../cpp/yolov5seg.cpp:4:
/usr/include/hailo/tappas/hailo_common.hpp: In function ā€˜void hailo_common::flatten_hailo_roi(HailoROIPtr, HailoROIPtr, hailo_object_t)’:
/usr/include/hailo/tappas/hailo_common.hpp:256:48: warning: moving a temporary object prevents copy elision \[-Wpessimizing-move\]
256 | sub_obj_roi->set_bbox(std::move(create_flattened_bbox(sub_obj_roi->get_bbox(), roi->get_bbox())));
| \~~~^~~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~
/usr/include/hailo/tappas/hailo_common.hpp:256:48: note: remove ā€˜std::move’ call
../cpp/yolov5seg.cpp: In function ā€˜std::vector post_per_branch(std::string, int, std::map<std::\__cxx11::basic_string, std::shared_ptr >, std::vector<xt::xarray_container<xt::uvector<float, std::allocator >, xt::layout_type::row_major, xt::svector<long unsigned int, 4, std::allocator, true>, xt::xtensor_expression_tag> >, std::vector, float, float, std::vector<xt::xarray_container<xt::uvector<float, std::allocator >, xt::layout_type::row_major, xt::svector<long unsigned int, 4, std::allocator, true>, xt::xtensor_expression_tag> >, std::vector<xt::xarray_container<xt::uvector<float, std::allocator >, xt::layout_type::row_major, xt::svector<long unsigned int, 4, std::allocator, true>, xt::xtensor_expression_tag> >, int, int, int)’:
../cpp/yolov5seg.cpp:206:41: error: ā€˜using std::\__shared_ptr_access<HailoTensor, \__gnu_cxx::\_S_atomic, false, false>::element_type = class HailoTensor’ {aka ā€˜class HailoTensor’} has no member named ā€˜vstream_info’
206 | float qp_zp = tensors\[branch_name\]->vstream_info().quant_info.qp_zp;
| ^\~\~\~\~\~\~\~\~\~\~\~
../cpp/yolov5seg.cpp:207:44: error: ā€˜using std::\__shared_ptr_access<HailoTensor, \__gnu_cxx::\_S_atomic, false, false>::element_type = class HailoTensor’ {aka ā€˜class HailoTensor’} has no member named ā€˜vstream_info’
207 | float qp_scale = tensors\[branch_name\]->vstream_info().quant_info.qp_scale;
| ^\~\~\~\~\~\~\~\~\~\~\~
../cpp/yolov5seg.cpp: In instantiation of ā€˜std::vector yolov5seg_post(auto:131&, auto:132&, auto:133&, float, float, auto:134&, auto:135&, int, int, int, auto:136&) \[with auto:131 = std::map<std::\__cxx11::basic_string, std::shared_ptr >; auto:132 = std::vector<xt::xarray_container<xt::uvector<float, std::allocator >, xt::layout_type::row_major, xt::svector<long unsigned int, 4, std::allocator, true>, xt::xtensor_expression_tag> >; auto:133 = std::vector; auto:134 = std::vector<xt::xarray_container<xt::uvector<float, std::allocator >, xt::layout_type::row_major, xt::svector<long unsigned int, 4, std::allocator, true>, xt::xtensor_expression_tag> >; auto:135 = std::vector<xt::xarray_container<xt::uvector<float, std::allocator >, xt::layout_type::row_major, xt::svector<long unsigned int, 4, std::allocator, true>, xt::xtensor_expression_tag> >; auto:136 = std::vector<std::\__cxx11::basic_string >\]’:
../cpp/yolov5seg.cpp:419:60: required from here
419 | std::vector detections = yolov5seg_post(tensors, params->anchors, params->strides, params->iou_threshold, params->score_threshold, params->grids, params->anchor_grids, params->num_anchors, params->input_shape\[0\], params->input_shape\[1\], params->outputs_name);
| ~~^~~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~
../cpp/yolov5seg.cpp:217:117: error: ā€˜using std::\__shared_ptr_access<HailoTensor, \__gnu_cxx::\_S_atomic, false, false>::element_type = class HailoTensor’ {aka ā€˜class HailoTensor’} has no member named ā€˜vstream_info’
217 | auto proto_tensor = common::dequantize(common::get_xtensor(tensors\[outputs_name\[0\]\]), tensors\[outputs_name\[0\]\]->vstream_info().quant_info.qp_scale, tensors\[outputs_name\[0\]\]->vstream_info().quant_info.qp_zp);
| ~~^~~\~
../cpp/yolov5seg.cpp:217:179: error: ā€˜using std::\__shared_ptr_access<HailoTensor, \__gnu_cxx::\_S_atomic, false, false>::element_type = class HailoTensor’ {aka ā€˜class HailoTensor’} has no member named ā€˜vstream_info’
217 | auto proto_tensor = common::dequantize(common::get_xtensor(tensors\[outputs_name\[0\]\]), tensors\[outputs_name\[0\]\]->vstream_info().quant_info.qp_scale, tensors\[outputs_name\[0\]\]->vstream_info().quant_info.qp_zp);
| ~~^~~\~
\[4/19\] Compiling C++ object cpp/libyol…cess.so.p/yolov8pose_postprocess.cpp.o
FAILED: cpp/libyolov8pose_postprocess.so.p/yolov8pose_postprocess.cpp.o
c++ -Icpp/libyolov8pose_postprocess.so.p -Icpp -I../cpp -I/usr/include/hailo/tappas -I/usr/include/hailo/tappas/gsthailometa -I/usr/include/hailo/tappas/general -I/usr/include/hailo/tappas/plugins/common -I/usr/include/hailo/tappas/tracking -I/usr/include/hailo/tappas/sources/Catch2/include -I/usr/include/hailo/tappas/sources/cxxopts/include -I/usr/include/hailo/tappas/sources/pybind11/include -I/usr/include/hailo/tappas/sources/rapidjson/include -I/usr/include/hailo/tappas/sources/xtensor-blas/include -I/usr/include/hailo/tappas/sources/xtensor/include -I/usr/include/hailo/tappas/sources/xtl/include -I/usr/include/hailo/ -I/usr/include/gstreamer-1.0/gst/hailo/ -I/usr/include/opencv4 -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -I/usr/include/sysprof-6 -fvisibility=default -fdiagnostics-color=always -D_GLIBCXX_ASSERTIONS=1 -Wall -Winvalid-pch -std=c++17 -O3 -Wno-psabi -Wno-class-memaccess -Wno-deprecated-declarations -fPIC -fvisibility=default -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -std=c++17 -Wpessimizing-move -Wredundant-move -fconcepts -fPIC -pthread -MD -MQ cpp/libyolov8pose_postprocess.so.p/yolov8pose_postprocess.cpp.o -MF cpp/libyolov8pose_postprocess.so.p/yolov8pose_postprocess.cpp.o.d -o cpp/libyolov8pose_postprocess.so.p/yolov8pose_postprocess.cpp.o -c ../cpp/yolov8pose_postprocess.cpp
In file included from ../cpp/yolov8pose_postprocess.hpp:7,
from ../cpp/yolov8pose_postprocess.cpp:14:
/usr/include/hailo/tappas/hailo_common.hpp: In function ā€˜void hailo_common::flatten_hailo_roi(HailoROIPtr, HailoROIPtr, hailo_object_t)’:
/usr/include/hailo/tappas/hailo_common.hpp:256:48: warning: moving a temporary object prevents copy elision \[-Wpessimizing-move\]
256 | sub_obj_roi->set_bbox(std::move(create_flattened_bbox(sub_obj_roi->get_bbox(), roi->get_bbox())));
| \~~~^~~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~
/usr/include/hailo/tappas/hailo_common.hpp:256:48: note: remove ā€˜std::move’ call
../cpp/yolov8pose_postprocess.cpp: In function ā€˜std::vector decode_boxes_and_keypoints(std::vector<std::shared_ptr >, xt::xarray, std::vector<std::shared_ptr >, std::vector, std::vector, int)’:
../cpp/yolov8pose_postprocess.cpp:215:52: error: ā€˜using std::\__shared_ptr_access<HailoTensor, \__gnu_cxx::\_S_atomic, false, false>::element_type = class HailoTensor’ {aka ā€˜class HailoTensor’} has no member named ā€˜vstream_info’
215 | float32_t qp_scale = raw_boxes_outputs\[i\]->vstream_info().quant_info.qp_scale;
| ^\~\~\~\~\~\~\~\~\~\~\~
../cpp/yolov8pose_postprocess.cpp:216:49: error: ā€˜using std::\__shared_ptr_access<HailoTensor, \__gnu_cxx::\_S_atomic, false, false>::element_type = class HailoTensor’ {aka ā€˜class HailoTensor’} has no member named ā€˜vstream_info’
216 | float32_t qp_zp = raw_boxes_outputs\[i\]->vstream_info().quant_info.qp_zp;
| ^\~\~\~\~\~\~\~\~\~\~\~
../cpp/yolov8pose_postprocess.cpp:226:53: error: ā€˜using std::\__shared_ptr_access<HailoTensor, \__gnu_cxx::\_S_atomic, false, false>::element_type = class HailoTensor’ {aka ā€˜class HailoTensor’} has no member named ā€˜vstream_info’
226 | float32_t qp_scale_kpts = raw_keypoints\[i\]->vstream_info().quant_info.qp_scale;
| ^\~\~\~\~\~\~\~\~\~\~\~
../cpp/yolov8pose_postprocess.cpp:227:50: error: ā€˜using std::\__shared_ptr_access<HailoTensor, \__gnu_cxx::\_S_atomic, false, false>::element_type = class HailoTensor’ {aka ā€˜class HailoTensor’} has no member named ā€˜vstream_info’
227 | float32_t qp_zp_kpts = raw_keypoints\[i\]->vstream_info().quant_info.qp_zp;
| ^\~\~\~\~\~\~\~\~\~\~\~
../cpp/yolov8pose_postprocess.cpp:228:9: error: ā€˜hailo_format_type_t’ was not declared in this scope
228 | hailo_format_type_t keypoints_format = raw_keypoints\[i\]->vstream_info().format.type;
| ^\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~
../cpp/yolov8pose_postprocess.cpp:229:13: error: ā€˜keypoints_format’ was not declared in this scope
229 | if (keypoints_format == HAILO_FORMAT_TYPE_UINT8)
| ^\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~
../cpp/yolov8pose_postprocess.cpp:229:33: error: ā€˜HAILO_FORMAT_TYPE_UINT8’ was not declared in this scope; did you mean ā€˜HailoTensorFormatType::HAILO_FORMAT_TYPE_UINT8’?
229 | if (keypoints_format == HAILO_FORMAT_TYPE_UINT8)
| ^\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~
| HailoTensorFormatType::HAILO_FORMAT_TYPE_UINT8
In file included from /usr/include/hailo/tappas/hailo_tensors.hpp:11,
from /usr/include/hailo/tappas/hailo_objects.hpp:12,
from /usr/include/hailo/tappas/hailo_xtensor.hpp:7,
from ../cpp/yolov8pose_postprocess.cpp:10:
/usr/include/hailo/hailo_gst_tensor_metadata.hpp:28:5: note: ā€˜HailoTensorFormatType::HAILO_FORMAT_TYPE_UINT8’ declared here
28 | HAILO_FORMAT_TYPE_UINT8 = 1,
| ^\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~\~
../cpp/yolov8pose_postprocess.cpp: In function ā€˜Triple get_boxes_scores_keypoints(std::vector<std::shared_ptr >&, int, int)’:
../cpp/yolov8pose_postprocess.cpp:326:109: error: ā€˜using std::\__shared_ptr_access<HailoTensor, \__gnu_cxx::\_S_atomic, false, false>::element_type = class HailoTensor’ {aka ā€˜class HailoTensor’} has no member named ā€˜vstream_info’
326 | auto dequantized_output_s = common::dequantize(common::get_xtensor(tensors\[i + 1\]), tensors\[i + 1\]->vstream_info().quant_info.qp_scale, tensors\[i + 1\]->vstream_info().quant_info.qp_zp);
| ^\~\~\~\~\~\~\~\~\~\~\~
../cpp/yolov8pose_postprocess.cpp:326:161: error: ā€˜using std::\__shared_ptr_access<HailoTensor, \__gnu_cxx::\_S_atomic, false, false>::element_type = class HailoTensor’ {aka ā€˜class HailoTensor’} has no member named ā€˜vstream_info’
326 | auto dequantized_output_s = common::dequantize(common::get_xtensor(tensors\[i + 1\]), tensors\[i + 1\]->vstream_info().quant_info.qp_scale, tensors\[i + 1\]->vstream_info().quant_info.qp_zp);
| ^\~\~\~\~\~\~\~\~\~\~\~
ninja: build stopped: subcommand failed.
ERROR:hailo_apps.hailo_app_python.core.installation.compile_cpp:C++ postprocess build failed (exit 1)

Hey there, @Marcus317122, and welcome to the forum. Glad to have you here.

Which Raspbian OS are you running Bookworm or Trixie? I have seen a lot of these YOLO Detection Guides start to have issues when running Trixie OS and I can see you’re the first comment on this guide since Trixie came out. These errors all seem based on lacking older modules, I’m seeing a lot of the line:

No module named 'urllib.parse'

Which makes sense. If the script can’t parse URLs, it’s going to have difficulty downloading everything it needs to install.

So if you are using Bookworm already, please let me know and we can perform more troubleshooting. Otherwise, could you please try a fresh Bookworm image and start the guide again and let me know how it goes.

1 Like