mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-12 19:04:03 +08:00
Alignment of fast-exposed to well-exposed
This commit is contained in:
1 parent
8484fb9417
commit
b3e2a391fd
10 files changed
+432
-92
No files matched your search
@@ -19,6 +19,20 @@ def move_subfolder(source_dir, destination_dir):
|
||||
|
||||
delete_empty_folder(source_dir)
|
||||
|
||||
def copy_subfolder(source_dir, destination_dir):
|
||||
if not os.path.exists(source_dir):
|
||||
print(f"Source directory '{source_dir}' does not exist.")
|
||||
return
|
||||
|
||||
os.makedirs(destination_dir, exist_ok=True)
|
||||
|
||||
try:
|
||||
for filename in os.listdir(source_dir):
|
||||
if filename.lower().count('png') < 2:
|
||||
shutil.copy2(os.path.join(source_dir, filename), os.path.join(destination_dir, filename))
|
||||
except Exception as e:
|
||||
print(f"Error copying subfolder: {e}")
|
||||
|
||||
def delete_empty_folder(folder_path):
|
||||
try:
|
||||
if os.path.exists(folder_path):
|
||||
@@ -60,7 +74,7 @@ if __name__ == "__main__":
|
||||
masks_folder = args.input_dir + "masks/"
|
||||
|
||||
for item in os.listdir(masks_folder):
|
||||
move_subfolder(masks_folder + item, dest_folder + item + "/mask")
|
||||
copy_subfolder(masks_folder + item, dest_folder + item + "/mask")
|
||||
|
||||
delete_empty_folder(args.input_dir + "masks")
|
||||
|
||||
|
||||
Reference in new issue
Block a user