AiuniAI / Unique3D

[NeurIPS 2024] Unique3D: High-Quality and Efficient 3D Mesh Generation from a Single Image
https://wukailu.github.io/Unique3D/
MIT License
3.11k stars 246 forks source link

多视图生成3D时报错 #54

Closed sp1cae closed 4 months ago

sp1cae commented 5 months ago

多视图和主视图都是项目生成的,有时会出现下面的错误: assert cos_angles.mean() < 0, f"The view direction is not correct. cos_angles.mean()={cos_angles.mean()}" AssertionError: The view direction is not correct. cos_angles.mean()=0.062265731394290924

jtydhr88 commented 5 months ago

换seed

wukailu commented 4 months ago

换seed,这个是因为代码里有一行 assert 检查最后一步前所有面的朝向(你也可以强行删掉这个assert),如果存在一些面是错误的方向,说明这个模型大概率迭代崩掉了

sp1cae commented 4 months ago

大佬这个assert是来源于哪个代码

josepmy commented 3 months ago

I have the same issue, any solution? @wukailu Did you mean to remove the line or control this assertion line if there are some faces that are facing the wrong direction checking the error? I think can add a tolerance of 0.05. Make sense?

# find invalid faces
cos_angles = (faces_normals * view_direction).sum(dim=1)
assert cos_angles.mean() < 0.05, f"The view direction is not correct. cos_angles.mean()={cos_angles.mean()}"
selected_faces = unique_faces[cos_angles < -eps]