diff --git a/configs/server/server_train_config.yaml b/configs/server/server_train_config.yaml index c2464e2..0fe2fcc 100644 --- a/configs/server/server_train_config.yaml +++ b/configs/server/server_train_config.yaml @@ -3,11 +3,11 @@ runner: general: seed: 0 device: cuda - cuda_visible_devices: "1" + cuda_visible_devices: "0" parallel: False experiment: - name: debug + name: overfit_ab_local_only root_dir: "experiments" use_checkpoint: False epoch: -1 # -1 stands for last epoch @@ -32,46 +32,46 @@ runner: dataset: OmniObject3d_train: - root_dir: "/home/data/hofee/project/nbv_rec/data/sample_for_training_new" + root_dir: "/data/hofee/nbv_rec_part2_preprocessed" model_dir: "../data/scaled_object_meshes" source: nbv_reconstruction_dataset - split_file: "/home/data/hofee/project/nbv_rec/data/sample.txt" + split_file: "/data/hofee/data/sample.txt" type: train cache: True ratio: 1 - batch_size: 160 + batch_size: 64 num_workers: 16 pts_num: 8192 load_from_preprocess: True OmniObject3d_test: - root_dir: "/home/data/hofee/project/nbv_rec/data/sample_for_training_new" + root_dir: "/data/hofee/nbv_rec_part2_preprocessed" model_dir: "../data/scaled_object_meshes" source: nbv_reconstruction_dataset - split_file: "/home/data/hofee/project/nbv_rec/data/sample.txt" + split_file: "/data/hofee/data/sample.txt" type: test cache: True filter_degree: 75 eval_list: - pose_diff - ratio: 0.05 - batch_size: 160 + ratio: 1 + batch_size: 64 num_workers: 12 pts_num: 8192 load_from_preprocess: True OmniObject3d_val: - root_dir: "/home/data/hofee/project/nbv_rec/data/sample_for_training_new" + root_dir: "/data/hofee/nbv_rec_part2_preprocessed" model_dir: "../data/scaled_object_meshes" source: nbv_reconstruction_dataset - split_file: "/home/data/hofee/project/nbv_rec/data/sample.txt" + split_file: "/data/hofee/data/sample.txt" type: test cache: True filter_degree: 75 eval_list: - pose_diff - ratio: 0.005 - batch_size: 160 + ratio: 1 + batch_size: 64 num_workers: 12 pts_num: 8192 load_from_preprocess: True @@ -97,7 +97,7 @@ module: feature_transform: False transformer_seq_encoder: - embed_dim: 256 + embed_dim: 1280 num_heads: 4 ffn_dim: 256 num_layers: 3 @@ -106,7 +106,7 @@ module: gf_view_finder: t_feat_dim: 128 pose_feat_dim: 256 - main_feat_dim: 3072 + main_feat_dim: 2048 regression_head: Rx_Ry_and_T pose_mode: rot_matrix per_point_feature: False diff --git a/core/nbv_dataset.py b/core/nbv_dataset.py index 6564c56..9547d2f 100644 --- a/core/nbv_dataset.py +++ b/core/nbv_dataset.py @@ -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 = 100 + scale_ratio = 50 self.datalist = self.datalist*scale_ratio if self.cache: expr_root = ConfigManager.get("runner", "experiment", "root_dir") @@ -198,9 +198,6 @@ class NBVReconstructionDataset(BaseDataset): collate_data["best_to_world_pose_9d"] = torch.stack( [torch.tensor(item["best_to_world_pose_9d"]) for item in batch] ) - collate_data["scanned_pts_mask"] = torch.stack( - [torch.tensor(item["scanned_pts_mask"]) for item in batch] - ) for key in batch[0].keys(): if key not in [ diff --git a/core/pipeline.py b/core/pipeline.py index 4789414..54d8d80 100644 --- a/core/pipeline.py +++ b/core/pipeline.py @@ -20,8 +20,8 @@ class NBVReconstructionPipeline(nn.Module): self.pose_encoder = ComponentFactory.create( namespace.Stereotype.MODULE, self.module_config["pose_encoder"] ) - self.transformer_seq_encoder = ComponentFactory.create( - namespace.Stereotype.MODULE, self.module_config["transformer_seq_encoder"] + self.seq_encoder = ComponentFactory.create( + namespace.Stereotype.MODULE, self.module_config["seq_encoder"] ) self.view_finder = ComponentFactory.create( namespace.Stereotype.MODULE, self.module_config["view_finder"] @@ -107,7 +107,7 @@ class NBVReconstructionPipeline(nn.Module): seq_embedding = torch.cat([pose_feat_seq, pts_feat_seq], dim=-1) # Tensor(S x (Dp+Dl)) embedding_list_batch.append(seq_embedding) # List(B): Tensor(S x (Dp+Dl)) - seq_feat = self.transformer_seq_encoder.encode_sequence(embedding_list_batch) # Tensor(B x Ds) + seq_feat = self.seq_encoder.encode_sequence(embedding_list_batch) # Tensor(B x Ds) main_feat = seq_feat # Tensor(B x Ds) if torch.isnan(main_feat).any():