TadasBaltrusaitis / OpenFace

OpenFace – a state-of-the art tool intended for facial landmark detection, head pose estimation, facial action unit recognition, and eye-gaze estimation.
Other
6.71k stars 1.82k forks source link

libdc1394 error: Failed to initialize libdc1394,Could not find the HAAR face detector location,(sim_warp:19): Gtk-WARNING **: cannot open display: #1056

Open dizhenx opened 9 months ago

dizhenx commented 9 months ago

微信截图_20230914134533 When docker run ./build/bin/FeatureExtraction -verbose -f "obama.mp4",this error happened above。And,the output has no csv file,the aligned directory:obama_aligned is empty。How to solve it?

l-dawei commented 9 months ago

I have also encountered this problem. Have you resolved it? If I receive your reply, I would greatly appreciate it.

brmarkus commented 9 months ago

From several similiar issues mentioning the same "error" - do you have a monitor connected to your system or have X/X11-display-forwarding configured and enabled? The application won't work if it cannot render on a screen - either directly connected or via X11-forwarding.

(with working with Docker, make sure to have the X/X11 env variable DISPLAY set)

Neither "Failed to initialize libdc1394" nor "Could not find the HAAR face detector location" are critical errors.

lucasjinreal commented 7 months ago

Nothing to do with x11

brmarkus commented 7 months ago

Any other idea or new insights (other than missing display/monitor/EDID/display-forwarding)?

hnsywangxin commented 5 months ago

don't use -verbose

janpasha123 commented 3 months ago

I am also facing the same issue while inferencing video. Did Anyone resolved this issue? @hnsywangxin @l-dawei @lucasjinreal @dizhenx

brmarkus commented 3 months ago

The application won't work if no monitor is connected (or no display-forwarding).

janpasha123 commented 3 months ago

The application won't work if no monitor is connected (or no display-forwarding).

Can you please explain in-detail @brmarkus ?. I am trying to run it in docker. It was working for image but not working for video inference.

brmarkus commented 3 months ago

Can you provide more details about your environment (HW, SW) and which application you are trying to use (with which input, which command line parameters), and share the console output? Please describe what you see, what you expect, what you compared with getting which output, please? Depending on command line parameter and which application used, the application trieds to display frames using OpenCV (see also e.g. "https://github.com/TadasBaltrusaitis/OpenFace/issues/1076"). In headless server environments (no display connected, no screen forwarding, no VNC or similar) the application cannot get a frame with the annotations (bounding boxes, etc) displayed, and therefore OpenCV fails to open a window, and the application would terminate. You might try another sample application or use different command line parameters. Single images versus video file might reveal problems with the installed environment and e.g. missing SW- and/or HW-accelerated video-decoders (i.e. codes missing). You might need to run consistency checks e.g using gstreamer to check if your environment (SW and HW) is able to decode your video files, would be able to render (display) the frames.