CoolFace
Modelpublic

Dororo99/Ours_S3GS_Waymo

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
system_utils.py29 linesDownload Raw Back to utils
1#
2# Copyright (C) 2023, Inria
3# GRAPHDECO research group, https://team.inria.fr/graphdeco
4# All rights reserved.
5#
6# This software is free for non-commercial, research and evaluation use 
7# under the terms of the LICENSE.md file.
8#
9# For inquiries contact  george.drettakis@inria.fr
10#
11
12from errno import EEXIST
13from os import makedirs, path
14import os
15
16def mkdir_p(folder_path):
17    # Creates a directory. equivalent to using mkdir -p on the command line
18    try:
19        makedirs(folder_path)
20    except OSError as exc: # Python >2.5
21        if exc.errno == EEXIST and path.isdir(folder_path):
22            pass
23        else:
24            raise
25
26def searchForMaxIteration(folder):
27    saved_iters = [int(fname.split("_")[-1]) for fname in os.listdir(folder)]
28    return max(saved_iters)
29