3d-photo-inpainting
3d-photo-inpainting copied to clipboard
Memory leak
When running the application from either a VM with Ubuntu or Google's colab with 6GB and 13.5GB ram respectively, the RAM usage continually increases until the application crashes. Is there a limiter or does it require every bit of RAM?
While the app usually doesn't crash in Colab, I should note that it is more prone to crashing when working with larger files or when the: fps: num_frames: longer_side_len:
arguments are increased
I think, the problem is with the way the depth matrix are being calculated in print(f"Writing depth ply (and basically doing everything) at {time.time()}") rt_info = write_ply(image, depth, sample['int_mtx'], mesh_fi, config, rgb_model, depth_edge_model, depth_edge_model, depth_feat_model)
This function has memory leakage for large images (high resolution over 1K). Basically, you need to restrict the resolution using the longer_side_len: to be a maximum of 1K or it crashes. Is there anyway we can fix this memory leakage bug ?
I am not well versed in virtual machines but if you can set it to have large Paging file (aka Virtual memory), it will reach into that and won't crash depending on how much you give.
@peymanrah so how could we de-allocate or what do you think should be set to None to free memory resources ? I'm running on Docker and this is what I am getting:
Writing depth ply (and basically doing everything) at 1604091515.5040085 WARNING:py.warnings:/app/mesh_tools.py:174: RuntimeWarning: divide by zero encountered in true_divide input_disp = 1./np.abs(input_depth)
0%| | 0/1 [03:15<?, ?it/s]
Traceback (most recent call last):
File "main.py", line 523, in
Did anyone find a way to fix this issue? I am encountering the same memory leak.