thmoa / semantic_human_texture_stitching

This repository contains texture stitching code corresponding to the paper Detailed Human Avatars from Monocular Video.
158 stars 48 forks source link

Strange error in demo: divide by zero encountered in divide #8

Closed ah651 closed 5 years ago

ah651 commented 5 years ago

Hi, thanks for your work. I run the demo, however i encountered strange error, it seems divide by zero encountered in divide, but i cann't find where it happen. The following is the specific error message:

python step1_make_unwraps.py data/sample/frame_data.pkl data/sample/frames data/sample/segmentations data/sample/unwraps 0%| | 0/8 [00:00<?, ?it/s]/ssd2/vis/v_wangzhi04/anaconda2/lib/python2.7/site-packages/opendr-0.77-py2.7-linux-x86_64.egg/opendr/renderer.py:185: RuntimeWarning: divide by zero encountered in divide result = np.asarray(deepcopy(gl.getDepth()), np.float64) /ssd2/vis/v_wangzhi04/anaconda2/lib/python2.7/site-packages/opendr-0.77-py2.7-linux-x86_64.egg/opendr/renderer.py:185: RuntimeWarning: invalid value encountered in divide result = np.asarray(deepcopy(gl.getDepth()), np.float64) Exception KeyError: KeyError(<weakref at 0x7f5abfa06158; to 'tqdm' at 0x7f5abfa27890>,) in <bound method tqdm.del of 0%| | 0/8 [00:00<?, ?it/s]> ignored Traceback (most recent call last): File "step1_make_unwraps.py", line 89, in main(args.data_file, args.frame_dir, args.segm_dir, args.out) File "step1_make_unwraps.py", line 57, in main vis, iso, iso_segm = texture.get_data(frame, camera, mask, segm) File "/ssd2/vis/v_wangzhi04/semantic_human_texture_stitching/tex/texture.py", line 29, in get_data f_vis = self.visibility.face_visibility(camera, silh) File "/ssd2/vis/v_wangzhi04/semantic_human_texture_stitching/util/visibility.py", line 48, in face_visibility v_vis = self.vertex_visibility(camera, mask) File "/ssd2/vis/v_wangzhi04/semantic_human_texture_stitching/util/visibility.py", line 32, in vertex_visibility depth = self.rn_d.r File "/ssd2/vis/v_wangzhi04/anaconda2/lib/python2.7/site-packages/chumpy-0.68-py2.7.egg/chumpy/ch.py", line 596, in r self._cache['r'] = np.asarray(np.atleast_1d(self.compute_r()), dtype=np.float64, order='C') File "/ssd2/vis/v_wangzhi04/anaconda2/lib/python2.7/site-packages/opendr-0.77-py2.7-linux-x86_64.egg/opendr/renderer.py", line 100, in compute_r return self.depth_image.reshape((self.frustum['height'], self.frustum['width'])) File "/ssd2/vis/v_wangzhi04/anaconda2/lib/python2.7/site-packages/chumpy-0.68-py2.7.egg/chumpy/ch.py", line 1213, in with_caching sdf['value'] = func(self, *args, **kwargs) File "/ssd2/vis/v_wangzhi04/anaconda2/lib/python2.7/site-packages/opendr-0.77-py2.7-linux-x86_64.egg/opendr/renderer.py", line 185, in depth_image result = np.asarray(deepcopy(gl.getDepth()), np.float64) File "contexts/ctx_base.pyx", line 24, in contexts.ctx_mesa.mc.with_make_current File "contexts/ctx_base.pyx", line 257, in contexts.ctx_mesa.OsContextBase.getDepth File "contexts/ctx_base.pyx", line 24, in contexts.ctx_mesa.mc.with_make_current File "contexts/ctx_base.pyx", line 313, in contexts.ctx_mesa.OsContextBase.getDepthCloud File "/ssd2/vis/v_wangzhi04/anaconda2/lib/python2.7/site-packages/numpy/linalg/linalg.py", line 528, in inv ainv = _umath_linalg.inv(a, signature=signature, extobj=extobj) File "/ssd2/vis/v_wangzhi04/anaconda2/lib/python2.7/site-packages/numpy/linalg/linalg.py", line 89, in _raise_linalgerror_singular raise LinAlgError("Singular matrix") numpy.linalg.linalg.LinAlgError: Singular matrix

thmoa commented 5 years ago

Please use the configuration as in requirements.txt. If you find a bug please feel free to submit a PR.