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

Mesh dependence: Vertex visibility computation #12

Open
MiraPurkrabek opened this issue Feb 16, 2024 · 3 comments
Open

Mesh dependence: Vertex visibility computation #12

MiraPurkrabek opened this issue Feb 16, 2024 · 3 comments

Comments

@MiraPurkrabek
Copy link
Owner

MiraPurkrabek commented Feb 16, 2024

As mentioned by @EWE002,

Thank you very much for your answer,
but after solving the above problem I have encountered a new problem, which is as follows.
Generating poses and views...
0%| | 0/2 [00:00<?, ?it/s]DRI3 not available
failed to load driver: zink
0%| | 0/2 [00:01<?, ?it/s]
Traceback (most recent call last):
File "scripts/sample_random_poses.py", line 785, in
main(args)
File "scripts/sample_random_poses.py", line 388, in main
visibilities = msh.vertex_visibility(
File "/home/m11002163/.conda/envs/mesh/lib/python3.8/site-packages/psbody/mesh/mesh.py", line 284, in vertex_visibility
vis, n_dot_cam = self.vertex_visibility_and_normals(camera, omni_directional_camera)
File "/home/m11002163/.conda/envs/mesh/lib/python3.8/site-packages/psbody/mesh/mesh.py", line 295, in vertex_visibility_and_normals
'cams': np.array([camera.origin.flatten()])}
AttributeError: 'list' object has no attribute 'origin'
This looks like a problem in the mesh?
About the mesh installation, I am following https://github.com/MPI-IS/mesh/tree/master
After I run the test on that page, it shows no problem.
What could be the problem?
Thank you in advance.

Originally posted by @EWE002 in #11 (comment)

@MiraPurkrabek
Copy link
Owner Author

OK, I believe I found the bug @EWE002 .
I forgot that I'm using my fork of the MPI-IS/mesh repository. I did various changes there but the one that hinders your code will be on line 341 of file mesh.py (link). There are three quick solutions, please choose which suits you the best.

  1. Install psbody.mesh library from my fork - https://github.com/MiraPurkrabek/mesh
  2. Edit the linked lines in your installation of the psbody.mesh (requires you to install from source as in the option 1.)
  3. Edit the RePoGen code such that the variable camera_position has attribute origin that will give you value of the array. You can refer to this StackOverflow question for inspiration.

I edited the README to recommend the first solution. Please let me know if solved the bug.

@EWE002
Copy link

EWE002 commented Mar 4, 2024

Thank you so much for your answer!
After I ran the first option according to your instructions, the composite image was generated correctly!
But there is another small concern, after I installed psbody according to your fork,
I ran $make tests to make sure the installation was successful
But it shows a problem :
image

@MiraPurkrabek
Copy link
Owner Author

Great to hear that the RePoGen generation works well!

I tried the tests and got the same error even though the RePoGen generation works fine.

The visibility source needs to be loaded correctly. It is defined in a C++ file in /mesh/src/py_visibility.cpp. It may be a general problem or connected only to unit tests and their loading since the error does not influence the RePoGen code.
Since it does not break our code, I must assign it a low priority and postpone it until later.

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