jmccormac / pySceneNetRGBD

Scripts showing how to work with the SceneNetRGBD dataset
GNU General Public License v3.0
178 stars 46 forks source link

Error when running room_camera_intersection #15

Closed juanhotencoding closed 6 years ago

juanhotencoding commented 6 years ago

Hello

I am trying to reproduce the synthetic scene generation pipeline and I am running into an error after I have created the scene_descriptions.txt file where I move onto running the room_camera_intersection.

I get the following error:

terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid Aborted (core dumped)

update:

I am now getting a seg fault error when I try running: ./room_camera_intersection ../../../shapenetdata/ShapeNetCore.v2/ ../../../scenenetlayouts/ ../../scene_generator/build/scene_description.txt

Here is the error:

ShapeNet directory:../../../shapenetdata/ShapeNetCore.v2/ Layouts directory:../../../scenenetlayouts/ Input Scene Description:../../scene_generator/build/scene_description.txt Loading my scene Segmentation fault (core dumped)

Sorry, I did not see that I was not providing the full path to the SceneNet Layouts.

I am now at the point where I think I have successfully created the scene_descriptions.txt then I run the ./room_camera_intersection command but I do not get a scene_and_trajectory_description.txt to use on the renderer command.

juanhotencoding commented 6 years ago

I was able to get scene_and_trajectory_description.txt but when I try to render I get the following error:

RANDOM TEXTURE AND LIGHT NUMBER:41599928 .//render_info.log There are 1 devices terminate called after throwing an instance of 'optix::Exception' what(): Parse error (Details: Function "RTresult _rtProgramCreateFromPTXFile(RTcontext, const char, const char, RTprogram_api**)" caught exception: The supplied PTX requires at least one device with SM 61 or greater.) Aborted (core dumped)

jmccormac commented 6 years ago

It looks like the GPU you are using does not support the architecture version of the compiled PTX files. You can edit that in the CMakeLists.txt line: 18 to suit your GPU. Nvidia has a list here. If you click on 'CUDA-Enabled GeForce Products' and find your GPU and its 'Compute Capability' e.g. For a GTX 770 it has Compute Capability 3.0 for which you would use 30 as written below:

SET(CUDA_NVCC_FLAGS   "-arch=compute_30 -code=sm_30"  "--use_fast_math" "-O3" "-lineinfo" "-Xcompiler") 
juanhotencoding commented 6 years ago

Thanks that was able to get me past that error. I am now running into an issue with the renderer terminating after throwing a 'CVD::Exceptions::Image_IO::UnsupportedImageSubType' how should I go about handling this?

jmccormac commented 6 years ago

Sorry for the delay, I have now managed to replicate this issue with some of the textures in ShapeNetCore.v2. The problem seems to be from the interlacing type in some of the png files. I think I've managed to fix it by converting all of the texture pngs using ImageMagick. Below is an example code you can run

find ./ShapeNetCore.v2 -type f -name "*.png" -exec convert -interlace none -define png:color-type=6 {} {} \;

Let me know if this fixes it, I'll add it to the README as well.

juanhotencoding commented 6 years ago

Do I need to convert all of the texture pngs using ImageMagick as well? Or do I just need to run the commands you provided?

Actually just running the command seemed to work. I get the following output though:

arpg@brix:~/Documents/scenenet/shapenetdata$ find ShapeNetCore.v2/ -type f -name "*.png" -exec convert -interlace none -define png:color-type=6 {} {} \; convert: Buffer error in compressed datastream in iCCP chunk ShapeNetCore.v2/04401088/e0355773a18fc61224d795aabf4bd88/images/texture5.png' @ warning/png.c/MagickPNGWarningHandler/1669. convert: Profile size field missing from iCCP chunkShapeNetCore.v2/04401088/e0355773a18fc61224d795aabf4bd88/images/texture5.png' @ warning/png.c/MagickPNGWarningHandler/1669. convert: Buffer error in compressed datastream in iCCP chunk ShapeNetCore.v2/04401088/e0355773a18fc61224d795aabf4bd88/images/texture7.png' @ warning/png.c/MagickPNGWarningHandler/1669. convert: Profile size field missing from iCCP chunkShapeNetCore.v2/04401088/e0355773a18fc61224d795aabf4bd88/images/texture7.png' @ warning/png.c/MagickPNGWarningHandler/1669. convert: Buffer error in compressed datastream in iCCP chunk ShapeNetCore.v2/04401088/e0355773a18fc61224d795aabf4bd88/images/texture0.png' @ warning/png.c/MagickPNGWarningHandler/1669. convert: Profile size field missing from iCCP chunkShapeNetCore.v2/04401088/e0355773a18fc61224d795aabf4bd88/images/texture0.png' @ warning/png.c/MagickPNGWarningHandler/1669. convert: Buffer error in compressed datastream in iCCP chunk ShapeNetCore.v2/04401088/e0355773a18fc61224d795aabf4bd88/images/texture3.png' @ warning/png.c/MagickPNGWarningHandler/1669. convert: Profile size field missing from iCCP chunkShapeNetCore.v2/04401088/e0355773a18fc61224d795aabf4bd88/images/texture3.png' @ warning/png.c/MagickPNGWarningHandler/1669. convert: Buffer error in compressed datastream in iCCP chunk ShapeNetCore.v2/04401088/e0355773a18fc61224d795aabf4bd88/images/texture2.png' @ warning/png.c/MagickPNGWarningHandler/1669. convert: Profile size field missing from iCCP chunkShapeNetCore.v2/04401088/e0355773a18fc61224d795aabf4bd88/images/texture2.png' @ warning/png.c/MagickPNGWarningHandler/1669. convert: Buffer error in compressed datastream in iCCP chunk ShapeNetCore.v2/04401088/e0355773a18fc61224d795aabf4bd88/images/texture4.png' @ warning/png.c/MagickPNGWarningHandler/1669. convert: Profile size field missing from iCCP chunkShapeNetCore.v2/04401088/e0355773a18fc61224d795aabf4bd88/images/texture4.png' @ warning/png.c/MagickPNGWarningHandler/1669. convert: Ignoring gAMA chunk with gamma=0 ShapeNetCore.v2/03001627/8aca9f9005d8a8bae36724f611fabaa4/images/texture0.png' @ warning/png.c/MagickPNGWarningHandler/1669. convert: Ignoring attempt to set negative chromaticity valueShapeNetCore.v2/03001627/8aca9f9005d8a8bae36724f611fabaa4/images/texture0.png' @ warning/png.c/MagickPNGWarningHandler/1669. convert: Ignoring attempt to set cHRM RGB triangle with zero area `ShapeNetCore.v2/03001627/8aca9f9005d8a8bae36724f611fabaa4/images/texture0.png' @ warning/png.c/MagickPNGWarningHandler/1669.

Is this something I should be worried about?

jmccormac commented 6 years ago

That command should convert all of them because of the find exec prefix. Those same warnings appeared for me also, but I checked an image before and after and it looked ok, so nothing to be too worried about - but let me know if there are any problems with it. Glad that seemed to work. I'll close this issue now.