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

"QXcbConnection: Could not connect to display" #1

Closed
calufa opened this issue May 17, 2017 · 10 comments
Closed

"QXcbConnection: Could not connect to display" #1

calufa opened this issue May 17, 2017 · 10 comments

Comments

@calufa
Copy link

calufa commented May 17, 2017

Hi, thanks for the code.

I am having trouble running the code. I successfully compilee the project, but when I try to run ./face_swap_image --cfg test.cfg, I get the following error:

QXcbConnection: Could not connect to display
Aborted

I am running the code inside a docker container.

@YuvalNirkin
Copy link
Owner

The face swap applications require an OpenGL context to work.
This is done using Qt offscreen rendering.

I have no way to test the application in the same environment you do but try to follow this post I think it might help: http://stackoverflow.com/questions/25281992/alternatives-to-ssh-x11-forwarding-for-docker-containers/25334301#25334301

@sunjunlishi
Copy link

sunjunlishi commented May 28, 2017

bruce_willis_01
render
very cool ,i have got it

@YuvalNirkin
Copy link
Owner

Great! :)

@daili0015
Copy link

daili0015 commented Jul 18, 2017

I ran it on docker too, met the same problem. Finally solved it by switching to a docker image with desktop.
Now i successed:
out
It's really cool ! From face detection、face segment、3D models to face swap, that's amazing works !
——————————————————————————————————————
These are results on my docker container :
Under these cases , it performs well :
qq 20170718190054

But the below groups seem abnormal:
Group 1:
1
2
out
Group 2:
1
2
out
Group 3 (profile):
1
2
out
Group 4(size between face and nose、eyes、mouth):
1
2
out
——————————————————————————————————————
1、Noticing this https://github.com/YuvalNirkin/face_swap/issues/3 , i don't know whether it could be caused by my no GPU environment and those're just errors occur. So could you please run these pictures on your machine to cheak it?

@YuvalNirkin
Copy link
Owner

Congratulation! You got it working!
The issue is related to the algorithm as I do get about the same results:
demo_orig
This is a problem with the 3DMM fitting as you can see in the left debug image. It has issues with very high resolutions. Resizing the images can sometimes help:
demo_reduced

@akashgoyal
Copy link

Hi @YuvalNirkin
I am running this project on an AWS instance. And getting

QXcbConnection: Could not connect to display 
Aborted (core dumped)

Any luck running it on cloud ?

Thanks
Akash

@YuvalNirkin
Copy link
Owner

Hi @akashgoyal
I haven't tried running the project on a AWS instance but you can try one of the following solutions:
https://aws.amazon.com/about-aws/whats-new/2017/10/amazon-ec2-elastic-gpus-now-support-opengl-4-0-and-available-in-two-additional-regions/

https://comtechies.com/how-to-set-up-gui-on-amazon-ec2-ubuntu-server.html

Please confirm if any of those work for you.

@akashgoyal
Copy link

akashgoyal commented Feb 12, 2018

Hi @YuvalNirkin
I was trying https://comtechies.com/how-to-set-up-gui-on-amazon-ec2-ubuntu-server.html
And I am not able to proceed after step 2.

Is their a way to do this completely command line. Can you suggest on possible code changes ?

@YuvalNirkin
Copy link
Owner

You can replace the OpenGL renderer with a software renderer.

@tjusxh
Copy link

tjusxh commented Mar 1, 2018

I sovlve the QxcbConnection Could not connect to display by install XManager and "export Display=:localhost:11.0” in ~/.bashrc

But After that I come across the following question.

QXcbConnection: Failed to initialize XRandr
Could not initialize GLX
Aborted (core dumped)

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

6 participants