I am processing my own image using the given trained model and the default configurations, but get stuck into an infinite while loop in the above codes.
I printed out the value in node which is always (120, 355, -inf). So the problem is that when the depth value is -inf, the node stops updating. I added
if torch.isinf(node[2]):
break
and it solved the problem. But I still wonder why the case occurs.
After I solved the above problem, I immediately met another error:
Traceback (most recent call last):
File "main.py", line 117, in <module>
depth_feat_model)
File "3d-photo-inpainting/mesh.py", line 2008, in write_ply
inpaint_iter=1)
File "3d-photo-inpainting/mesh.py", line 1825, in DL_inpaint_edge
for node in mesh.nodes:
RuntimeError: dictionary changed size during iteration
https://github.com/vt-vl-lab/3d-photo-inpainting/blob/de0446740a3726f3de76c32e78b43bd985d987f9/mesh.py#L1751-L1755
I am processing my own image using the given trained model and the default configurations, but get stuck into an infinite while loop in the above codes.
I printed out the value in
node
which is always(120, 355, -inf)
. So the problem is that when the depth value is-inf
, the node stops updating. I addedand it solved the problem. But I still wonder why the case occurs.
After I solved the above problem, I immediately met another error:
I think this is caused by https://github.com/vt-vl-lab/3d-photo-inpainting/blob/de0446740a3726f3de76c32e78b43bd985d987f9/mesh.py#L1802-L1812
Once
mesh.remove_node(node)
was executed,mesh.nodes
would be changed. So I solved this by modifying Line 1802 as