python basic_pipelines/detection.py --input resources/detection0.mp4
we get this error :
python basic_pipelines/detection.py --input resources/detection0.mp4
[HailoRT] [error] CHECK failed - Failed to create vdevice. there are not enough free devices. requested: 1, found: 0
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_OUT_OF_PHYSICAL_DEVICES(74)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_OUT_OF_PHYSICAL_DEVICES(74)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_OUT_OF_PHYSICAL_DEVICES(74)
[HailoRT] [error] CHECK_SUCCESS failed with status=HAILO_OUT_OF_PHYSICAL_DEVICES(74)
CHECK_EXPECTED failed with status=74
Showing FPS
Error: gst-resource-error-quark: Could not initialise Xv output (10), …/sys/xvimage/xvimagesink.c(1944): gst_xv_image_sink_open (): /GstPipeline:pipeline0/GstFPSDisplaySink:hailo_display/GstXvImageSink:xvimagesink0:
Could not open display (null)
It looks like there are two main issues you’re encountering:
1. HailoRT Error: Out of Physical Devices
The error HAILO_OUT_OF_PHYSICAL_DEVICES(74) indicates that the Hailo device is either not connected or not being detected by the system. Here are some steps to resolve it:
Check Device Connection: Ensure that the Hailo device is properly connected to the Raspberry Pi and is being recognized. You can confirm this by running:
hailortcli scan
If the device isn’t listed, check the physical connection and power to the device.
Free the Device: If other processes are using the device, they could be causing the issue. Restart the Raspberry Pi or kill any processes holding onto the device:
ps aux | grep hailo
kill -9 <PID> # Replace <PID> with the process ID using Hailo
2. GStreamer Error: Could not initialize Xv output
The error Could not open display (null) means that you’re running the script in a headless environment (such as over SSH), and xvimagesink (which requires a display) can’t find one.
Since you want to run the detection module without a GUI, you can replace the xvimagesink with either fakesink (to discard the output) or filesink (to save the video output).
Thank you so much for your help with the programming problem. I really
it ok
but i have another question :
I want to perform separate detection using my business , as I have some specific code I want to implement. Is this possible as in the following example?"
cap = cv2.VideoCapture("speed3.mp4")
while True:
success, frame = cap.read()
roi = hailo.get_roi_from_buffer(frame)
detections = roi.get_objects_typed(hailo.HAILO_DETECTION)
can I do that I try but I ger this error:
/home/rasai/kh/hailo-rpi5-examples/basic_pipelines/detection.py:99: Warning: g_type_set_qdata: assertion ‘quark != 0’ failed
roi = hailo.get_roi_from_buffer(frame)
Segmentation fault
You can open camera/video using cv2 and read the frames and queue them. HailoAsyncInference will process and queue them to output queue and you can process the result.
I’m trying to follow the previous example I mentioned in my last email, but when downloading this library, I can’t select the version.
pip install hailort-X.X.X-cpXX-cpXX-linux_x86_64.whl
in my server :
(hailo_env) rasai@raspberrypi:~/kh/kh10 $ pip install ./hailort-4.17.0-cp311-cp311-linux_aarch64.whl
WARNING: Requirement ‘./hailort-4.17.0-cp311-cp311-linux_aarch64.whl’ looks like a filename, but the file does not exist
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: ‘/home/rasai/kh/kh10/hailort-4.17.0-cp311-cp311-linux_aarch64.whl’
i found hailo library but i get error : virtualenv -p python3.10 hailo_platform_venv && . hailo_platform_venv/bin/activate && pip install ./hailort-4.17.0-cp310-cp310-linux_x86_64.whl
created virtual environment CPython3.10.0.final.0-64 in 1744ms
creator CPython3Posix(dest=/home/rasai/kh/kh10/hailo_platform_venv, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/rasai/.local/share/virtualenv)
added seed packages: pip==23.0.1, setuptools==66.1.1, wheel==0.38.4
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
WARNING: Requirement ‘./hailort-4.17.0-cp310-cp310-linux_x86_64.whl’ looks like a filename, but the file does not exist
Looking in indexes: Simple index, piwheels - Simple index
ERROR: hailort-4.17.0-cp310-cp310-linux_x86_64.whl is not a supported wheel on this platform.
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: ‘/home/rasai/kh/kh10/hailort-4.17.0-cp310-cp310-linux_aarch64.whl’
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: ‘/home/rasai/kh/kh10/hailort-4.17.0-cp310-cp310-linux_aarch64.whl’