This commit is contained in:
hofee 2024-10-16 00:24:41 +08:00
parent dee7211e0b
commit 31b3fa8399
3 changed files with 9 additions and 5 deletions

View File

@ -8,11 +8,11 @@ runner:
root_dir: experiments
generate:
port: 5004
from: 590
to: 2000 # -1 means all
object_dir: /media/hofee/data/data/scaled_object_meshes
from: 0
to: 1 # -1 means all
object_dir: /media/hofee/data/data/box_object_meshes
table_model_path: /media/hofee/data/data/others/table.obj
output_dir: /media/hofee/repository/full_data_output
output_dir: /media/hofee/data/data/box_views
binocular_vision: true
plane_size: 10
max_views: 512

View File

@ -9,12 +9,15 @@ from utils.reconstruction import ReconstructionUtil
from utils.data_load import DataLoadUtil
from utils.pts import PtsUtil
# scan shoe 536
def save_np_pts(path, pts: np.ndarray, file_type="txt"):
if file_type == "txt":
np.savetxt(path, pts)
else:
np.save(path, pts)
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}")
if not os.path.exists(os.path.join(root,scene, "pts")):

View File

@ -9,7 +9,8 @@ class ViewGenerator(Runner):
self.config_path = config_path
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):
return super().create_experiment(backup_name)