hailo-ai / hailo-rpi5-examples

MIT License
161 stars 16 forks source link

XVideo extension is not available #3

Closed westwind027 closed 3 weeks ago

westwind027 commented 3 weeks ago

(venv_hailo_rpi5_examples) orcus@rasp5:~/Workspace/hailo-rpi5-examples $ python basic_pipelines/detection.py -i rpi hailomuxer name=hmux libcamerasrc name=src_0 auto-focus-mode=2 ! video/x-raw, format=RGB, width=1536, height=864 ! queue name=queue_src_scale max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoscale ! video/x-raw, format=RGB, width=640, height=640, framerate=30/1 ! queue name=queue_scale max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoscale n-threads=2 ! queue name=queue_src_convert max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoconvert n-threads=3 name=src_convert qos=false ! video/x-raw, format=RGB, width=640, height=640, pixel-aspect-ratio=1/1 ! tee name=t ! queue name=bypass_queue max-size-buffers=20 max-size-bytes=0 max-size-time=0 ! hmux.sink_0 t. ! queue name=queue_hailonet max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoconvert n-threads=3 ! hailonet hef-path=/home/orcus/Workspace/hailo-rpi5-examples/basic_pipelines/../resources/yolov6n.hef batch-size=2 nms-score-threshold=0.3 nms-iou-threshold=0.45 output-format-type=HAILO_FORMAT_TYPE_FLOAT32 force-writable=true ! queue name=queue_hailofilter max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hailofilter so-path=/usr/lib/aarch64-linux-gnu/hailo/tappas//post-process/libyolo_hailortpp_post.so qos=false ! queue name=queue_hmuc max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hmux.sink_1 hmux. ! queue name=queue_hailo_python max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! queue name=queue_user_callback max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! identity name=identity_callback ! queue name=queue_hailooverlay max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hailooverlay ! queue name=queue_videoconvert max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoconvert n-threads=3 qos=false ! queue name=queue_hailo_display max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! fpsdisplaysink video-sink=xvimagesink name=hailo_display sync=false text-overlay=False signal-fps-measurements=true Error: gst-resource-error-quark: Could not initialise Xv output (13), ../sys/xvimage/xvimagesink.c(1944): gst_xv_image_sink_open (): /GstPipeline:pipeline0/GstFPSDisplaySink:hailo_display/GstXvImageSink:xvimagesink0: XVideo extension is not available

(venv_hailo_rpi5_examples) orcus@rasp5:~/Workspace/hailo-rpi5-examples $ gst-inspect-1.0 hailotools Plugin Details: Name hailotools Description hailo tools plugin Filename /lib/aarch64-linux-gnu/gstreamer-1.0/libgsthailotools.so Version 3.28.2 License unknown Source module gst-hailo-tools Binary package gst-hailo-tools Origin URL https://hailo.ai/

hailoaggregator: hailoaggregator - Cascading hailocounter: hailocounter - postprocessing element hailocropper: hailocropper hailoexportfile: hailoexportfile - export element hailoexportzmq: hailoexportzmq - export element hailofilter: hailofilter - postprocessing element hailogallery: Hailo gallery element hailograytonv12: hailograytonv12 - postprocessing element hailoimportzmq: hailoimportzmq - import element hailomuxer: Muxer pipeline merging hailonv12togray: hailonv12togray - postprocessing element hailonvalve: HailoNValve element hailooverlay: hailooverlay - overlay element hailoroundrobin: Input Round Robin element hailostreamrouter: Hailo Stream Router hailotileaggregator: hailotileaggregator hailotilecropper: hailotilecropper - Tiling hailotracker: Hailo object tracking element

18 features: +-- 18 elements

(venv_hailo_rpi5_examples) orcus@rasp5:~/Workspace/hailo-rpi5-examples $ gst-inspect-1.0 hailo Plugin Details: Name hailo Description hailo gstreamer plugin Filename /lib/aarch64-linux-gnu/gstreamer-1.0/libgsthailo.so Version 1.0 License unknown Source module hailo Binary package GStreamer Origin URL http://gstreamer.net/

hailodevicestats: hailodevicestats element hailonet: hailonet element synchailonet: sync hailonet element

3 features: +-- 3 elements

westwind027 commented 3 weeks ago

fixed with modify the file --- detection.py

add 102 line

 90 class GStreamerDetectionApp(GStreamerApp):
 91     def __init__(self, args, user_data):
 92         # Call the parent class constructor
 93         super().__init__(args, user_data)
 94         # Additional initialization code can be added here
 95         # Set Hailo parameters these parameters shuold be set based on the model used
 96         self.batch_size = 2
 97         self.network_width = 640
 98         self.network_height = 640
 99         self.network_format = "RGB"
100         self.default_postprocess_so = os.path.join(self.postprocess_dir, 'libyolo_hailortpp_post.so')
101
102         self.video_sink = "ximagesink"
westwind027 commented 3 weeks ago

My fault , I use the ssh terminal, and not use the desktop version of raspian, when use lxde, It could run as expect