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

The evaluation of F-score and Chamfer Distance (CD) #16

Open
Liuzhengli opened this issue Sep 14, 2024 · 3 comments
Open

The evaluation of F-score and Chamfer Distance (CD) #16

Liuzhengli opened this issue Sep 14, 2024 · 3 comments

Comments

@Liuzhengli
Copy link

The evaluation of F-score and Chamfer Distance (CD) metrics is suddenly encountering errors for the last hundred items.
Hello author, I have evaluated on your pre-trained model, and the NC metric matches the original numbers, but when evaluating the F-score and Chamfer Distance (CD) metrics, everything was normal until the last hundred items suddenly had errors. Could you please provide an explanation
1111
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/environment/miniconda3/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/environment/miniconda3/lib/python3.7/site-packages/joblib/_parallel_backends.py", line 595, in call
return self.func(args, **kwargs)
File "/environment/miniconda3/lib/python3.7/site-packages/joblib/parallel.py", line 263, in call
for func, args, kwargs in self.items]
File "/environment/miniconda3/lib/python3.7/site-packages/joblib/parallel.py", line 263, in
for func, args, kwargs in self.items]
File "/home/featurize/work/SSR-code-main/eval/evaluate_front3d.py", line 166, in run_in_one
gt_mesh.vertices=gt_mesh.vertices/2
size/np.max(size)*2
AttributeError: 'Scene' object has no attribute 'vertices'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "eval/evaluate_front3d.py", line 239, in
Parallel()(delayed(evaluate.run_in_one)(index) for index in range(len(evaluate.split)))
File "/environment/miniconda3/lib/python3.7/site-packages/joblib/parallel.py", line 1056, in call
self.retrieve()
File "/environment/miniconda3/lib/python3.7/site-packages/joblib/parallel.py", line 935, in retrieve
self._output.extend(job.get(timeout=self.timeout))
File "/environment/miniconda3/lib/python3.7/multiprocessing/pool.py", line 657, in get
raise self._value
AttributeError: 'Scene' object has no attribute 'vertices'

@DaLi-Jack
Copy link
Owner

It seems like this issue stems from loading the mesh using Trimesh. I haven’t encountered this problem before, but I believe you can modify this code :
pred_mesh = trimesh.load(pred_cube_mesh_path)
gt_mesh = trimesh.load(gt_cube_mesh_path)
to :
pred_mesh = trimesh.load(pred_cube_mesh_path, force='mesh')
gt_mesh = trimesh.load(gt_cube_mesh_path, force='mesh')
This should help avoid the issue. You can refer to the official Trimesh answer here.

@Liuzhengli
Copy link
Author

Hello, I tested it again and the issue persists. Could there possibly be a problem with the code?,And it always stops at 2678.

@DaLi-Jack
Copy link
Owner

Perhaps you can try the following code:
image
As mentioned previously, the problem was that 'trimesh.Scene' cannot use the attribute 'vertices'. The code in the figure can convert 'trimesh.Scene' to 'trimesh.Trimesh', and then 'vertices' can be used. Although I originally thought that the previous answer could solve the problem.

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