I’m encountering an issue with the face recognition code in Hailo. Despite following the documentation, I’m facing some errors that I can’t seem to resolve. Here are the specifics of the problem:
The code compiles without errors, but the face recognition feature does not work as expected.
I’ve checked the API keys and permissions, but the issue persists.
Any suggestions on debugging this problem would be greatly appreciated.
Has anyone else faced similar issues? I’d love to hear your thoughts or solutions!
Hi @hayriaki12,
What is the issue? can you share a picture that examplify it? Are you using a netrwork that you’ve trained? does it work in native format (ONNX, tflite, torch)?
@hayriaki12,
I also ran into issues with the face recognition application.
For me, the jpeg images I provided were the cause of the issue (the hailo provided jpeg images worked fine).
I was getting a Segmentation fault in when running face_recognition in train mode.
My issue was solved by saving my images as PNG (instead of JPEG).
If you have a similar issue, here are some debug steps you can follow:
launch the demo with the “–debug” option to view the gstreamer pipeline that is being used
copy this gstreamer pipeline, and launch it manually with “gst-launch-1.0 {pipeline}“
this will give you insight into possible issues
I was getting the following error with my JPG images:
Setting pipeline to PAUSED … Pipeline is PREROLLING … ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstJpegDec:jpegdec0: Failed to decode JPEG image Additional debug info: ../ext/jpeg/gstjpegdec.c(1569): gst_jpeg_dec_handle_frame (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstJpegDec:jpegdec0: Decode error #21: Improper call to JPEG library in state 205 ERROR: pipeline doesn’t want to preroll. ERROR: from element /GstPipeline:pipeline0/GstMultiFileSrc:multifilesrc0: Internal data stream error. Additional debug info: ../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstMultiFileSrc:multifilesrc0: streaming stopped, reason error (-5) ERROR: pipeline doesn’t want to preroll. Setting pipeline to NULL … Freeing pipeline …
I believe this gstreamer pipeline error was the cause of the segmentation fault in the demo.
Once again, the issue went away when I used PNG images instead.
The root cause is malformed or non-standard JPEG encoding.
GStreamer’s jpegdec element uses libjpeg to decode images, and some JPEG files — while displayable in browsers and image viewers (which are more forgiving) — contain encoding that violates the JPEG spec. The error Improper call to JPEG library in state 205 means libjpeg hit an unexpected marker or corrupt segment in the JPEG data stream and aborted.
Common causes:
Progressive JPEG encoding that gstjpegdec doesn’t handle well
EXIF/metadata corruption from phone cameras or editing tools
Non-standard color space (e.g., CMYK JPEG instead of YCbCr)
Truncated or re-saved JPEGs with broken Huffman tables
Images with embedded ICC profiles** that confuse the decoder
PNG works because it uses a completely different codec (pngdec) that doesn’t have this issue — PNG encoding is simpler and more strictly standardized.