SuGaR icon indicating copy to clipboard operation
SuGaR copied to clipboard

Filename error / RPly unable to create file

Open AtlasRedux opened this issue 2 years ago • 8 comments

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
===========================================================================
Metric
---------------------------------------------------------------------------
Allocated memory
from large pool
from small pool
---------------------------------------------------------------------------
Active memory
from large pool
from small pool
---------------------------------------------------------------------------
Requested memory
from large pool
from small pool
---------------------------------------------------------------------------
GPU reserved memory
from large pool
from small pool
---------------------------------------------------------------------------
Non-releasable memory
from large pool
from small pool
---------------------------------------------------------------------------
Allocations
from large pool
from small pool
---------------------------------------------------------------------------
Active allocs
from large pool
from small pool
---------------------------------------------------------------------------
GPU reserved segments
from large pool
from small pool
---------------------------------------------------------------------------
Non-releasable allocs
from large pool
from small pool
---------------------------------------------------------------------------
Oversize allocations
---------------------------------------------------------------------------
Oversize GPU segments
===========================================================================

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:'

AtlasRedux avatar Dec 25 '23 11:12 AtlasRedux

Hello @AtlasRedux,

What is your OS? Are you using Windows?

Anttwo avatar Dec 26 '23 13:12 Anttwo

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

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

?

yuedajiong avatar Dec 26 '23 13:12 yuedajiong

.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_mesh_path = 'sugarmesh_' + sugar_checkpoint_path.split('os.sep')[-2].replace('sugarcoarse_', '') + '_levelZZ_decimAA.ply' IndexError: list index out of range

AtlasRedux avatar Dec 27 '23 16:12 AtlasRedux

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

yuedajiong avatar Jan 01 '24 07:01 yuedajiong

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.

AtlasRedux avatar Jan 01 '24 07:01 AtlasRedux

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!

Anttwo avatar Jan 01 '24 20:01 Anttwo

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: @.***>

AtlasRedux avatar Jan 01 '24 20:01 AtlasRedux

Is this problem solved

U1F332 avatar Oct 04 '24 08:10 U1F332