Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'rasterize_triangles' has no attribute 'rasterize_triangles' #198

Open
czy36mengfei opened this issue Mar 10, 2022 · 1 comment

Comments

@czy36mengfei
Copy link

czy36mengfei commented Mar 10, 2022

When I run demo.py found some errors like "AttributeError: module 'rasterize_triangles' has no attribute 'rasterize_triangles'".

enviroment:
tensorflow=1.12.0
cuda=9.0

Thank you for your help.


==================================
ERROR:tensorflow:==================================
Object was never used (type <class 'tensorflow.python.framework.ops.Operation'>):
<tf.Operation 'assert_greater_1/Assert/AssertGuard/Merge' type=Merge>
If you want to mark it as used call its "mark_used()" method.
It was originally created here:
  File "/home/c00576463/.pycharm_helpers/pydev/pydevd.py", line 2131, in <module>
    main()  File "/home/c00576463/.pycharm_helpers/pydev/pydevd.py", line 2122, in main
    globals = debugger.run(setup['file'], None, None, is_module)  File "/home/c00576463/.pycharm_helpers/pydev/pydevd.py", line 1431, in run
    return self._exec(is_module, entry_point_fn, module_name, file, globals, locals)  File "/home/c00576463/.pycharm_helpers/pydev/pydevd.py", line 1438, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script  File "/home/c00576463/.pycharm_helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)  File "/home/c00576463/nfs4/c00576463/code/Deep3DFaceReconstruction/demo.py", line 124, in <module>
    demo()  File "/home/c00576463/nfs4/c00576463/code/Deep3DFaceReconstruction/demo.py", line 82, in demo
    FaceReconstructor.Reconstruction_Block(coeff,opt)  File "/nfs4/c00576463/code/Deep3DFaceReconstruction/face_decoder.py", line 63, in Reconstruction_Block
    render_imgs,img_mask,img_mask_crop = self.Render_block(face_shape_t,norm_r,face_color,camera_scale,f_scale,self.facemodel,opt.batch_size,opt.is_train)  File "/nfs4/c00576463/code/Deep3DFaceReconstruction/face_decoder.py", line 312, in Render_block
    ambient_color = ambient_color)  File "/nfs4/c00576463/code/Deep3DFaceReconstruction/renderer/mesh_renderer.py", line 364, in mesh_renderer
    camera_up)  File "/home/c00576463/miniconda3/envs/deep3d/lib/python3.6/site-packages/camera_utils.py", line 97, in look_at
    message='Camera matrix is degenerate because up and gaze are close or'  File "/home/c00576463/miniconda3/envs/deep3d/lib/python3.6/site-packages/tensorflow/python/ops/check_ops.py", line 666, in assert_greater
    return control_flow_ops.Assert(condition, data, summarize=summarize)  File "/home/c00576463/miniconda3/envs/deep3d/lib/python3.6/site-packages/tensorflow/python/util/tf_should_use.py", line 189, in wrapped
    return _add_should_use_warning(fn(*args, **kwargs))
==================================
Traceback (most recent call last):
  File "/home/c00576463/miniconda3/envs/deep3d/lib/python3.6/contextlib.py", line 99, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/c00576463/miniconda3/envs/deep3d/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 5229, in get_controller
    yield g
  File "/home/c00576463/nfs4/c00576463/code/Deep3DFaceReconstruction/demo.py", line 82, in demo
    FaceReconstructor.Reconstruction_Block(coeff,opt)
  File "/nfs4/c00576463/code/Deep3DFaceReconstruction/face_decoder.py", line 63, in Reconstruction_Block
    render_imgs,img_mask,img_mask_crop = self.Render_block(face_shape_t,norm_r,face_color,camera_scale,f_scale,self.facemodel,opt.batch_size,opt.is_train)
  File "/nfs4/c00576463/code/Deep3DFaceReconstruction/face_decoder.py", line 312, in Render_block
    ambient_color = ambient_color)
  File "/nfs4/c00576463/code/Deep3DFaceReconstruction/renderer/mesh_renderer.py", line 371, in mesh_renderer
    pixel_attributes = rasterize_triangles.rasterize_triangles(
AttributeError: module 'rasterize_triangles' has no attribute 'rasterize_triangles'

Process finished with exit code 1

@lingleong981130
Copy link

Change rasterize_triangles.rasterize_triangles into rasterize_triangles.rasterize

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants