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

Some objects cannot be evaluated #8

Closed
QtEngineer opened this issue May 22, 2022 · 1 comment
Closed

Some objects cannot be evaluated #8

QtEngineer opened this issue May 22, 2022 · 1 comment

Comments

@QtEngineer
Copy link

I noticed that some .obj files of ShapeNetV2 cannot be correctly evaluateed. They can be generated when [generate_meshes = True] on useful_scripts.py ,but an error will happen when evaluate_patch_network_metrics runs again with [generate_meshes = False]

Traceback (most recent call last):
File "/root/miniconda3/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/root/miniconda3/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "useful_scripts.py", line 1101, in _evaluate_object
iou = intersection_over_union(groundtruth_mesh_file, regressed_trimesh)
File "useful_scripts.py", line 1028, in intersection_over_union
watertight_result = precompute_iou_on_watertight(groundtruth_mesh_file, num_points=num_points) # num_points x 4 (x,y,z, 1.0f if inside else 0.0f)
File "useful_scripts.py", line 1013, in precompute_iou_on_watertight
max_bb, min_bb = _get_bounding_box(groundtruth_trimesh.vertices)
AttributeError: 'Scene' object has no attribute 'vertices'

Is it because these objects are nor water-tight? And how to fix it?

@QtEngineer
Copy link
Author

I print all attributes and found .obj files loaded by trimesh does not contain attr 'vertcis'
['abstractmethods', 'add', 'class', 'delattr', 'dict', 'dir', 'doc', 'eq', 'format', 'ge', 'getattribute', 'gt', 'hash', 'init', 'init_subclass', 'le', 'lt', 'module', 'ne', 'new', 'radd', 'reduce', 'reduce_ex', 'repr', 'setattr', 'sizeof', 'slots', 'str', 'subclasshook', 'weakref', '_abc_impl', '_cache', '_hashable', '_lights', 'add_geometry', 'apply_obb', 'apply_scale', 'apply_transform', 'apply_translation', 'area', 'bounding_box', 'bounding_box_oriented', 'bounding_cylinder', 'bounding_primitive', 'bounding_sphere', 'bounds', 'bounds_corners', 'camera', 'camera_rays', 'camera_transform', 'centroid', 'convert_units', 'convex_hull', 'copy', 'crc', 'deduplicated', 'delete_geometry', 'dump', 'duplicate_nodes', 'explode', 'export', 'extents', 'geometry', 'geometry_identifiers', 'graph', 'has_camera', 'is_empty', 'is_valid', 'lights', 'md5', 'metadata', 'rezero', 'save_image', 'scale', 'scaled', 'set_camera', 'show', 'subscene', 'triangles', 'triangles_node', 'units']

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

1 participant