Anttwo / SuGaR

[CVPR 2024] Official PyTorch implementation of SuGaR: Surface-Aligned Gaussian Splatting for Efficient 3D Mesh Reconstruction and High-Quality Mesh Rendering
https://anttwo.github.io/sugar/
Other
2.14k stars 158 forks source link

Filename error / RPly unable to create file #57

Open AtlasRedux opened 9 months ago

AtlasRedux commented 9 months ago

All goes fine, until this:

-----Decimating and cleaning meshes-----

Processing decimation target: 1000000 Decimating foreground mesh... Finished decimating foreground mesh. Decimating background mesh... Finished decimating background mesh. Cleaning mesh... RPly: Unable to create file [Open3D WARNING] Write PLY failed: unable to open file: D:\3DGS\INPUTS\Link\sugarmesh_D:\3DGS\INPUTS\Link\3Dgs7000_densityestim02_sdfnorm02_level03_decim1000000.ply Mesh saved at D:\3DGS\INPUTS\Link\sugarmesh_D:\3DGS\INPUTS\Link\3Dgs7000_densityestim02_sdfnorm02_level03_decim1000000.ply -----Parsed parameters----- Source path: D:\3DGS\INPUTS\Link

Content: 8 Gaussian Splatting checkpoint path: D:\3DGS\sugar\OUTPUT\Link\ Content: 4 SUGAR checkpoint path: D:\3DGS\INPUTS\Link\sugarfine_D:\3DGS\INPUTS\Link\D:\3DGS\INPUTS\Link\3Dgs7000_densityestim02_sdfnorm02_level03_decim100 0000_normalconsistency01_gaussperface1/ Surface mesh to bind to: D:\3DGS\INPUTS\Link\sugarmesh_D:\3DGS\INPUTS\Link\3Dgs7000_densityestim02_sdfnorm02_level03_decim1000000.ply Iteration to load: 7000 Normal consistency factor: 0.1 Number of gaussians per surface triangle: 1 Number of vertices in the foreground: 1000000 Use eval split: True

Using device: 0 =========================================================================== PyTorch CUDA memory summary, device ID 0
CUDA OOMs: 0 cudaMalloc retries: 0
===========================================================================
Metric Cur Usage Peak Usage Tot Alloc Tot Freed
---------------------------------------------------------------------------
Allocated memory 16640 KiB 22183 MiB 97935 GiB 97935 GiB
from large pool 16640 KiB 22150 MiB 96504 GiB 96504 GiB
from small pool 0 KiB 41 MiB 1431 GiB 1431 GiB
---------------------------------------------------------------------------
Active memory 16640 KiB 22183 MiB 97935 GiB 97935 GiB
from large pool 16640 KiB 22150 MiB 96504 GiB 96504 GiB
from small pool 0 KiB 41 MiB 1431 GiB 1431 GiB
---------------------------------------------------------------------------
Requested memory 16640 KiB 21914 MiB 97351 GiB 97351 GiB
from large pool 16640 KiB 21882 MiB 95922 GiB 95922 GiB
from small pool 0 KiB 39 MiB 1428 GiB 1428 GiB
---------------------------------------------------------------------------
GPU reserved memory 23380 MiB 23380 MiB 23416 MiB 36864 KiB
from large pool 23330 MiB 23330 MiB 23366 MiB 36864 KiB
from small pool 50 MiB 50 MiB 50 MiB 0 KiB
---------------------------------------------------------------------------
Non-releasable memory 202496 KiB 1552 MiB 59151 GiB 59151 GiB
from large pool 202496 KiB 1546 MiB 57539 GiB 57538 GiB
from small pool 0 KiB 13 MiB 1612 GiB 1612 GiB
---------------------------------------------------------------------------
Allocations 2 3978 10409 K 10409 K
from large pool 2 858 4563 K 4563 K
from small pool 0 3128 5845 K 5845 K
---------------------------------------------------------------------------
Active allocs 2 3978 10409 K 10409 K
from large pool 2 858 4563 K 4563 K
from small pool 0 3128 5845 K 5845 K
---------------------------------------------------------------------------
GPU reserved segments 821 821 822 1
from large pool 796 796 797 1
from small pool 25 25 25 0
---------------------------------------------------------------------------
Non-releasable allocs 3 141 5935 K 5935 K
from large pool 3 38 2651 K 2651 K
from small pool 0 115 3284 K 3284 K
---------------------------------------------------------------------------
Oversize allocations 0 0 0 0
---------------------------------------------------------------------------
Oversize GPU segments 0 0 0 0
===========================================================================

