Datasets:

DOI:
License:
kanayamaHideaki commited on
Commit
56b5e60
·
1 Parent(s): 48d9541

Deleted file_organize scripts.

Browse files
file_organize.py DELETED
@@ -1,77 +0,0 @@
1
- import os
2
- import glob
3
- from natsort import natsorted
4
- import shutil
5
-
6
- ## TODO list 06/10
7
- ## 1. parking 4 re-make
8
- ## 2. DFKI 2 scene info bluring
9
- ## 3. hospital HHA normal name_strategy is wrong
10
- ## 4. parking lot is wrong
11
-
12
-
13
- scene_name_idx = 6
14
- output_base_folder = "/mnt/seagate/workspace/ToF360_NeurIPS2024/"
15
- scene_base_paths = [#"/mnt/seagate/workspace/data/Thierry/221010_weingarten_hospital/floor_B_test/B_0th_picked_up/equi_viewpo/",
16
- # "/mnt/seagate/workspace/data/Thierry/0602_DFKI4F/tripod/20230625_default_param_amp50/equi_viewpo_denoised/",
17
- # "/mnt/seagate/workspace/data/Thierry/0605_DFKI_coffee_room/20231004_default_param_amp50/equi_viewpo_denoised/",
18
- # "/mnt/seagate/workspace/data/Thierry/0520_DFKI_parking1/tripod/20230625_default_param_amp50/equi_viewpo_denoised/",
19
- # "/mnt/seagate/workspace/data/Thierry/0713_DFKI_parking2/20230625_default_param_amp50/equi_viewpo_denoised",
20
- # "/mnt/seagate/workspace/data/Thierry/0713_DFKI_parking3/20230625_default_param_amp50/equi_viewpo_denoised",
21
- "/mnt/seagate/workspace/data/Thierry/0713_DFKI_parking4/20230625_default_param_amp50/equi_viewpo_denoised"]
22
-
23
- modality_dict = {"HHA": "HHA/*_equi_hha.png",
24
- "RGB": "RGB_png/*_equi_rgb.png",
25
- # "RGB_mh_aligned": "layout/*_equi_rgb_aligned.png",
26
- "XYZ": "XYZ/*_equi_XYZ.npy",
27
- "annotation": "coco_annotation/raw_json/*_coco.json",
28
- "depth": "depth/*_equi_depth.png",
29
- # "layout": "layout/*_equi_layout.json",
30
- "normal": "normal/*_equi_normal.png",
31
- "pretty/instances": "coco_annotation/instances_pretty/*_instance_pretty.png",
32
- # "pretty/layout_normals": "layout/output/*_equi_label_normal.png",
33
- "pretty/semantics": "coco_annotation/semantics_pretty/*_semantic_pretty.png"
34
- }
35
-
36
- def import_file_list(scene_base_path, file_name_rule, scene_name_idx):
37
- scene_name = scene_base_path.split("/")[scene_name_idx]
38
- if scene_name == "221010_weingarten_hospital":
39
- new_scene_name = "Hospital"
40
- elif scene_name == "0602_DFKI4F":
41
- new_scene_name = "Office_Room_2"
42
- elif scene_name == "0605_DFKI_coffee_room":
43
- new_scene_name = "Office_Room_1"
44
- elif scene_name == "0520_DFKI_parking1" or "0713_DFKI_parking2" or "0713_DFKI_parking3" or "0713_DFKI_parking4":
45
- new_scene_name = "Parking_Lot"
46
-
47
- if new_scene_name == "Parking_Lot":
48
- scene_base_paths_park = ["/mnt/seagate/workspace/data/Thierry/0520_DFKI_parking1/tripod/20230625_default_param_amp50/equi_viewpo_denoised/",
49
- "/mnt/seagate/workspace/data/Thierry/0713_DFKI_parking2/20230625_default_param_amp50/equi_viewpo_denoised/",
50
- "/mnt/seagate/workspace/data/Thierry/0713_DFKI_parking3/20230625_default_param_amp50/equi_viewpo_denoised/",
51
- "/mnt/seagate/workspace/data/Thierry/0713_DFKI_parking4/20230625_default_param_amp50/equi_viewpo_denoised/"]
52
- files = []
53
- for scene_base_path_park in scene_base_paths_park:
54
- files += natsorted(glob.glob(scene_base_path_park + file_name_rule))
55
- else:
56
- files = natsorted(glob.glob(scene_base_path + file_name_rule))
57
- return files, new_scene_name
58
-
59
-
60
- for scene_base_path in scene_base_paths:
61
- for modality in modality_dict.keys():
62
- input_files, new_scene_name = import_file_list(scene_base_path, modality_dict[modality], scene_name_idx)
63
- os.makedirs(output_base_folder + new_scene_name + "/" + modality, exist_ok=True)
64
-
65
- for input_file_idx, input_file in enumerate(input_files):
66
- # if scene_name == "221010_weingarten_hospital":
67
- # input_file_idx_0 = input_file.split(".")[0].split("/")[-1].split("_equi_")[0].split("_")[0]
68
- # input_file_idx_1 = input_file.split(".")[0].split("/")[-1].split("_equi_")[0].split("_")[1]
69
- # input_file_idx = int(input_file_idx_0) * int(input_file_idx_1)
70
- # else:
71
- # input_file_idx = input_file.split(".")[0].split("/")[-1].split("_equi_")[0]
72
- input_file_format = input_file.split("/")[-1].split("_equi_")[-1]
73
- output_file = f"{output_base_folder}{new_scene_name}/{modality}/{input_file_idx:03}_{new_scene_name}_equi_{input_file_format}"
74
- print("input_file >> ", input_file)
75
- print("output_file >> ", output_file)
76
- print("--------------------------")
77
- shutil.copy2(input_file, output_file)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
hospital_HHA_normal_rename.py DELETED
@@ -1,18 +0,0 @@
1
- import os
2
- import glob
3
- from natsort import natsorted
4
- import shutil
5
-
6
- base = "/mnt/seagate/workspace/data/Thierry/221010_weingarten_hospital/floor_B_test/B_0th_picked_up/equi_viewpo/"
7
-
8
- modality = ["HHA", "normal"]
9
-
10
- for moda in modality:
11
- file_list = natsorted(glob.glob(base + moda + "/*.png"))
12
-
13
- for file in file_list:
14
- file_name = file.split("/")[-1].split("_"+moda)[0]
15
- if moda == "HHA":
16
- os.rename(file, base+moda+"/"+file_name+"_equi_hha.png")
17
- elif moda == "normL":
18
- os.rename(file, base+moda+"/"+file_name+"_equi_normal.png")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
hugging_face_git.txt DELETED
@@ -1,5 +0,0 @@
1
- huggingface-cli login
2
- git clone git@hf.co:datasets/COLE-Ricoh/ToF-360
3
- git lfs install
4
- huggingface-cli lfs-enable-largefiles .
5
- git add .gitattributes