solve merge
This commit is contained in:
commit
b3344626cf
@ -11,7 +11,7 @@ runner:
|
|||||||
root_dir: "experiments"
|
root_dir: "experiments"
|
||||||
|
|
||||||
generate:
|
generate:
|
||||||
voxel_threshold: 0.01
|
voxel_threshold: 0.003
|
||||||
soft_overlap_threshold: 0.3
|
soft_overlap_threshold: 0.3
|
||||||
hard_overlap_threshold: 0.6
|
hard_overlap_threshold: 0.6
|
||||||
filter_degree: 75
|
filter_degree: 75
|
||||||
@ -21,15 +21,15 @@ runner:
|
|||||||
save_best_combined_points: False
|
save_best_combined_points: False
|
||||||
save_mesh: True
|
save_mesh: True
|
||||||
overwrite: False
|
overwrite: False
|
||||||
seq_num: 10
|
seq_num: 15
|
||||||
dataset_list:
|
dataset_list:
|
||||||
- OmniObject3d
|
- OmniObject3d
|
||||||
|
|
||||||
datasets:
|
datasets:
|
||||||
OmniObject3d:
|
OmniObject3d:
|
||||||
#"/media/hofee/data/data/temp_output"
|
#"/media/hofee/data/data/temp_output"
|
||||||
root_dir: "/media/hofee/data/data/box_output"
|
root_dir: /media/hofee/repository/full_data_output
|
||||||
model_dir: "/media/hofee/data/data/box_object_meshes"
|
model_dir: /media/hofee/data/data/scaled_object_meshes
|
||||||
from: 0
|
from: 0
|
||||||
to: -1 # -1 means end
|
to: -1 # -1 means end
|
||||||
#output_dir: "/media/hofee/data/data/label_output"
|
#output_dir: "/media/hofee/data/data/label_output"
|
||||||
|
@ -9,12 +9,15 @@ from utils.reconstruction import ReconstructionUtil
|
|||||||
from utils.data_load import DataLoadUtil
|
from utils.data_load import DataLoadUtil
|
||||||
from utils.pts import PtsUtil
|
from utils.pts import PtsUtil
|
||||||
|
|
||||||
|
# scan shoe 536
|
||||||
|
|
||||||
def save_np_pts(path, pts: np.ndarray, file_type="txt"):
|
def save_np_pts(path, pts: np.ndarray, file_type="txt"):
|
||||||
if file_type == "txt":
|
if file_type == "txt":
|
||||||
np.savetxt(path, pts)
|
np.savetxt(path, pts)
|
||||||
else:
|
else:
|
||||||
np.save(path, pts)
|
np.save(path, pts)
|
||||||
|
|
||||||
|
|
||||||
def save_target_points(root, scene, frame_idx, target_points: np.ndarray, file_type="txt"):
|
def save_target_points(root, scene, frame_idx, target_points: np.ndarray, file_type="txt"):
|
||||||
pts_path = os.path.join(root,scene, "pts", f"{frame_idx}.{file_type}")
|
pts_path = os.path.join(root,scene, "pts", f"{frame_idx}.{file_type}")
|
||||||
if not os.path.exists(os.path.join(root,scene, "pts")):
|
if not os.path.exists(os.path.join(root,scene, "pts")):
|
||||||
@ -87,7 +90,7 @@ def save_scene_data(root, scene, scene_idx=0, scene_total=1,file_type="txt"):
|
|||||||
target_mask_label = (0, 255, 0, 255)
|
target_mask_label = (0, 255, 0, 255)
|
||||||
display_table_mask_label=(0, 0, 255, 255)
|
display_table_mask_label=(0, 0, 255, 255)
|
||||||
random_downsample_N = 32768
|
random_downsample_N = 32768
|
||||||
voxel_size=0.002
|
voxel_size=0.003
|
||||||
filter_degree = 75
|
filter_degree = 75
|
||||||
min_z = 0.2
|
min_z = 0.2
|
||||||
max_z = 0.5
|
max_z = 0.5
|
||||||
@ -164,7 +167,7 @@ if __name__ == "__main__":
|
|||||||
# scene_list.append(line.strip())
|
# scene_list.append(line.strip())
|
||||||
scene_list = os.listdir(root)
|
scene_list = os.listdir(root)
|
||||||
from_idx = 0 # 1000
|
from_idx = 0 # 1000
|
||||||
to_idx = len(scene_list) # 1500
|
to_idx = 700 # 1500
|
||||||
print(scene_list)
|
print(scene_list)
|
||||||
|
|
||||||
|
|
||||||
@ -173,7 +176,7 @@ if __name__ == "__main__":
|
|||||||
total = to_idx - from_idx
|
total = to_idx - from_idx
|
||||||
for scene in scene_list[from_idx:to_idx]:
|
for scene in scene_list[from_idx:to_idx]:
|
||||||
start = time.time()
|
start = time.time()
|
||||||
save_scene_data(root, scene, cnt, total, file_type="txt")
|
save_scene_data(root, scene, cnt, total, file_type="npy")
|
||||||
cnt+=1
|
cnt+=1
|
||||||
end = time.time()
|
end = time.time()
|
||||||
print(f"Time cost: {end-start}")
|
print(f"Time cost: {end-start}")
|
||||||
|
@ -102,7 +102,7 @@ class StrategyGenerator(Runner):
|
|||||||
seq_num = min(self.seq_num, non_zero_cnt)
|
seq_num = min(self.seq_num, non_zero_cnt)
|
||||||
init_view_list = []
|
init_view_list = []
|
||||||
idx = 0
|
idx = 0
|
||||||
while len(init_view_list) < seq_num:
|
while len(init_view_list) < seq_num and idx < len(pts_list):
|
||||||
if pts_list[idx].shape[0] > 100:
|
if pts_list[idx].shape[0] > 100:
|
||||||
init_view_list.append(idx)
|
init_view_list.append(idx)
|
||||||
idx += 1
|
idx += 1
|
||||||
|
@ -9,7 +9,8 @@ class ViewGenerator(Runner):
|
|||||||
self.config_path = config_path
|
self.config_path = config_path
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
subprocess.run(['blender', '-b', '-P', '../blender/run_blender.py', '--', self.config_path])
|
result = subprocess.run(['blender', '-b', '-P', '../blender/run_blender.py', '--', self.config_path])
|
||||||
|
print()
|
||||||
|
|
||||||
def create_experiment(self, backup_name=None):
|
def create_experiment(self, backup_name=None):
|
||||||
return super().create_experiment(backup_name)
|
return super().create_experiment(backup_name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user