zju3dv / pvnet-rendering

render images for pvnet training
Apache License 2.0
183 stars 46 forks source link

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) #20

Closed lilixj closed 5 years ago

lilixj commented 5 years ago

/home/lxj/blender-2.79-linux-glibc219-x86_64/2.79/python/bin/python3.5m /home/Storage/lxj/PoseEst/pvnet/pvnet-rendering/run.py --type rendering

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

When i installed all necessary library for python3.5m in Blender, the code just exited and i cannot find any reason. In the lib-installing stage, I directly copied corresponding lib directory(lmdb, OpenEXR of python3.5) to /path/to/blender/2.70/python/lib/python3.5/site-packages directory for i couldn't install them in pycharm(it reported some errors), am not sure if the problem comes from here?Could you help me with this?

pengsida commented 5 years ago
  1. Use system python to run run.py.
  2. A better way is to install pip for blender python and use blender pip to install python libraries. https://github.com/pengsida/configuration/blob/master/blender/install_pip.py
lilixj commented 5 years ago

i followed your instruction and used the python from virtual environment, however, i reported following error: /home/lxj/anaconda3/envs/tf367/bin/python /home/Storage/lxj/PoseEst/pvnet/pvnet-rendering/run.py --type rendering found bundled python: /home/lxj/blender-2.79-linux-glibc219-x86_64/2.79/python Read blend: /home/Storage/lxj/PoseEst/pvnet/pvnet-rendering/data/blank.blend Traceback (most recent call last): File "/home/Storage/lxj/PoseEst/pvnet/pvnet-rendering/blender/render_backend.py", line 456, in batch_render_with_linemod(args, camera) File "/home/Storage/lxj/PoseEst/pvnet/pvnet-rendering/blender/render_backend.py", line 366, in batch_render_with_linemod bg_imgs = np.random.choice(bg_imgs, size=cfg.NUM_SYN) File "mtrand.pyx", line 773, in numpy.random.mtrand.RandomState.choice ValueError: 'a' cannot be empty unless no samples are taken

Successfully imported '/home/Storage/lxj/PoseEst/pvnet/pvnet-rendering/data/LINEMOD/cat/cat.ply' in 1.470 sec

Blender quit

Process finished with exit code 0

pengsida commented 5 years ago

Check bg_imgs. It seems empty, which is unexpected.

lilixj commented 5 years ago

Check bg_imgs. It seems empty, which is unexpected.

the path is wrongly configured. Problem sloved. Really appreciate your help.

taeyeopl commented 5 years ago

Could you tell me here more detail?? self.bg_imgs_path = os.path.join(cfg.DATA_DIR, 'bg_imgs.npy') What's the meaning of 'bg_imgs.npy'??

pengsida commented 5 years ago

It is a file storing the background image path.

monajalal commented 10 months ago
  1. Use system python to run run.py.

    1. A better way is to install pip for blender python and use blender pip to install python libraries. https://github.com/pengsida/configuration/blob/master/blender/install_pip.py

@pengsida

following this instructions didn't work unfortunately

root@fae597dbdb79:/home# wget https://bootstrap.pypa.io/get-pip.py 
--2023-12-15 18:25:47--  https://bootstrap.pypa.io/get-pip.py
Resolving bootstrap.pypa.io (bootstrap.pypa.io)... 151.101.192.175, 151.101.0.175, 151.101.64.175, ...
Connecting to bootstrap.pypa.io (bootstrap.pypa.io)|151.101.192.175|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2632263 (2.5M) [text/x-python]
Saving to: 'get-pip.py'

get-pip.py                                         100%[================================================================================================================>]   2.51M  --.-KB/s    in 0.07s   

2023-12-15 18:25:47 (34.4 MB/s) - 'get-pip.py' saved [2632263/2632263]

root@fae597dbdb79:/home# ls
blender-2.79a-linux-glibc219-x86_64  blender-2.79a-linux-glibc219-x86_64.tar.bz2  get-pip.py  pvnet-rendering
root@fae597dbdb79:/home# cd blender-2.79a-linux-glibc219-x86_64/2.79/python/bin/  
root@fae597dbdb79:/home/blender-2.79a-linux-glibc219-x86_64/2.79/python/bin# ./python3.5m  /home/get-pip.py 
ERROR: This script does not work on Python 3.5 The minimum supported Python version is 3.7. Please use https://bootstrap.pypa.io/pip/3.5/get-pip.py instead.

I am using Ubuntu 18.04 inside a docker and my host machine is Ubuntu 22.04.

Instead please do this:

root@fae597dbdb79:/home/blender-2.79a-linux-glibc219-x86_64/2.79/python/bin# cd /home/
root@fae597dbdb79:/home# ls
blender-2.79a-linux-glibc219-x86_64  blender-2.79a-linux-glibc219-x86_64.tar.bz2  get-pip.py  pvnet-rendering
root@fae597dbdb79:/home# rm get-pip.py 
root@fae597dbdb79:/home# wget https://bootstrap.pypa.io/pip/3.5/get-pip.py
--2023-12-15 18:28:14--  https://bootstrap.pypa.io/pip/3.5/get-pip.py
Resolving bootstrap.pypa.io (bootstrap.pypa.io)... 151.101.0.175, 151.101.64.175, 151.101.128.175, ...
Connecting to bootstrap.pypa.io (bootstrap.pypa.io)|151.101.0.175|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1908223 (1.8M) [text/x-python]
Saving to: 'get-pip.py'

get-pip.py                                         100%[================================================================================================================>]   1.82M  --.-KB/s    in 0.07s   

2023-12-15 18:28:20 (27.6 MB/s) - 'get-pip.py' saved [1908223/1908223]

root@fae597dbdb79:/home# ls
blender-2.79a-linux-glibc219-x86_64  blender-2.79a-linux-glibc219-x86_64.tar.bz2  get-pip.py  pvnet-rendering
root@fae597dbdb79:/home# cd blender-2.79a-linux-glibc219-x86_64/2.79/
datafiles/ python/    scripts/   
root@fae597dbdb79:/home# cd blender-2.79a-linux-glibc219-x86_64/2.79/python/
bin/     include/ lib/     
root@fae597dbdb79:/home# cd blender-2.79a-linux-glibc219-x86_64/2.79/python/bin/           
root@fae597dbdb79:/home/blender-2.79a-linux-glibc219-x86_64/2.79/python/bin# ./python3.5m  /home/get-pip.py 
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Collecting pip<21.0
  Downloading pip-20.3.4-py2.py3-none-any.whl (1.5 MB)
     |################################| 1.5 MB 6.9 MB/s 
Collecting setuptools
  Using cached setuptools-50.3.2-py3-none-any.whl (785 kB)
Collecting wheel
  Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel, setuptools, pip
Successfully installed pip-20.3.4 setuptools-50.3.2 wheel-0.37.1