Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to turn off the display before building OpenFace? #1076

Closed
ismeyueyue opened this issue Feb 23, 2024 · 3 comments
Closed

How to turn off the display before building OpenFace? #1076

ismeyueyue opened this issue Feb 23, 2024 · 3 comments

Comments

@ismeyueyue
Copy link

ismeyueyue commented Feb 23, 2024

Describe the bug

I have successfully installed OpenFace on my server (Python application) which lack of GUI.

However, when run the test demo on videos, an error of display occurred as below
run

./bin/FaceLandmarkVid -f "../samples/changeLighting.wmv" -f "../samples/2015-10-15-15-14.avi"

get error msg:

Could not find the HAAR face detector location
Reading the landmark detector/tracker from: ./bin/model/main_ceclm_general.txt
Reading the landmark detector module from: ./bin/model/cen_general.txt
Reading the PDM module from: ./bin/model/pdms/In-the-wild_aligned_PDM_68.txt....Done
Reading the Triangulations module from: ./bin/model/tris_68.txt....Done
Reading the intensity CEN patch experts from: ./bin/model/patch_experts/cen_patches_0.25_of.dat....Done
Reading the intensity CEN patch experts from: ./bin/model/patch_experts/cen_patches_0.35_of.dat....Done
Reading the intensity CEN patch experts from: ./bin/model/patch_experts/cen_patches_0.50_of.dat....Done
Reading the intensity CEN patch experts from: ./bin/model/patch_experts/cen_patches_1.00_of.dat....Done
Reading part based module....left_eye_28
Reading the landmark detector/tracker from: ./bin/model/model_eye/main_clnf_synth_left.txt
Reading the landmark detector module from: ./bin/model/model_eye/clnf_left_synth.txt
Reading the PDM module from: ./bin/model/model_eye/pdms/pdm_28_l_eye_3D_closed.txt....Done
Reading the intensity CCNF patch experts from: ./bin/model/model_eye/patch_experts/left_ccnf_patches_1.00_synth_lid_.txt....Done
Reading the intensity CCNF patch experts from: ./bin/model/model_eye/patch_experts/left_ccnf_patches_1.50_synth_lid_.txt....Done
Could not find the HAAR face detector location
Done
Reading part based module....right_eye_28
Reading the landmark detector/tracker from: ./bin/model/model_eye/main_clnf_synth_right.txt
Reading the landmark detector module from: ./bin/model/model_eye/clnf_right_synth.txt
Reading the PDM module from: ./bin/model/model_eye/pdms/pdm_28_eye_3D_closed.txt....Done
Reading the intensity CCNF patch experts from: ./bin/model/model_eye/patch_experts/ccnf_patches_1.00_synth_lid_.txt....Done
Reading the intensity CCNF patch experts from: ./bin/model/model_eye/patch_experts/ccnf_patches_1.50_synth_lid_.txt....Done
Could not find the HAAR face detector location
Done
Reading the landmark validation module....Done
Attempting to read from file: ../samples/changeLighting.wmv
Device or file opened
Starting tracking
Reading the MTCNN face detector from: ./bin/model/mtcnn_detector/MTCNN_detector.txt
Reading the PNet module from: ./bin/model/mtcnn_detector/PNet.dat
Reading the RNet module from: ./bin/model/mtcnn_detector/RNet.dat
Reading the ONet module from: ./bin/model/mtcnn_detector/ONet.dat

(tracking result:66010): Gtk-WARNING **: 19:04:15.093: cannot open display:

Therefore, if there is an option to turn off the display before building OpenFace?
I just need save the landmark detection results.

Thanks.

@brmarkus
Copy link

brmarkus commented Feb 23, 2024

The mentioned sample has a GUI, using OpenCV to display images/frames.
Have you tried using the sample `FeatureExtraction´ instead?
You could disable all the visualizations via command line arguments:

-vis-track visualise the tracked face
-vis-hog visualise the HOG features
-vis-align visualise similarity aligned faces
-vis-aus visualise Action Units

(all from "https://github.com/TadasBaltrusaitis/OpenFace/wiki/Command-line-arguments")

But I haven't tried it just now...

@ismeyueyue
Copy link
Author

ismeyueyue commented Feb 26, 2024

thanks for you replay!
The FeatureExtraction commond is work for me, which has save the detect .csv result.

The arguments like -vis-track is just turn on the visualise the tracked face, and no relevant way to turn off these visualizations...

The mentioned sample has a GUI, using OpenCV to display images/frames. Have you tried using the sample `FeatureExtraction´ instead? You could disable all the visualizations via command line arguments:

-vis-track visualise the tracked face
-vis-hog visualise the HOG features
-vis-align visualise similarity aligned faces
-vis-aus visualise Action Units

(all from "https://github.com/TadasBaltrusaitis/OpenFace/wiki/Command-line-arguments")

But I haven't tried it just now...

@abdur75648
Copy link

Hey @ismeyueyue ,

I encountered the same issue when running OpenFace without a GUI. The application requires a display for its operations.

One effective solution is to use X11 forwarding. This approach works well, especially in scenarios involving Docker containers that need a DISPLAY. If you're on a Mac, you can follow this guide for setting up X11 forwarding.

Additionally, you might consider using FaceLandmarkVidMulti instead of FaceLandmarkVid. The former doesn't require a display and should work fine for your needs.

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants