Compare commits
2 Commits
d7fb64ed13
...
2fcc650eb7
Author | SHA1 | Date | |
---|---|---|---|
2fcc650eb7 | |||
b20fa8bb75 |
9
app_sim.py
Normal file
9
app_sim.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
from PytorchBoot.application import PytorchBootApplication
|
||||||
|
from runners.simulator import Simulator
|
||||||
|
|
||||||
|
@PytorchBootApplication("sim")
|
||||||
|
class SimulateApp:
|
||||||
|
@staticmethod
|
||||||
|
def start():
|
||||||
|
Simulator("configs/server/server_split_dataset_config.yaml").run()
|
||||||
|
|
@ -6,16 +6,16 @@ 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: train_ab_global_only_dense
|
name: train_ab_global_only_p++_wp
|
||||||
root_dir: "experiments"
|
root_dir: "experiments"
|
||||||
epoch: 441 # -1 stands for last epoch
|
epoch: 922 # -1 stands for last epoch
|
||||||
|
|
||||||
test:
|
test:
|
||||||
dataset_list:
|
dataset_list:
|
||||||
- OmniObject3d_test
|
- OmniObject3d_test
|
||||||
|
|
||||||
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/data/p++_dense"
|
output_dir: "/media/hofee/data/data/p++_wp"
|
||||||
pipeline: nbv_reconstruction_pipeline
|
pipeline: nbv_reconstruction_pipeline
|
||||||
voxel_size: 0.003
|
voxel_size: 0.003
|
||||||
min_new_area: 1.0
|
min_new_area: 1.0
|
||||||
|
14
configs/local/simulation_config.yaml
Normal file
14
configs/local/simulation_config.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
runner:
|
||||||
|
general:
|
||||||
|
seed: 0
|
||||||
|
device: cuda
|
||||||
|
cuda_visible_devices: "0,1,2,3,4,5,6,7"
|
||||||
|
|
||||||
|
experiment:
|
||||||
|
name: simulation_debug
|
||||||
|
root_dir: "experiments"
|
||||||
|
|
||||||
|
simulation:
|
||||||
|
robot:
|
||||||
|
displaytable:
|
@ -45,15 +45,16 @@ ClsMSG_CFG_Light_2048 = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ClsMSG_CFG_Strong = {
|
ClsMSG_CFG_Strong = {
|
||||||
'NPOINTS': [1024, 512, 256, 128, None], # 增加采样点,获取更多细节
|
'NPOINTS': [512, 256, 128, 64, None],
|
||||||
'RADIUS': [[0.02, 0.05], [0.05, 0.1], [0.1, 0.2], [0.2, 0.4], [None, None]], # 增大感受野
|
'RADIUS': [[0.02, 0.04], [0.04, 0.08], [0.08, 0.16],[0.16, 0.32], [None, None]],
|
||||||
'NSAMPLE': [[32, 64], [32, 64], [32, 64], [32, 64], [None, None]], # 提高每层的采样点数
|
'NSAMPLE': [[16, 32], [16, 32], [16, 32], [16, 32], [None, None]],
|
||||||
'MLPS': [[[32, 32, 64], [64, 64, 128]], # 增强 MLP 层,增加特征提取能力
|
'MLPS': [[[16, 16, 32], [32, 32, 64]],
|
||||||
[[128, 128, 256], [128, 128, 256]],
|
[[64, 64, 128], [64, 96, 128]],
|
||||||
[[256, 256, 512], [256, 384, 512]],
|
[[128, 196, 256], [128, 196, 256]],
|
||||||
[[512, 512, 1024], [512, 768, 1024]],
|
[[256, 256, 512], [256, 512, 512]],
|
||||||
[[1024, 1024, 2048], [1024, 1024, 2048]]], # 增加更深的特征层
|
[[512, 512, 2048], [512, 1024, 2048]]
|
||||||
'DP_RATIO': 0.4, # Dropout 比率稍微降低,以保留更多信息
|
],
|
||||||
|
'DP_RATIO': 0.5,
|
||||||
}
|
}
|
||||||
|
|
||||||
ClsMSG_CFG_Lighter = {
|
ClsMSG_CFG_Lighter = {
|
||||||
|
@ -137,7 +137,7 @@ class Inferencer(Runner):
|
|||||||
pred_cr_seq = [last_pred_cr]
|
pred_cr_seq = [last_pred_cr]
|
||||||
success = 0
|
success = 0
|
||||||
last_pts_num = PtsUtil.voxel_downsample_point_cloud(data["first_scanned_pts"][0], voxel_threshold).shape[0]
|
last_pts_num = PtsUtil.voxel_downsample_point_cloud(data["first_scanned_pts"][0], voxel_threshold).shape[0]
|
||||||
import time
|
#import time
|
||||||
while len(pred_cr_seq) < max_iter and retry < max_retry and success < max_success:
|
while len(pred_cr_seq) < max_iter and retry < max_retry and success < max_success:
|
||||||
Log.green(f"iter: {len(pred_cr_seq)}, retry: {retry}/{max_retry}, success: {success}/{max_success}")
|
Log.green(f"iter: {len(pred_cr_seq)}, retry: {retry}/{max_retry}, success: {success}/{max_success}")
|
||||||
combined_scanned_pts = np.vstack(scanned_view_pts)
|
combined_scanned_pts = np.vstack(scanned_view_pts)
|
||||||
@ -229,7 +229,6 @@ class Inferencer(Runner):
|
|||||||
Log.success(f"delta pts num < {self.min_new_pts_num}:, {pts_num}, {last_pts_num}")
|
Log.success(f"delta pts num < {self.min_new_pts_num}:, {pts_num}, {last_pts_num}")
|
||||||
|
|
||||||
last_pts_num = pts_num
|
last_pts_num = pts_num
|
||||||
break
|
|
||||||
|
|
||||||
|
|
||||||
input_data["scanned_n_to_world_pose_9d"] = input_data["scanned_n_to_world_pose_9d"][0].cpu().numpy().tolist()
|
input_data["scanned_n_to_world_pose_9d"] = input_data["scanned_n_to_world_pose_9d"][0].cpu().numpy().tolist()
|
||||||
|
23
runners/simulator.py
Normal file
23
runners/simulator.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
from PytorchBoot.runners.runner import Runner
|
||||||
|
import PytorchBoot.stereotype as stereotype
|
||||||
|
|
||||||
|
@stereotype.runner("simulator")
|
||||||
|
class Simulator(Runner):
|
||||||
|
def __init__(self, config_path):
|
||||||
|
super().__init__(config_path)
|
||||||
|
self.config_path = config_path
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
print()
|
||||||
|
|
||||||
|
def prepare_env(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def create_env(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def create_experiment(self, backup_name=None):
|
||||||
|
return super().create_experiment(backup_name)
|
||||||
|
|
||||||
|
def load_experiment(self, backup_name=None):
|
||||||
|
super().load_experiment(backup_name)
|
Loading…
x
Reference in New Issue
Block a user