add display_table_height in renderUtil
This commit is contained in:
parent
b209ce050c
commit
865ae6d329
@ -6,21 +6,21 @@ runner:
|
|||||||
cuda_visible_devices: "0,1,2,3,4,5,6,7"
|
cuda_visible_devices: "0,1,2,3,4,5,6,7"
|
||||||
|
|
||||||
experiment:
|
experiment:
|
||||||
name: local_eval
|
name: local_full_eval
|
||||||
root_dir: "experiments"
|
root_dir: "experiments"
|
||||||
epoch: 555 # -1 stands for last epoch
|
epoch: 20 # -1 stands for last epoch
|
||||||
|
|
||||||
test:
|
test:
|
||||||
dataset_list:
|
dataset_list:
|
||||||
- OmniObject3d_train
|
- OmniObject3d_train
|
||||||
|
|
||||||
blender_script_path: "/media/hofee/data/project/python/nbv_reconstruction/blender/data_renderer.py"
|
blender_script_path: "/media/hofee/data/project/python/nbv_reconstruction/blender/data_renderer.py"
|
||||||
output_dir: "/media/hofee/data/project/python/nbv_reconstruction/sample_for_training/inference_result2"
|
output_dir: "/media/hofee/data/project/python/nbv_reconstruction/sample_for_training/inference_result_full"
|
||||||
pipeline: nbv_reconstruction_pipeline
|
pipeline: nbv_reconstruction_pipeline
|
||||||
|
|
||||||
dataset:
|
dataset:
|
||||||
OmniObject3d_train:
|
OmniObject3d_train:
|
||||||
root_dir: "/media/hofee/data/project/python/nbv_reconstruction/sample_for_training/sample_preprocessed_scenes"
|
root_dir: "/media/hofee/repository/nbv_reconstruction_data_512"
|
||||||
model_dir: "/media/hofee/data/data/scaled_object_meshes"
|
model_dir: "/media/hofee/data/data/scaled_object_meshes"
|
||||||
source: seq_nbv_reconstruction_dataset
|
source: seq_nbv_reconstruction_dataset
|
||||||
split_file: "/media/hofee/data/project/python/nbv_reconstruction/sample_for_training/OmniObject3d_train.txt"
|
split_file: "/media/hofee/data/project/python/nbv_reconstruction/sample_for_training/OmniObject3d_train.txt"
|
||||||
@ -30,7 +30,7 @@ dataset:
|
|||||||
batch_size: 1
|
batch_size: 1
|
||||||
num_workers: 12
|
num_workers: 12
|
||||||
pts_num: 4096
|
pts_num: 4096
|
||||||
load_from_preprocess: True
|
load_from_preprocess: False
|
||||||
|
|
||||||
pipeline:
|
pipeline:
|
||||||
nbv_reconstruction_pipeline:
|
nbv_reconstruction_pipeline:
|
||||||
|
@ -3,13 +3,14 @@ import os
|
|||||||
import json
|
import json
|
||||||
import subprocess
|
import subprocess
|
||||||
import tempfile
|
import tempfile
|
||||||
|
import shutil
|
||||||
from utils.data_load import DataLoadUtil
|
from utils.data_load import DataLoadUtil
|
||||||
from utils.reconstruction import ReconstructionUtil
|
from utils.reconstruction import ReconstructionUtil
|
||||||
from utils.pts import PtsUtil
|
from utils.pts import PtsUtil
|
||||||
class RenderUtil:
|
class RenderUtil:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def render_pts(cam_pose, scene_path,script_path, model_points_normals, voxel_threshold=0.005, filter_degree=75, nO_to_nL_pose=None, require_full_scene=False):
|
def render_pts(cam_pose, scene_path, script_path, model_points_normals, voxel_threshold=0.005, filter_degree=75, nO_to_nL_pose=None, require_full_scene=False):
|
||||||
|
|
||||||
nO_to_world_pose = DataLoadUtil.get_real_cam_O_from_cam_L(cam_pose, nO_to_nL_pose, scene_path=scene_path)
|
nO_to_world_pose = DataLoadUtil.get_real_cam_O_from_cam_L(cam_pose, nO_to_nL_pose, scene_path=scene_path)
|
||||||
|
|
||||||
@ -19,6 +20,8 @@ class RenderUtil:
|
|||||||
"cam_pose": nO_to_world_pose.tolist(),
|
"cam_pose": nO_to_world_pose.tolist(),
|
||||||
"scene_path": scene_path
|
"scene_path": scene_path
|
||||||
}
|
}
|
||||||
|
scene_info_path = os.path.join(scene_path, "scene_info.json")
|
||||||
|
shutil.copy(scene_info_path, os.path.join(temp_dir, "scene_info.json"))
|
||||||
params_data_path = os.path.join(temp_dir, "params.json")
|
params_data_path = os.path.join(temp_dir, "params.json")
|
||||||
with open(params_data_path, 'w') as f:
|
with open(params_data_path, 'w') as f:
|
||||||
json.dump(params, f)
|
json.dump(params, f)
|
||||||
@ -30,6 +33,9 @@ class RenderUtil:
|
|||||||
print(result.stderr)
|
print(result.stderr)
|
||||||
return None
|
return None
|
||||||
path = os.path.join(temp_dir, "tmp")
|
path = os.path.join(temp_dir, "tmp")
|
||||||
|
# ------ Debug Start ------
|
||||||
|
import ipdb;ipdb.set_trace()
|
||||||
|
# ------ Debug End ------
|
||||||
point_cloud = DataLoadUtil.get_target_point_cloud_world_from_path(path, binocular=True)
|
point_cloud = DataLoadUtil.get_target_point_cloud_world_from_path(path, binocular=True)
|
||||||
cam_params = DataLoadUtil.load_cam_info(path, binocular=True)
|
cam_params = DataLoadUtil.load_cam_info(path, binocular=True)
|
||||||
filtered_point_cloud = ReconstructionUtil.filter_points(point_cloud, model_points_normals, cam_pose=cam_params["cam_to_world"], voxel_size=voxel_threshold, theta=filter_degree)
|
filtered_point_cloud = ReconstructionUtil.filter_points(point_cloud, model_points_normals, cam_pose=cam_params["cam_to_world"], voxel_size=voxel_threshold, theta=filter_degree)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user