Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions configs/boeing_airplane/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
bound_method: "forward"
render_method: "splatfacto"
case_name: "boeing_airplane"
odd_type: "cylinder"
save_filename: null
debug: true

width: 256
height: 256
fx: 216
fy: 216
eps2d: 8.0

downsampling_ratio: 2
tile_size_abstract: 8
tile_size_render: 24
min_distance: 0.01
max_distance: 100.0
gs_batch: 20
part: [1, 2, 2]

data_time: "2026-01-31_235019"
checkpoint_filename: "step-000299999.ckpt"

bg_img_path: null
bg_pure_color: [0.0, 1.0, 0.0]

save_ref: true
save_bound: true
N_samples: 5
14 changes: 14 additions & 0 deletions configs/boeing_airplane/samples.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"index": 0,
"pose": [
3.096113,
0.375645,
3.329813,
-3.141593,
0.785398,
1.570796
],
"radius": 0.1
}
]
38 changes: 38 additions & 0 deletions configs/boeing_airplane/traj.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[
{
"index": 0,
"pose": [
3.096113,
0.375645,
3.329813,
-3.141593,
0.785398,
1.570796
],
"tangent": [
0.0,
-1.0,
0.0
],
"gate": null,
"radius": 0.1
},
{
"index": 1,
"pose": [
3.096113,
-0.624355,
3.329813,
-3.141593,
0.785398,
1.570796
],
"tangent": [
0.0,
-1.0,
0.0
],
"gate": null,
"radius": 0.1
}
]
21 changes: 17 additions & 4 deletions scripts/abstract_gsplat.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def main(setup_dict):
os.makedirs(save_folder_full)

# Load Trained 3DGS
scene_parameters = torch.load(checkpoint_file, weights_only=False)
scene_parameters = torch.load(checkpoint_file, weights_only=False, map_location=DEVICE)
means = scene_parameters['pipeline']['_model.gauss_params.means'].to(DEVICE)
quats = scene_parameters['pipeline']['_model.gauss_params.quats'].to(DEVICE)
opacities = torch.sigmoid(scene_parameters['pipeline']['_model.gauss_params.opacities']).to(DEVICE)
Expand Down Expand Up @@ -160,6 +160,11 @@ def main(setup_dict):
if save_bound:
img_lb = np.zeros((height, width,3))
img_ub = np.zeros((height, width,3))
input_dim = input_center.shape[-1]
img_lA = torch.zeros(height, width, 3, input_dim, device=DEVICE)
img_uA = torch.zeros(height, width, 3, input_dim, device=DEVICE)
img_lbias = torch.zeros(height, width, 3, device=DEVICE)
img_ubias = torch.zeros(height, width, 3, device=DEVICE)

# Create Tiles Queue
tiles_queue = [
Expand Down Expand Up @@ -188,11 +193,15 @@ def main(setup_dict):
img_ref[hl:hu, wl:wu, :] = ref_tile_np

if save_bound:
lb_tile, ub_tile = alpha_blending_ptb(verf_net, input_center, input_lb, input_ub, bound_method)
lb_tile, ub_tile, lA_tile, uA_tile, lbias_tile, ubias_tile = alpha_blending_ptb(verf_net, input_center, input_lb, input_ub, bound_method)
lb_tile_np = lb_tile.squeeze(0).detach().cpu().numpy() # [TH, TW, 3]
ub_tile_np = ub_tile.squeeze(0).detach().cpu().numpy()
img_lb[hl:hu, wl:wu, :] = lb_tile_np
img_ub[hl:hu, wl:wu, :] = ub_tile_np
img_lA[hl:hu, wl:wu, :, :] = lA_tile.squeeze(0)
img_uA[hl:hu, wl:wu, :, :] = uA_tile.squeeze(0)
img_lbias[hl:hu, wl:wu, :] = lbias_tile.squeeze(0)
img_ubias[hl:hu, wl:wu, :] = ubias_tile.squeeze(0)

if debug:
pbar3.update(1)
Expand All @@ -210,10 +219,14 @@ def main(setup_dict):
save_abstract_record(
save_dir=save_folder_full,
index = absimg_num,
lower_input = input_lb_org,
upper_input = input_ub_org,
lower_input = input_lb.squeeze(0),
upper_input = input_ub.squeeze(0),
lower_img=img_lb_f,
upper_img=img_ub_f,
img_lA=img_lA,
img_uA=img_uA,
img_lbias=img_lbias,
img_ubias=img_ubias,
point = base_trans,
direction = direction,
radius = radius,
Expand Down
4 changes: 2 additions & 2 deletions scripts/render_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def render_alpha(self, pose, scene_dict, eps_max=1.0):

covs_pix_det = (Ms_pix_00*Ms_pix_11-Ms_pix_01*Ms_pix_10)**2+(Ms_pix_00*Ms_pix_12-Ms_pix_02*Ms_pix_10)**2+(Ms_pix_01*Ms_pix_12-Ms_pix_02*Ms_pix_11)**2
# print(torch.min(covs_pix_det), torch.max(covs_pix_det))
covs_pix_det += depth*1e-20# May cause error
covs_pix_det += depth*1e-15# May cause error

covs_pix_00 = Ms_pix_00**2+Ms_pix_01**2+Ms_pix_02**2
covs_pix_01 = Ms_pix_00*Ms_pix_10+Ms_pix_01*Ms_pix_11+Ms_pix_02*Ms_pix_12
Expand Down Expand Up @@ -508,7 +508,7 @@ def render_alpha(self, pose, scene_dict, eps_max=1.0):
Ms_pix_12 = Ms_pix[:, :, 1, 2]

covs_pix_det = (Ms_pix_00*Ms_pix_11-Ms_pix_01*Ms_pix_10)**2+(Ms_pix_00*Ms_pix_12-Ms_pix_02*Ms_pix_10)**2+(Ms_pix_01*Ms_pix_12-Ms_pix_02*Ms_pix_11)**2
covs_pix_det += depth*1e-15 # May cause error
covs_pix_det += depth*1e-15

covs_pix_00 = Ms_pix_00**2+Ms_pix_01**2+Ms_pix_02**2
covs_pix_01 = Ms_pix_00*Ms_pix_10+Ms_pix_01*Ms_pix_11+Ms_pix_02*Ms_pix_12
Expand Down
Loading