solve merge
This commit is contained in:
commit
b13e45bafc
@ -84,7 +84,7 @@ module:
|
||||
gf_view_finder:
|
||||
t_feat_dim: 128
|
||||
pose_feat_dim: 256
|
||||
main_feat_dim: 2048
|
||||
main_feat_dim: 3072
|
||||
regression_head: Rx_Ry_and_T
|
||||
pose_mode: rot_matrix
|
||||
per_point_feature: False
|
||||
|
@ -7,7 +7,11 @@ runner:
|
||||
parallel: False
|
||||
|
||||
experiment:
|
||||
<<<<<<< HEAD
|
||||
name: test_new_pipeline_train_overfit
|
||||
=======
|
||||
name: debug
|
||||
>>>>>>> 63a246c0c87d42f04076a459adcfdc88c954b09c
|
||||
root_dir: "experiments"
|
||||
use_checkpoint: False
|
||||
epoch: -1 # -1 stands for last epoch
|
||||
@ -32,10 +36,10 @@ runner:
|
||||
|
||||
dataset:
|
||||
OmniObject3d_train:
|
||||
root_dir: "/data/hofee/data/packed_preprocessed_data"
|
||||
root_dir: "/home/data/hofee/project/nbv_rec/data/sample_for_training_new"
|
||||
model_dir: "../data/scaled_object_meshes"
|
||||
source: nbv_reconstruction_dataset
|
||||
split_file: "/data/hofee/data/OmniObject3d_train_overfit.txt"
|
||||
split_file: "/home/data/hofee/project/nbv_rec/data/sample.txt"
|
||||
type: train
|
||||
cache: True
|
||||
ratio: 1
|
||||
@ -44,27 +48,27 @@ dataset:
|
||||
pts_num: 4096
|
||||
load_from_preprocess: True
|
||||
|
||||
# OmniObject3d_test:
|
||||
# root_dir: "/data/hofee/data/packed_preprocessed_data"
|
||||
# model_dir: "../data/scaled_object_meshes"
|
||||
# source: nbv_reconstruction_dataset
|
||||
# split_file: "/data/hofee/data/OmniObject3d_test.txt"
|
||||
# type: test
|
||||
# cache: True
|
||||
# filter_degree: 75
|
||||
# eval_list:
|
||||
# - pose_diff
|
||||
# ratio: 0.05
|
||||
# batch_size: 160
|
||||
# num_workers: 12
|
||||
# pts_num: 4096
|
||||
# load_from_preprocess: True
|
||||
|
||||
OmniObject3d_val:
|
||||
root_dir: "/data/hofee/data/packed_preprocessed_data"
|
||||
OmniObject3d_test:
|
||||
root_dir: "/home/data/hofee/project/nbv_rec/data/sample_for_training_new"
|
||||
model_dir: "../data/scaled_object_meshes"
|
||||
source: nbv_reconstruction_dataset
|
||||
split_file: "/data/hofee/data/OmniObject3d_train_overfit.txt"
|
||||
split_file: "/home/data/hofee/project/nbv_rec/data/sample.txt"
|
||||
type: test
|
||||
cache: True
|
||||
filter_degree: 75
|
||||
eval_list:
|
||||
- pose_diff
|
||||
ratio: 0.05
|
||||
batch_size: 160
|
||||
num_workers: 12
|
||||
pts_num: 4096
|
||||
load_from_preprocess: True
|
||||
|
||||
OmniObject3d_val:
|
||||
root_dir: "/home/data/hofee/project/nbv_rec/data/sample_for_training_new"
|
||||
model_dir: "../data/scaled_object_meshes"
|
||||
source: nbv_reconstruction_dataset
|
||||
split_file: "/home/data/hofee/project/nbv_rec/data/sample.txt"
|
||||
type: test
|
||||
cache: True
|
||||
filter_degree: 75
|
||||
|
@ -121,19 +121,20 @@ class NBVReconstructionGlobalPointsPipeline(nn.Module):
|
||||
for seq_idx in range(seq_len):
|
||||
partial_idx_in_combined_pts = scanned_mask == seq_idx # Ndarray(V), N->V idx mask
|
||||
partial_perpoint_feat = perpoint_scanned_feat[partial_idx_in_combined_pts] # Ndarray(V x Dl)
|
||||
partial_feat = torch.max(partial_perpoint_feat, dim=0) # Tensor(Dl)
|
||||
partial_feat = torch.mean(partial_perpoint_feat, dim=0) # Tensor(Dl)
|
||||
partial_feat_seq.append(partial_feat)
|
||||
scanned_target_pts_num.append(partial_perpoint_feat.shape[0])
|
||||
|
||||
scanned_target_pts_num = torch.tensor(scanned_target_pts_num, dtype=torch.float32).to(device).unsqueeze(-1) # Tensor(S)
|
||||
scanned_n_to_world_pose_9d = scanned_n_to_world_pose_9d.to(device) # Tensor(S x 9)
|
||||
|
||||
scanned_target_pts_num = torch.tensor(scanned_target_pts_num, dtype=torch.float32).unsqueeze(-1).to(device) # Tensor(S x 1)
|
||||
scanned_n_to_world_pose_9d = scanned_n_to_world_pose_9d.to(device) # Tensor(S x 9)
|
||||
pose_feat_seq = self.pose_encoder.encode_pose(scanned_n_to_world_pose_9d) # Tensor(S x Dp)
|
||||
pts_num_feat_seq = self.pts_num_encoder.encode_pts_num(scanned_target_pts_num) # Tensor(S x Dn)
|
||||
partial_feat_seq = torch.stack(partial_feat_seq) # Tensor(S x Dl)
|
||||
seq_embedding = torch.cat([pose_feat_seq, pts_num_feat_seq, partial_feat_seq], dim=-1) # Tensor(S x (Dp+Dn+Dl))
|
||||
embedding_list_batch.append(seq_embedding) # List(B): Tensor(S x (Dp+Dn+Dl))
|
||||
|
||||
|
||||
seq_feat = self.transformer_seq_encoder.encode_sequence(embedding_list_batch) # Tensor(B x Ds)
|
||||
main_feat = torch.cat([seq_feat, global_scanned_feat], dim=-1) # Tensor(B x (Ds+Dg))
|
||||
|
||||
|
@ -34,7 +34,7 @@ class NBVReconstructionDataset(BaseDataset):
|
||||
#self.model_dir = config["model_dir"]
|
||||
self.filter_degree = config["filter_degree"]
|
||||
if self.type == namespace.Mode.TRAIN:
|
||||
scale_ratio = 1
|
||||
scale_ratio = 100
|
||||
self.datalist = self.datalist*scale_ratio
|
||||
if self.cache:
|
||||
expr_root = ConfigManager.get("runner", "experiment", "root_dir")
|
||||
@ -174,6 +174,7 @@ class NBVReconstructionDataset(BaseDataset):
|
||||
combined_scanned_views_pts_mask[start_idx:end_idx] = i
|
||||
start_idx = end_idx
|
||||
fps_downsampled_combined_scanned_pts_mask = combined_scanned_views_pts_mask[fps_idx]
|
||||
|
||||
data_item = {
|
||||
"scanned_pts": np.asarray(scanned_views_pts, dtype=np.float32), # Ndarray(S x Nv x 3)
|
||||
"scanned_pts_mask": np.asarray(fps_downsampled_combined_scanned_pts_mask,dtype=np.uint8), # Ndarray(N), range(0, S)
|
||||
|
@ -93,18 +93,8 @@ class StrategyGenerator(Runner):
|
||||
else:
|
||||
nrm = np.load(nrm_path)
|
||||
nrm_list.append(nrm)
|
||||
<<<<<<< HEAD
|
||||
|
||||
pts_list.append(pts)
|
||||
|
||||
indices = np.load(idx_path)
|
||||
|
||||
=======
|
||||
|
||||
indices = np.load(idx_path)
|
||||
pts_list.append(pts)
|
||||
|
||||
>>>>>>> a883a31968b668a26545f2e8766179365308b0e2
|
||||
scan_points_indices_list.append(indices)
|
||||
if pts.shape[0] > 0:
|
||||
non_zero_cnt += 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user