Git Product home page Git Product logo

Comments (25)

christopher-beckham avatar christopher-beckham commented on August 10, 2024

Hi lzxzy,

Thanks for the bug report. Just some questions:

  • What operating system are you using (if Linux, what distro)?
  • Can you attach the output of cmake / make when you built the server? This might give some useful information.
  • Does the segfault still happen if you run the example as described here?

@srajotte I have added you since you'll probably have a better idea of this than I do. Would it help if we had the core dump file? (Not that I dabble in such things...)

from depthnets.

srajotte avatar srajotte commented on August 10, 2024

@srajotte I have added you since you'll probably have a better idea of this than I do. Would it help if we had the core dump file? (Not that I dabble in such things...)

For now, having the answer to the three points you mentioned would be more helpful than a core dump.

Assuming FaceWarperServer successfully compiled, a possible source of the problem is if the destination directory doesn't exist or the source files (images, keypoints, etc.) don't exist. FaceWarperServer assumes that all input files are valid and exist. If a file or the destination directory doesn't exist, there is a high probability of a crash.

I suppose the Python script that @lzxzy is using is DepthNets/cyclegan/data/celeba/run_facewarp.py. In this script, if a file doesn't exist, an error message will be printed, but the command will still be sent to FaceWarperServer. @lzxzy do you get a message starting with "PB" on the standard output before FaceWarperServer crashes?

from depthnets.

christopher-beckham avatar christopher-beckham commented on August 10, 2024

When I was running this a while ago, the python script would simply hang if a file or directory doesn’t exist, rather than segfault. If the example command in the facewarper works, then this would imply that maybe there’s a bug in my data prep script.

from depthnets.

srajotte avatar srajotte commented on August 10, 2024

Indeed, thinking about it again, I don't think a missing file/folder would generate a Segmentation fault. In this situation, FaceWarperServer should either hang or abort, but not segfault.

Knowing if the example works correctly would really help to pinpoint the source of the problem.

from depthnets.

lzxzy avatar lzxzy commented on August 10, 2024

Hi lzxzy,

Thanks for the bug report. Just some questions:

  • What operating system are you using (if Linux, what distro)?
  • Can you attach the output of cmake / make when you built the server? This might give some useful information.
  • Does the segfault still happen if you run the example as described here?

@srajotte I have added you since you'll probably have a better idea of this than I do. Would it help if we had the core dump file? (Not that I dabble in such things...)

Thanks for your reply
first I run the build_linux.sh in FaceWarperServer, and I got this:

 -- The C compiler identification is GNU 5.4.0
 -- The CXX compiler identification is GNU 5.4.0
 -- Check for working C compiler: /usr/bin/cc
 -- Check for working C compiler: /usr/bin/cc -- works
 -- Detecting C compiler ABI info
 -- Detecting C compiler ABI info - done
 -- Detecting C compile features
 -- Detecting C compile features - done
 -- Check for working CXX compiler: /usr/bin/c++
 -- Check for working CXX compiler: /usr/bin/c++ -- works
 -- Detecting CXX compiler ABI info
 -- Detecting CXX compiler ABI info - done
 -- Detecting CXX compile features
 -- Detecting CXX compile features - done
 -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8") 
 -- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found version "1.2.54") 
 -- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so   
 -- Found GLUT: /usr/lib/x86_64-linux-gnu/libglut.so  
 -- Found GLEW: /usr/include  
 -- Configuring done
 -- Generating done
 -- Build files have been written to: 
 /media/liuzongxuan/disk2/workspace/github/DepthNets/FaceWarper/FaceWarperServer/build

It seems pass the build, and When I cd builddictionary , I found there nothing named FaceWarperServer, so I run the make command, finally I got this:

Scanning dependencies of target FaceWarperServer
[ 33%] Building CXX object CMakeFiles/FaceWarperServer.dir/source/FaceWarper.cpp.o
[ 66%] Building CXX object CMakeFiles/FaceWarperServer.dir/source/shader.cpp.o
[100%] Linking CXX executable FaceWarperServer
[100%] Built target FaceWarperServer