Traceback (most recent call last): File "D:\3DGS\sugar\train.py", line 162, in refined_sugar_path = refined_training(refined_args) File "D:\3DGS\sugar\sugar_trainers\refine.py", line 316, in refined_training os.makedirs(sugar_checkpoint_path, exist_ok=True) File "C:\Users\atlas\miniconda3\envs\sugar\lib\os.py", line 215, in makedirs makedirs(head, exist_ok=exist_ok) File "C:\Users\atlas\miniconda3\envs\sugar\lib\os.py", line 215, in makedirs makedirs(head, exist_ok=exist_ok) File "C:\Users\atlas\miniconda3\envs\sugar\lib\os.py", line 215, in makedirs makedirs(head, exist_ok=exist_ok) [Previous line repeated 5 more times] File "C:\Users\atlas\miniconda3\envs\sugar\lib\os.py", line 225, in makedirs mkdir(name, mode) OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'D:\3DGS\INPUTS\Link\sugarfine_D:'

Anttwo commented 9 months ago

Hello @AtlasRedux,

What is your OS? Are you using Windows?

yuedajiong commented 9 months ago
.split('/') -> .split(os.sep) 'D:\\3DGS' or 'D:/3DGS' ?
AtlasRedux commented 9 months ago

.split('/') -> .split(os.sep)

'D:\3DGS' or 'D:/3DGS'

?

Now I'm getting:

Traceback (most recent call last): File "D:\3DGS\sugar\train.py", line 143, in coarse_mesh_path = extract_mesh_from_coarse_sugar(coarse_mesh_args)[0] File "D:\3DGS\sugar\sugar_extractors\coarse_mesh.py", line 461, in extract_mesh_from_coarse_sugar sugar_meshpath = 'sugarmesh' + sugar_checkpointpath.split('os.sep')[-2].replace('sugarcoarse', '') + '_levelZZ_decimAA.ply' IndexError: list index out of range

yuedajiong commented 8 months ago

OMG please print that array. and modify index of array to pick up you want.

AtlasRedux commented 8 months ago

OMG please print that array. and modify index of array to pick up you want.

I have absolutely no idea what you're trying to say.

Anttwo commented 8 months ago

Hello @AtlasRedux,

Looking at your error, it seems that you wrote sugar_checkpoint_path.split('os.sep'). You should use sugar_checkpoint_path.split(os.sep) (with os.sep rather than 'os.sep').

os.sep is a property from the os library which returns the character used for separating directories in paths (i.e. '/' for Linux, and '\' for Windows). This fix may work, but I have not tested it yet so you could still have errors.

As you may have guessed, the code currently produces some errors on Windows as it was written for Linux; I will push a few changes in the coming days to make it work on Windows (I've been aware of this issue for a few days now, but I admit I haven't worked a lot since last week, as we're in the middle of the Christmas holidays!).

In the meantime, I don't know if you've heard about WSL2 (Windows Subsystem for Linux), but it is a wonderful option for Windows users! It is basically an official, super-efficient Linux virtual machine made by Microsoft for Windows. It lets you work with Linux in a very simple way, without performing a dualboot or anything. You can access and edit the files of both OS in real-time very easily. Since most codes/tutos/installation guides are made for Linux, WSL2 is truly a wonderful tool for WIndows users!

AtlasRedux commented 8 months ago

I have WSL, no idea why I didn't think of simply doing it through it, I use it a lot -.- Absolute brainfart. Thanks.

man. 1. jan. 2024, 21:24 skrev Antoine GUEDON @.***>:

Hello @AtlasRedux https://github.com/AtlasRedux,

Looking at your error, it seems that you wrote sugar_checkpoint_path.split('os.sep'). You should use sugar_checkpoint_path.split(os.sep) (with os.sep rather than 'os.sep').

os.sep is a property from the os library which returns the character used for separating directories in paths (i.e. '/' for Linux, and '\' for Windows). This fix may work, but I have not tested it yet so you could still have errors.

As you may have guessed, the code currently produces some errors on Windows as it was written for Linux; I will push a few changes in the coming days to make it work on Windows (I've been aware of this issue for a few days now, but I admit I haven't worked a lot since last week, as we're in the middle of the Christmas holidays!).

In the meantime, I don't know if you've heard about WSL2 (Windows Subsystem for Linux), but it is a wonderful option for Windows users! It is basically an official, super-efficient Linux virtual machine made by Windows for Windows. It lets you work with Linux in a very simple way, without performing a dualboot or anything. You can access and edit the files of both OS in real-time very easily. Since most codes/tutos/installation guides are made for Linux, WSL2 is truly a wonderful tool for WIndows users!

— Reply to this email directly, view it on GitHub https://github.com/Anttwo/SuGaR/issues/57#issuecomment-1873467476, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFNSVVUJSV4ILIV73IE3EDYMMLQFAVCNFSM6AAAAABBCJOSIWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZTGQ3DONBXGY . You are receiving this because you were mentioned.Message ID: @.***>