I am trying to use scrfd_10g to do face detection test on rpi5+hailo8. The python file I created is based on haio-rpi5-examples.
I have changed the post process file and function name correspondingly as the following:
self.default_post_process_so = os.path.join(self.postprocess_dir, 'libscrfd_post.so')
self.post_function_name = "scrfd_10g"
def get_pipeline_string(self):
source_pipeline = SOURCE_PIPELINE(self.video_source)
# detection_pipeline = DETECTION_PIPELINE(hef_path=self.hef_path, batch_size=self.batch_size, labels_json=self.labels_json, additional_params=self.thresholds_str)
infer_pipeline = INFERENCE_PIPELINE(
hef_path=self.hef_path,
post_process_so=self.default_post_process_so,
post_function_name=self.post_function_name
)
user_callback_pipeline = USER_CALLBACK_PIPELINE()
display_pipeline = DISPLAY_PIPELINE(video_sink=self.video_sink, sync=self.sync, show_fps=self.show_fps)
pipeline_string = (
f'{source_pipeline} '
f'{infer_pipeline} ! '
f'{user_callback_pipeline} ! '
f'{display_pipeline}'
)
print(pipeline_string)
return pipeline_string
But I get a weird error:
(venv_hailo_rpi5_examples) pi2@pi2:~/desui/hailo-rpi5-examples $ python basic_pipelines/face_detection.py --network face_detect --input rpi -f
libcamerasrc name=source ! video/x-raw, format=RGB, width=1536, height=864 ! queue name=source_scale_q leaky=no max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoscale name=source_videoscale n-threads=2 ! queue name=source_convert_q leaky=no max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoconvert n-threads=3 name=source_convert qos=false ! video/x-raw, format=RGB, pixel-aspect-ratio=1/1 ! queue name=inference_scale_q leaky=no max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoscale name=inference_videoscale n-threads=2 qos=false ! queue name=inference_convert_q leaky=no max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! video/x-raw, pixel-aspect-ratio=1/1 ! videoconvert name=inference_videoconvert n-threads=2 ! queue name=inference_hailonet_q leaky=no max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hailonet name=inference_hailonet hef-path=/home/pi2/desui/hailo-rpi5-examples/basic_pipelines/../resources/scrfd_10g.hef batch-size=1 force-writable=true ! queue name=inference_hailofilter_q leaky=no max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hailofilter name=inference_hailofilter so-path=/usr/lib/aarch64-linux-gnu/hailo/tappas/post_processes/libscrfd_post.so function-name=scrfd_10g qos=false ! queue name=identity_callback_q leaky=no max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! identity name=identity_callback ! queue name=hailo_display_hailooverlay_q leaky=no max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! hailooverlay name=hailo_display_hailooverlay ! queue name=hailo_display_videoconvert_q leaky=no max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! videoconvert name=hailo_display_videoconvert n-threads=2 qos=false ! queue name=hailo_display_q leaky=no max-size-buffers=3 max-size-bytes=0 max-size-time=0 ! fpsdisplaysink name=hailo_display video-sink=xvimagesink sync=false text-overlay=true signal-fps-measurements=true
Showing FPS
[5:59:09.361815433] [443608] INFO Camera camera_manager.cpp:325 libcamera v0.3.2+27-7330f29b
[5:59:09.370223494] [443623] INFO RPI pisp.cpp:695 libpisp version v1.0.7 28196ed6edcf 29-08-2024 (16:33:32)
[5:59:09.380432402] [443623] INFO RPI pisp.cpp:1154 Registered camera /base/axi/pcie@120000/rp1/i2c@88000/ov5647@36 to CFE device /dev/media2 and ISP device /dev/media0 using PiSP variant BCM2712_C0
Config file doesn't exist, using default parameters
terminate called after throwing an instance of 'std::runtime_error'
what(): Function name is not valid, should be lightface or retinaface
Aborted
I have checked the libscrfd_post.so, and confirm that this so file contains scrfd_10g function.
Why the script still suggest lightface or retinaface while I have choosed libscrfd_post.so as the postprocess file. Did I miss any steps?
regards.
Desuikong