Looks make successfully also.
But when I run ' python run_facewarp.py --results_dir=frontalized_faces '
I still got the problem:

/media/liuzongxuan/disk2/workspace/github/DepthNets/FaceWarper/FaceWarperServer/build/FaceWarperServer
Segmentation fault (core dumped)

from depthnets.

srajotte avatar srajotte commented on August 10, 2024

If you execute FaceWarperServer by itself (run build/FaceWarperServer), does it segfault?
If you run the example, does it segfault?

from depthnets.

lzxzy avatar lzxzy commented on August 10, 2024

If you execute FaceWarperServer by itself (run build/FaceWarperServer), does it segfault?
If you run the example, does it segfault?

Yes , when I run FaceWarperServer, It still got segmentation fault (core dumped)

from depthnets.

lzxzy avatar lzxzy commented on August 10, 2024

If you execute FaceWarperServer by itself (run build/FaceWarperServer), does it segfault?
If you run the example, does it segfault?

and when run the example you raised , I got nothing. Nothing output either error imformation

from depthnets.

srajotte avatar srajotte commented on August 10, 2024

If FaceWarperServer crashes with a segfault by itself, then there is a problem with the executable.

I don't know what might cause this problem. My first hypothesis would be an incompatibility with one of the shared libraries (zlib/libpng/freeglut/opengl).

from depthnets.

lzxzy avatar lzxzy commented on August 10, 2024

If FaceWarperServer crashes with a segfault by itself, then there is a problem with the executable.

I don't know what might cause this problem. My first hypothesis would be an incompatibility with one of the shared libraries (zlib/libpng/freeglut/opengl).

Ok, thanks for your reply
I'll try to re-install opengllib and see what happen
Thanks again

from depthnets.

christopher-beckham avatar christopher-beckham commented on August 10, 2024

What is the operating system you're using?

Hmm so maybe ldconfig would be useful to use to figure out what versions the libraries are??

from depthnets.

lzxzy avatar lzxzy commented on August 10, 2024

What is the operating system you're using?

Hmm so maybe ldconfig would be useful to use to figure out what versions the libraries are??

ubuntu 16.04
my opengl lib installed is normal
but I still got the problem

from depthnets.

lzxzy avatar lzxzy commented on August 10, 2024

What is the operating system you're using?

Hmm so maybe ldconfig would be useful to use to figure out what versions the libraries are??

when I use dmesg to show the error info
I got this
FaceWarperServe[31903]: segfault at 0 ip 0000000000000000 sp 00007ffe39459e68 error 14 in FaceWarperServer[400000+19000]

from depthnets.

christopher-beckham avatar christopher-beckham commented on August 10, 2024

@srajotte is there an easy way for him to figure out the versions of all the libraries which the server is dependent on?

I know this doesn't help much, but if you have Ubuntu 18.04 (rather than 16.04) it should work. We've both compiled and run it successfully on this version.

from depthnets.

srajotte avatar srajotte commented on August 10, 2024

You can use ldd to know the dependencies and where the linker finds them. For example, when I run ldd -v FaceWarperServer on Ubuntu 18.04, I get the output in this file.

@lzxzy you might want to try to run this command and copy the output to see if something seems strange. Since you are using a different distribution version, the version of all the libraries will probably be different. It isn't a bad thing, but it makes spotting a problem very difficult.

Another thing that would help is run FaceWarperServer within gdb and get a backtrace.

from depthnets.

lzxzy avatar lzxzy commented on August 10, 2024

You can use ldd to know the dependencies and where the linker finds them. For example, when I run ldd -v FaceWarperServer on Ubuntu 18.04, I get the output in this file.

@lzxzy you might want to try to run this command and copy the output to see if something seems strange. Since you are using a different distribution version, the version of all the libraries will probably be different. It isn't a bad thing, but it makes spotting a problem very difficult.

