YuvalNirkin / face_swap

End-to-end, automatic face swapping pipeline
GNU General Public License v3.0
822 stars 203 forks source link

"QXcbConnection: Could not connect to display" #1

Closed calufa closed 7 years ago

calufa commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

bruce_willis_01 render very cool ,i have got it

YuvalNirkin commented 7 years ago

Great! :)

daili0015 commented 7 years ago

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 commented 7 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

You can replace the OpenGL renderer with a software renderer.

tjusxh commented 6 years ago

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)