Another thing that would help is run FaceWarperServer within gdb and get a backtrace.

Thanks for reply, I had tried use gdb to found where the problem is , but it even can't going to the fist line in the main function, I set the break point at the first line in main function, and I run the gdb command r, it send out the same error immediately. I don't know what the problem is that can lead this.
I'll use the ldd method to try to found is there any different between 16.04 and 18.04 version, tomorrow

from depthnets.

christopher-beckham avatar christopher-beckham commented on August 10, 2024

Thanks!!! We would love to know what’s different between the two Ubuntu versions. It would really help out others in the future who may get stuck as well.

from depthnets.

lzxzy avatar lzxzy commented on August 10, 2024

Thanks!!! We would love to know what’s different between the two Ubuntu versions. It would really help out others in the future who may get stuck as well.

Hi, I have tried the ldd and there are really many differents. But I can't local wihch different could lead the problem, and this is my file

from depthnets.

srajotte avatar srajotte commented on August 10, 2024

Your problem looks similar to this problem on StackOverflow. For some reason, your executable doesn't link to libpthread. If you try this command :
LD_PRELOAD=/lib/x86_64-linux-gnu/libpthread.so.0 ./FaceWarperServer
does FaceWarperServer execute without crashing?

from depthnets.

lzxzy avatar lzxzy commented on August 10, 2024

Your problem looks similar to this problem on StackOverflow. For some reason, your executable doesn't link to libpthread. If you try this command :
LD_PRELOAD=/lib/x86_64-linux-gnu/libpthread.so.0 ./FaceWarperServer
does FaceWarperServer execute without crashing?

Yeah I think it's the same error as me, but I run the command nothing change. I think it maybe Nvidia driver with OpenGL occur some error or something else.

from depthnets.

lzxzy avatar lzxzy commented on August 10, 2024

Your problem looks similar to this problem on StackOverflow. For some reason, your executable doesn't link to libpthread. If you try this command :
LD_PRELOAD=/lib/x86_64-linux-gnu/libpthread.so.0 ./FaceWarperServer
does FaceWarperServer execute without crashing?

Hi guys , tanks for your suggestions. I'm happy to tell you I solved the problem. It seems that you are right @srajotte . but ues LD_PRELOAD=/lib/x86_64-linux-gnu/libpthread.so.0 ./FaceWarperServer doesn't useful. Instead I insert a line in CMakeLists.txt:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread") and it works.
Thank you guys again, I'm so excited HAHA.

from depthnets.

srajotte avatar srajotte commented on August 10, 2024

Good news! Thanks for taking the time to try to solve this problem.
For future reference, this Ubuntu bug report seems to be related to the problem you experienced : https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-319/+bug/1248642

from depthnets.

srajotte avatar srajotte commented on August 10, 2024

I have edited the CMakeLists.txt to force the compiler to use the "-pthread" flag on Linux systems.

@lzxzy could you try the fix to make sure it works on your system.

from depthnets.

lzxzy avatar lzxzy commented on August 10, 2024

I have edited the CMakeLists.txt to force the compiler to use the "-pthread" flag on Linux systems.

@lzxzy could you try the fix to make sure it works on your system.

yes it works.
and I have the another question. which section can I achieve face rotation in this work.

from depthnets.

christopher-beckham avatar christopher-beckham commented on August 10, 2024

Cool if it's fixed we can close the issue.

With regard to to the face rotation, see this section of the readme in the depthnet-pytorch folder:

https://github.com/joelmoniz/DepthNets/blob/master/depthnet-pytorch/README.md#warping-a-source-face-to-a-rotating-target-face

With the export_anim_to_facewarper.py script, you can either rotate the source face directly, or warp the source face to rotations of a target face. In short, once you have the depth of the source face, you can compute the affine matrix needed to perform the rotation (there are some helper functions for that, like these here).

If you have any more questions regarding this, you can open up a new issue and we'll discuss it there.

from depthnets.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.