Closed narges-tk closed 1 month ago
Hi, can you please investigate & share the size of the Data
object that is passed to CutPursuitPartition
? In particular:
data.num_points
) ?data.num_edges
) ?pcp_regularization
in your datamodule config) ?Thanks for your prompt reply! Here is the info for my train point cloud file:
data.num_points: 1576136
data.num_edges: 0
Besides, pcp_regularization: [0.1, 0.2, 0.3]
.
Furthermore, maybe the following info would be helpful
CONFIG
├── datamodule
│ └── partition_hf:
│ - linearity
│ - planarity
│ - scattering
│ - elevation
│ point_hf:
│ - intensity
│ - linearity
│ - planarity
│ - scattering
│ - verticality
│ - elevation
│ segment_base_hf: []
│ segment_mean_hf: []
│ segment_std_hf: []
│ edge_hf:
│ - mean_off
│ - std_off
│ - mean_dist
│ - angle_source
│ - angle_target
│ - centroid_dir
│ - centroid_dist
│ - normal_angle
│ - log_length
│ - log_surface
│ - log_volume
│ - log_size
│ v_edge_hf: []
│ h_edge_hf_need_normal: true
│ v_edge_hf_need_normal: false
│ edge_hf_need_log_length: true
│ edge_hf_need_log_surface: true
│ edge_hf_need_log_volume: true
│ edge_hf_need_log_size: true
│ extra_point_hf: []
│ extra_segment_hf:
│ - normal
│ - log_length
│ - log_surface
│ - log_volume
│ - log_size
│ segment_hf: []
│ point_hf_preprocess:
│ - planarity
│ - linearity
│ - scattering
│ - verticality
│ - elevation
│ - intensity
│ segment_base_hf_preprocess:
│ - normal
│ - log_size
│ - log_volume
│ - log_surface
│ - log_length
│ segment_mean_hf_preprocess: []
│ segment_std_hf_preprocess: []
│ num_hf_point: 6
│ num_hf_segment: 0
│ num_hf_edge: 18
│ num_hf_v_edge: 0
│ obj_key:
│ - obj
│ point_full_res_key:
│ - sub
│ point_save_keys: null
│ point_no_save_keys:
│ - edge_index
│ - edge_attr
│ - neighbor_index
│ - neighbor_distance
│ - node_size
│ - grid_size
│ segment_save_keys: null
│ point_basic_load_keys:
│ - pos
│ - pos_offset
│ - 'y'
│ - obj
│ - super_index
│ segment_basic_load_keys:
│ - pos
│ - 'y'
│ - super_index
│ - sub
│ - edge_index
│ - edge_attr
│ point_load_keys:
│ - planarity
│ - obj
│ - linearity
│ - super_index
│ - pos
│ - scattering
│ - verticality
│ - elevation
│ - pos_offset
│ - intensity
│ - 'y'
│ segment_load_keys:
│ - normal
│ - edge_attr
│ - obj
│ - sub
│ - pos
│ - super_index
│ - log_volume
│ - log_size
│ - log_surface
│ - edge_index
│ - log_length
│ - 'y'
│ feat_size:
│ pos: 3
│ pos_room: 3
│ rgb: 3
│ hsv: 3
│ lab: 3
│ density: 1
│ linearity: 1
│ planarity: 1
│ scattering: 1
│ verticality: 1
│ normal: 3
│ length: 1
│ surface: 1
│ volume: 1
│ curvature: 1
│ elevation: 1
│ size: 1
│ intensity: 1
│ log_pos: 3
│ log_pos_room: 3
│ log_rgb: 3
│ log_hsv: 3
│ log_lab: 3
│ log_density: 1
│ log_linearity: 1
│ log_planarity: 1
│ log_scattering: 1
│ log_verticality: 1
│ log_normal: 3
│ log_length: 1
│ log_surface: 1
│ log_volume: 1
│ log_curvature: 1
│ log_elevation: 1
│ log_size: 1
│ mean_pos: 3
│ mean_pos_room: 3
│ mean_rgb: 3
│ mean_hsv: 3
│ mean_lab: 3
│ mean_density: 1
│ mean_linearity: 1
│ mean_planarity: 1
│ mean_scattering: 1
│ mean_verticality: 1
│ mean_normal: 3
│ mean_length: 1
│ mean_surface: 1
│ mean_volume: 1
│ mean_curvature: 1
│ mean_elevation: 1
│ mean_size: 1
│ mean_intensity: 1
│ std_pos: 3
│ std_pos_room: 3
│ std_rgb: 3
│ std_hsv: 3
│ std_lab: 3
│ std_density: 1
│ std_linearity: 1
│ std_planarity: 1
│ std_scattering: 1
│ std_verticality: 1
│ std_normal: 3
│ std_length: 1
│ std_surface: 1
│ std_volume: 1
│ std_curvature: 1
│ std_elevation: 1
│ std_size: 1
│ std_intensity: 1
│ mean_off: 3
│ std_off: 3
│ mean_dist: 1
│ angle_source: 1
│ angle_target: 1
│ centroid_dir: 3
│ centroid_dist: 1
│ normal_angle: 1
│ _target_: src.datamodules.tree.TREEDataModule
│ data_dir: /home/ntakhtke/superpoint_transformer/data/
│ num_classes: 5
│ stuff_classes: []
│ instance: true
│ instance_k_max: 20
│ instance_radius: 20
│ min_instance_size: 100
│ mini: false
│ save_y_to_csr: true
│ save_pos_dtype: float32
│ save_fp_dtype: float16
│ in_memory: false
│ lite_preprocessing: true
│ load_full_res_idx: false
│ max_num_nodes: 50000
│ max_num_edges: 1000000
│ pre_transform:
│ - transform: SaveNodeIndex
│ params:
│ key: sub
│ - transform: DataTo
│ params:
│ device: cuda
│ - transform: GridSampling3D
│ params:
│ size: 0.1
│ hist_key: 'y'
│ hist_size: 6
│ - transform: KNN
│ params:
│ k: 25
│ r_max: 10
│ verbose: false
│ - transform: DataTo
│ params:
│ device: cpu
│ - transform: GroundElevation
│ params:
│ threshold: 3#d=5
│ scale: 40#d=20
│ - transform: PointFeatures
│ params:
│ keys:
│ - planarity
│ - linearity
│ - scattering
│ - verticality
│ - elevation
│ - intensity
│ k_min: 1
│ k_step: -1
│ k_min_search: 10
│ - transform: DataTo
│ params:
│ device: cuda
│ - transform: AdjacencyGraph
│ params:
│ k: 10
│ w: 1
│ - transform: ConnectIsolated
│ params:
│ k: 1
│ - transform: DataTo
│ params:
│ device: cpu
│ - transform: AddKeysTo
│ params:
│ keys:
│ - linearity
│ - planarity
│ - scattering
│ - elevation
│ to: x
│ delete_after: false
│ - transform: CutPursuitPartition
│ params:
│ regularization:
│ - 0.1
│ - 0.2
│ - 0.3
│ spatial_weight:
│ - 0.1
│ - 0.01
│ - 0.001
│ k_adjacency: 10
│ cutoff:
│ - 10
│ - 30
│ - 100
│ iterations: 15
│ parallel: true
│ verbose: false
│ - transform: NAGRemoveKeys
│ params:
│ level: all
│ keys: x
│ - transform: NAGTo
│ params:
│ device: cuda
│ - transform: SegmentFeatures
│ params:
│ n_min: 32
│ n_max: 128
│ keys:
│ - normal
│ - log_size
│ - log_volume
│ - log_surface
│ - log_length
│ mean_keys: []
│ std_keys: []
│ strict: false
│ - transform: RadiusHorizontalGraph
│ params:
│ k_min: 1
│ k_max: 30
│ gap:
│ - 5
│ - 30
│ - 30
│ se_ratio: 0.3
│ se_min: 20
│ cycles: 3
│ margin: 0.5
│ chunk_size:
│ - 1000000.0
│ - 100000.0
│ - 100000.0
│ halfspace_filter: true
│ bbox_filter: true
│ target_pc_flip: true
│ source_pc_sort: false
│ keys:
│ - mean_off
│ - std_off
│ - mean_dist
│ - transform: NAGTo
│ params:
│ device: cpu
│ train_transform: null
│ val_transform: null
│ test_transform: null
│ on_device_train_transform:
│ - transform: NodeSize
│ - transform: SampleSubNodes
│ params:
│ low: 0
│ high: 1
│ n_min: 32
│ n_max: 128
│ - transform: SampleRadiusSubgraphs
│ params:
│ r: 50
│ k: 4
│ i_level: 1
│ by_size: false
│ by_class: false
│ disjoint: true
│ - transform: SampleSegments
│ params:
│ ratio: 0.2
│ by_size: true
│ by_class: false
│ - transform: NAGRestrictSize
│ params:
│ level: 1+
│ num_nodes: 50000
│ - transform: NAGCast
│ - transform: NAGJitterKey
│ params:
│ key: pos
│ sigma: 0.05
│ trunc: 0.1
│ - transform: RandomTiltAndRotatdalese
│ params:
│ phi: 0.1
│ theta: 180
│ - transform: RandomAnisotropicScale
│ params:
│ delta: 0.2
│ - transform: RandomAxisFlip
│ params:
│ p: 0.5
│ - transform: OnTheFlyHorizontalEdgeFeatures
│ params:
│ keys:
│ - mean_off
│ - std_off
│ - mean_dist
│ - angle_source
│ - angle_target
│ - centroid_dir
│ - centroid_dist
│ - normal_angle
│ - log_length
│ - log_surface
│ - log_volume
│ - log_size
│ use_mean_normal: false
│ - transform: OnTheFlyVerticalEdgeFeatures
│ params:
│ keys: []
│ use_mean_normal: false
│ - transform: SampleEdges
│ params:
│ level: 1+
│ n_min: -1
│ n_max: -1
│ - transform: NAGRestrictSize
│ params:
│ level: 1+
│ num_edges: 1000000
│ - transform: NAGAddKeysTo
│ params:
│ level: 0
│ keys:
│ - intensity
│ - linearity
│ - planarity
│ - scattering
│ - verticality
│ - elevation
│ to: x
│ - transform: NAGAddKeysTo
│ params:
│ level: 1+
│ keys: []
│ to: x
│ - transform: NAGJitterKey
│ params:
│ key: x
│ sigma: 0
│ trunc: 0
│ - transform: NAGJitterKey
│ params:
│ key: edge_attr
│ sigma: 0
│ trunc: 0
│ - transform: NAGJitterKey
│ params:
│ key: v_edge_attr
│ sigma: 0
│ trunc: 0
│ - transform: NAGDropoutColumns
│ params:
│ p: 0
│ key: x
│ inplace: true
│ to_mean: false
│ - transform: NAGDropoutColumns
│ params:
│ p: 0.3
│ key: edge_attr
│ inplace: true
│ to_mean: false
│ - transform: NAGDropoutColumns
│ params:
│ p: 0
│ key: v_edge_attr
│ inplace: true
│ to_mean: false
│ - transform: NAGDropoutRows
│ params:
│ p: 0
│ key: x
│ to_mean: false
│ - transform: NAGDropoutRows
│ params:
│ p: 0
│ key: edge_attr
│ to_mean: false
│ - transform: NAGDropoutRows
│ params:
│ p: 0
│ key: v_edge_attr
│ to_mean: false
│ - transform: NAGAddSelfLoops
│ - transform: OnTheFlyInstanceGraph
│ params:
│ level: 1
│ num_classes: 5
│ k_max: 20
│ radius: 20
│ on_device_val_transform:
│ - transform: NodeSize
│ - transform: SampleSubNodes
│ params:
│ low: 0
│ high: 1
│ n_min: 128
│ n_max: 256
│ - transform: NAGCast
│ - transform: OnTheFlyHorizontalEdgeFeatures
│ params:
│ keys:
│ - mean_off
│ - std_off
│ - mean_dist
│ - angle_source
│ - angle_target
│ - centroid_dir
│ - centroid_dist
│ - normal_angle
│ - log_length
│ - log_surface
│ - log_volume
│ - log_size
│ use_mean_normal: false
│ - transform: OnTheFlyVerticalEdgeFeatures
│ params:
│ keys: []
│ use_mean_normal: false
│ - transform: NAGAddKeysTo
│ params:
│ level: 0
│ keys:
│ - intensity
│ - linearity
│ - planarity
│ - scattering
│ - verticality
│ - elevation
│ to: x
│ - transform: NAGAddKeysTo
│ params:
│ level: 1+
│ keys: []
│ to: x
│ - transform: NAGAddSelfLoops
│ - transform: OnTheFlyInstanceGraph
│ params:
│ level: 1
│ num_classes: 5
│ k_max: 20
│ radius: 20
│ on_device_test_transform:
│ - transform: NodeSize
│ - transform: SampleSubNodes
│ params:
│ low: 0
│ high: 1
│ n_min: 128
│ n_max: 256
│ - transform: NAGCast
│ - transform: OnTheFlyHorizontalEdgeFeatures
│ params:
│ keys:
│ - mean_off
│ - std_off
│ - mean_dist
│ - angle_source
│ - angle_target
│ - centroid_dir
│ - centroid_dist
│ - normal_angle
│ - log_length
│ - log_surface
│ - log_volume
│ - log_size
│ use_mean_normal: false
│ - transform: OnTheFlyVerticalEdgeFeatures
│ params:
│ keys: []
│ use_mean_normal: false
│ - transform: NAGAddKeysTo
│ params:
│ level: 0
│ keys:
│ - intensity
│ - linearity
│ - planarity
│ - scattering
│ - verticality
│ - elevation
│ to: x
│ - transform: NAGAddKeysTo
│ params:
│ level: 1+
│ keys: []
│ to: x
│ - transform: NAGAddSelfLoops
│ - transform: OnTheFlyInstanceGraph
│ params:
│ level: 1
│ num_classes: 5
│ k_max: 20
│ radius: 20
│ tta_runs: null
│ tta_val: false
│ submit: false
│ dataloader:
│ batch_size: 4
│ num_workers: 4
│ pin_memory: true
│ persistent_workers: true
│ trainval: true
│ val_on_test: False#True
│ xy_tiling: 3
│ voxel: 0.1
│ knn: 25
│ knn_r: 10
│ knn_step: -1
│ knn_min_search: 10
│ ground_threshold: 3#d=5
│ ground_scale: 40#d=20
│ pcp_regularization:
│ - 0.1
│ - 0.2
│ - 0.3
│ pcp_spatial_weight:
│ - 0.1
│ - 0.01
│ - 0.001
│ pcp_cutoff:
│ - 10
│ - 30
│ - 100
│ pcp_k_adjacency: 10
│ pcp_w_adjacency: 1
│ pcp_iterations: 15
│ graph_k_min: 1
│ graph_k_max: 30
│ graph_gap:
│ - 5
│ - 30
│ - 30
│ graph_se_ratio: 0.3
│ graph_se_min: 20
│ graph_cycles: 3
│ graph_margin: 0.5
│ graph_chunk:
│ - 1000000.0
│ - 100000.0
│ - 100000.0
│ sample_segment_ratio: 0.2
│ sample_segment_by_size: true
│ sample_segment_by_class: false
│ sample_point_min: 32
│ sample_point_max: 128
│ sample_graph_r: 50
│ sample_graph_k: 4
│ sample_graph_disjoint: true
│ sample_edge_n_min: -1
│ sample_edge_n_max: -1
│ pos_jitter: 0.05
│ tilt_n_rotate_phi: 0.1
│ tilt_n_rotate_theta: 180
│ anisotropic_scaling: 0.2
│ node_feat_jitter: 0
│ h_edge_feat_jitter: 0
│ v_edge_feat_jitter: 0
│ node_feat_drop: 0
│ h_edge_feat_drop: 0.3
│ v_edge_feat_drop: 0
│ node_row_drop: 0
│ h_edge_row_drop: 0
│ v_edge_row_drop: 0
│ drop_to_mean: false
│
├── model
│ └── _target_: src.models.panoptic.PanopticSegmentationModule
│ num_classes: 5
│ sampling_loss: false
│ loss_type: ce_kl
│ weighted_loss: true
│ init_linear: null
│ init_rpe: null
│ multi_stage_loss_lambdas:
│ - 1
│ - 50
│ transformer_lr_scale: 0.1
│ gc_every_n_steps: 0
│ optimizer:
│ _target_: torch.optim.AdamW
│ _partial_: true
│ lr: 0.01
│ weight_decay: 0.0001
│ scheduler:
│ _target_: src.optim.CosineAnnealingLRWithWarmup
│ _partial_: true
│ T_max: 380
│ eta_min: 1.0e-06
│ warmup_init_lr: 1.0e-06
│ num_warmup: 20
│ warmup_strategy: cos
│ criterion:
│ _target_: torch.nn.CrossEntropyLoss
│ ignore_index: 5
│ _point_mlp:
│ - 32
│ - 64
│ - 64
│ _node_mlp_out: 32
│ _h_edge_mlp_out: 32
│ _v_edge_mlp_out: 32
│ _point_hf_dim: 10
│ _node_hf_dim: 0
│ _node_injection_dim: 4
│ _h_edge_hf_dim: 18
│ _v_edge_hf_dim: 0
│ _down_dim:
│ - 64
│ - 64
│ - 64
│ - 64
│ _up_dim:
│ - 64
│ - 64
│ - 64
│ _mlp_depth: 2
│ net:
│ point_mlp:
│ - 10
│ - 32
│ - 64
│ - 64
│ point_drop: null
│ down_dim:
│ - 64
│ - 64
│ down_pool_dim:
│ - 64
│ - 64
│ - 64
│ - 64
│ down_in_mlp:
│ - - 68
│ - 64
│ - 64
│ - - 68
│ - 64
│ - 64
│ down_out_mlp: null
│ down_mlp_drop: null
│ down_num_heads: 16
│ down_num_blocks: 3
│ down_ffn_ratio: 1
│ down_residual_drop: null
│ down_attn_drop: null
│ down_drop_path: null
│ up_dim:
│ - 64
│ up_in_mlp:
│ - - 132
│ - 64
│ - 64
│ up_out_mlp: null
│ up_mlp_drop: null
│ up_num_heads: 16
│ up_num_blocks: 1
│ up_ffn_ratio: 1
│ up_residual_drop: null
│ up_attn_drop: null
│ up_drop_path: null
│ activation:
│ _target_: torch.nn.LeakyReLU
│ norm:
│ _target_: src.nn.GraphNorm
│ _partial_: true
│ pre_norm: true
│ no_sa: false
│ no_ffn: true
│ qk_dim: 4
│ qkv_bias: true
│ qk_scale: null
│ in_rpe_dim: 32
│ k_rpe: true
│ q_rpe: true
│ v_rpe: true
│ k_delta_rpe: false
│ q_delta_rpe: false
│ qk_share_rpe: false
│ q_on_minus_rpe: false
│ stages_share_rpe: false
│ blocks_share_rpe: false
│ heads_share_rpe: false
│ _target_: src.models.components.spt.SPT
│ nano: false
│ node_mlp: null
│ h_edge_mlp:
│ - 18
│ - 32
│ - 32
│ v_edge_mlp:
│ - 0
│ - 32
│ - 32
│ share_hf_mlps: false
│ mlp_activation:
│ _target_: torch.nn.LeakyReLU
│ mlp_norm:
│ _target_: src.nn.GraphNorm
│ _partial_: true
│ use_pos: true
│ use_node_hf: true
│ use_diameter: false
│ use_diameter_parent: true
│ pool: max
│ unpool: index
│ fusion: cat
│ norm_mode: graph
│ stuff_classes: []
│ min_instance_size: 100
│ edge_affinity_head:
│ _target_: src.nn.MLP
│ dims:
│ - 128
│ - 32
│ - 16
│ - 1
│ activation:
│ _target_: torch.nn.LeakyReLU
│ norm: null
│ last_norm: false
│ last_activation: false
│ partitioner:
│ _target_: src.nn.instance.InstancePartitioner
│ regularization: 20
│ x_weight: 0.05
│ cutoff: 100
│ partition_every_n_epoch: 10
│ no_instance_metrics: true
│ no_instance_metrics_on_train_set: true
│ edge_affinity_criterion:
│ _target_: src.loss.BCEWithLogitsLoss
│ weight: null
│ edge_affinity_loss_weights:
│ - 1
│ - 1
│ - 1
│ - 1
│ node_offset_criterion:
│ _target_: src.loss.WeightedL2Loss
│ edge_affinity_loss_lambda: 10
│ node_offset_loss_lambda: 1
│
├── callbacks
│ └── model_checkpoint:
│ _target_: pytorch_lightning.callbacks.ModelCheckpoint
│ dirpath: /home/ntakhtke/superpoint_transformer/logs/train/runs/2024-08-02_17-32-38/checkpoints
│ filename: epoch_{epoch:03d}
│ monitor: val/pq
│ verbose: false
│ save_last: true
│ save_top_k: 1
│ mode: max
│ auto_insert_metric_name: false
│ save_weights_only: false
│ every_n_train_steps: null
│ train_time_interval: null
│ every_n_epochs: 10
│ save_on_train_epoch_end: null
│ early_stopping:
│ _target_: pytorch_lightning.callbacks.EarlyStopping
│ monitor: val/pq
│ min_delta: 0.0
│ patience: 500
│ verbose: false
│ mode: max
│ strict: false
│ check_finite: true
│ stopping_threshold: null
│ divergence_threshold: null
│ check_on_train_epoch_end: null
│ model_summary:
│ _target_: pytorch_lightning.callbacks.RichModelSummary
│ max_depth: -1
│ rich_progress_bar:
│ _target_: pytorch_lightning.callbacks.RichProgressBar
│ lr_monitor:
│ _target_: pytorch_lightning.callbacks.LearningRateMonitor
│ logging_interval: epoch
│ log_momentum: true
│ gradient_accumulator:
│ _target_: pytorch_lightning.callbacks.GradientAccumulationScheduler
│ scheduling:
│ 0: 1
│
├── logger
│ └── wandb:
│ _target_: pytorch_lightning.loggers.wandb.WandbLogger
│ save_dir: /home/ntakhtke/superpoint_transformer/logs/train/runs/2024-08-02_17-32-38
│ offline: false
│ id: null
│ anonymous: null
│ project: spt_tree
│ log_model: false
│ prefix: ''
│ group: ''
│ tags: []
│ job_type: ''
│ name: SPT-64
│
├── trainer
│ └── _target_: pytorch_lightning.Trainer
│ default_root_dir: /home/ntakhtke/superpoint_transformer/logs/train/runs/2024-08-02_17-32-38
│ min_epochs: 1
│ max_epochs: 400
│ accelerator: gpu
│ devices: 1
│ check_val_every_n_epoch: 10
│ deterministic: false
│ precision: 32
│
├── paths
│ └── root_dir: /home/ntakhtke/superpoint_transformer
│ data_dir: /home/ntakhtke/superpoint_transformer/data/
│ log_dir: /home/ntakhtke/superpoint_transformer/logs/
│ output_dir: /home/ntakhtke/superpoint_transformer/logs/train/runs/2024-08-02_17-32-38
│ work_dir: /home/ntakhtke/superpoint_transformer
│
├── extras
│ └── ignore_warnings: false
│ enforce_tags: true
│ print_config: true
│
├── task_name
│ └── train
├── optimized_metric
│ └── val/pq
├── tags
│ └── ['dev']
├── train
│ └── True
├── test
│ └── True
├── compile
│ └── False
├── ckpt_path
│ └── None
├── seed
│ └── None
└── float32_matmul_precision
└── high
data.num_edges: 0
is the problem, you have no edges in your adjacency graph, which is why CutPursuitPartition
fails. You probably need to adjust the datamodule config to suit your dataset. In particular, you should adjust the knn
and knn_r
parameters used for nearest neighbor search. Check the provided notebooks and commented code to understand what these do.
Thanks a lot! I tried to change knn, knn-r, and pcp_regularization. However, now I am facing a crash by the following error.
[2024-08-03 12:56:18,739][src.datamodules.base][ERROR] - Error trying to create on_device_train_transform, [{'transform': 'NodeSize'}, {'transform': 'SampleSubNodes', 'params': {'low': 0, 'high': 1, 'n_min': 32, 'n_max': 128}}, {'transform': 'SampleRadiusSubgraphs', 'params': {'r': 50, 'k': 4, 'i_level': 1, 'by_size': False, 'by_class': False, 'disjoint': True}}, {'transform': 'SampleSegments', 'params': {'ratio': 0.2, 'by_size': True, 'by_class': False}}, {'transform': 'NAGRestrictSize', 'params': {'level': '1+', 'num_nodes': 50000}}, {'transform': 'NAGCast'}, {'transform': 'NAGJitterKey', 'params': {'key': 'pos', 'sigma': 0.05, 'trunc': 0.1}}, {'transform': 'RandomTiltAndRotatdalese', 'params': {'phi': 0.1, 'theta': 180}}, {'transform': 'RandomAnisotropicScale', 'params': {'delta': 0.2}}, {'transform': 'RandomAxisFlip', 'params': {'p': 0.5}}, {'transform': 'OnTheFlyHorizontalEdgeFeatures', 'params': {'keys': ['mean_off', 'std_off', 'mean_dist', 'angle_source', 'angle_target', 'centroid_dir', 'centroid_dist', 'normal_angle', 'log_length', 'log_surface', 'log_volume', 'log_size'], 'use_mean_normal': False}}, {'transform': 'OnTheFlyVerticalEdgeFeatures', 'params': {'keys': [], 'use_mean_normal': False}}, {'transform': 'SampleEdges', 'params': {'level': '1+', 'n_min': -1, 'n_max': -1}}, {'transform': 'NAGRestrictSize', 'params': {'level': '1+', 'num_edges': 1000000}}, {'transform': 'NAGAddKeysTo', 'params': {'level': 0, 'keys': ['intensity', 'linearity', 'planarity', 'scattering', 'verticality', 'elevation'], 'to': 'x'}}, {'transform': 'NAGAddKeysTo', 'params': {'level': '1+', 'keys': [], 'to': 'x'}}, {'transform': 'NAGJitterKey', 'params': {'key': 'x', 'sigma': 0, 'trunc': 0}}, {'transform': 'NAGJitterKey', 'params': {'key': 'edge_attr', 'sigma': 0, 'trunc': 0}}, {'transform': 'NAGJitterKey', 'params': {'key': 'v_edge_attr', 'sigma': 0, 'trunc': 0}}, {'transform': 'NAGDropoutColumns', 'params': {'p': 0, 'key': 'x', 'inplace': True, 'to_mean': False}}, {'transform': 'NAGDropoutColumns', 'params': {'p': 0.3, 'key': 'edge_attr', 'inplace': True, 'to_mean': False}}, {'transform': 'NAGDropoutColumns', 'params': {'p': 0, 'key': 'v_edge_attr', 'inplace': True, 'to_mean': False}}, {'transform': 'NAGDropoutRows', 'params': {'p': 0, 'key': 'x', 'to_mean': False}}, {'transform': 'NAGDropoutRows', 'params': {'p': 0, 'key': 'edge_attr', 'to_mean': False}}, {'transform': 'NAGDropoutRows', 'params': {'p': 0, 'key': 'v_edge_attr', 'to_mean': False}}, {'transform': 'NAGAddSelfLoops'}, {'transform': 'OnTheFlyInstanceGraph', 'params': {'level': 1, 'num_classes': 5, 'k_max': '20#d=20', 'radius': '20#d=20'}}]
Traceback (most recent call last):
File "/home/ntakhtke/superpoint_transformer/src/datamodules/base.py", line 195, in set_transforms
transform = instantiate_transforms(params)
File "/home/ntakhtke/superpoint_transformer/src/transforms/__init__.py", line 102, in instantiate_transforms
transforms.append(instantiate_transform(transform))
File "/home/ntakhtke/superpoint_transformer/src/transforms/__init__.py", line 63, in instantiate_transform
raise ValueError(f"Transform {tr_name} is nowhere to be found")
ValueError: Transform RandomTiltAndRotatdalese is nowhere to be found
[2024-08-03 12:56:18,741][__main__][INFO] - Instantiating model <src.models.panoptic.PanopticSegmentationModule>
/home/ntakhtke/miniconda3/envs/spt2/lib/python3.8/site-packages/pytorch_lightning/utilities/parsing.py:199: Attribute 'node_offset_criterion' is an instance of `nn.Module` and is already saved during checkpointing. It is recommended to ignore them using `self.save_hyperparameters(ignore=['node_offset_criterion'])`.
[2024-08-03 12:56:18,877][__main__][INFO] - Instantiating callbacks...
[2024-08-03 12:56:18,877][src.utils.utils][INFO] - Instantiating callback <pytorch_lightning.callbacks.ModelCheckpoint>
[2024-08-03 12:56:18,881][src.utils.utils][INFO] - Instantiating callback <pytorch_lightning.callbacks.EarlyStopping>
[2024-08-03 12:56:18,882][src.utils.utils][INFO] - Instantiating callback <pytorch_lightning.callbacks.RichModelSummary>
[2024-08-03 12:56:18,883][src.utils.utils][INFO] - Instantiating callback <pytorch_lightning.callbacks.RichProgressBar>
[2024-08-03 12:56:18,884][src.utils.utils][INFO] - Instantiating callback <pytorch_lightning.callbacks.LearningRateMonitor>
[2024-08-03 12:56:18,884][src.utils.utils][INFO] - Instantiating callback <pytorch_lightning.callbacks.GradientAccumulationScheduler>
[2024-08-03 12:56:18,885][__main__][INFO] - Instantiating loggers...
[2024-08-03 12:56:18,885][src.utils.utils][INFO] - Instantiating logger <pytorch_lightning.loggers.wandb.WandbLogger>
[2024-08-03 12:56:18,931][__main__][INFO] - Instantiating trainer <pytorch_lightning.Trainer>
Trainer already configured with model summary callbacks: [<class 'pytorch_lightning.callbacks.rich_model_summary.RichModelSummary'>]. Skipping setting a default `ModelSummary` callback.
GPU available: True (cuda), used: True
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
[2024-08-03 12:56:19,057][__main__][INFO] - Logging hyperparameters!
wandb: Currently logged in as: ntakhtkeshha (3dom). Use `wandb login --relogin` to force relogin
wandb: wandb version 0.17.5 is available! To upgrade, please run:
wandb: $ pip install wandb --upgrade
wandb: Tracking run with wandb version 0.16.6
wandb: Run data is saved locally in /home/ntakhtke/superpoint_transformer/logs/train/runs/2024-08-03_12-56-17/wandb/run-20240803_125620-6cz5f573
wandb: Run `wandb offline` to turn off syncing.
wandb: Syncing run SPT-64
wandb: ⭐️ View project at https://wandb.ai/3dom/spt_tree
wandb: View run at https://wandb.ai/3dom/spt_tree/runs/6cz5f573
[2024-08-03 12:56:26,288][__main__][INFO] - Starting training!
Processing...
0%| | 0/18 [00:00<?, ?it/s]malloc(): corrupted top size
Segmentation fault (core dumped)
Your message error tells you everything:
ValueError: Transform RandomTiltAndRotatdalese is nowhere to be found
We have not created and do not support any RandomTiltAndRotatdalese
in the released codebase.
Many thanks! You are right! Now I am getting a new error related to the type. Does it mean the setting of knn, knn_r,... is fine or I should re-change them?
Error executing job with overrides: ['experiment=panoptic/tree']
Traceback (most recent call last):
File "src/train.py", line 139, in main
metric_dict, _ = train(cfg)
File "/home/ntakhtke/superpoint_transformer/src/utils/utils.py", line 48, in wrap
raise ex
File "/home/ntakhtke/superpoint_transformer/src/utils/utils.py", line 45, in wrap
metric_dict, object_dict = task_func(cfg=cfg)
File "src/train.py", line 114, in train
trainer.fit(model=model, datamodule=datamodule, ckpt_path=cfg.get("ckpt_path"))
File "/home/ntakhtke/miniconda3/envs/spt2/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 544, in fit
call._call_and_handle_interrupt(
File "/home/ntakhtke/miniconda3/envs/spt2/lib/python3.8/site-packages/pytorch_lightning/trainer/call.py", line 44, in _call_and_handle_interrupt
return trainer_fn(*args, **kwargs)
File "/home/ntakhtke/miniconda3/envs/spt2/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 580, in _fit_impl
self._run(model, ckpt_path=ckpt_path)
File "/home/ntakhtke/miniconda3/envs/spt2/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 947, in _run
self._data_connector.prepare_data()
File "/home/ntakhtke/miniconda3/envs/spt2/lib/python3.8/site-packages/pytorch_lightning/trainer/connectors/data_connector.py", line 94, in prepare_data
call._call_lightning_datamodule_hook(trainer, "prepare_data")
File "/home/ntakhtke/miniconda3/envs/spt2/lib/python3.8/site-packages/pytorch_lightning/trainer/call.py", line 179, in _call_lightning_datamodule_hook
return fn(*args, **kwargs)
File "/home/ntakhtke/superpoint_transformer/src/datamodules/base.py", line 144, in prepare_data
self.dataset_class(
File "/home/ntakhtke/superpoint_transformer/src/datasets/base.py", line 223, in __init__
super().__init__(root, transform, pre_transform, pre_filter)
File "/home/ntakhtke/miniconda3/envs/spt2/lib/python3.8/site-packages/torch_geometric/data/in_memory_dataset.py", line 57, in __init__
super().__init__(root, transform, pre_transform, pre_filter, log)
File "/home/ntakhtke/miniconda3/envs/spt2/lib/python3.8/site-packages/torch_geometric/data/dataset.py", line 97, in __init__
self._process()
File "/home/ntakhtke/superpoint_transformer/src/datasets/base.py", line 647, in _process
self.process()
File "/home/ntakhtke/superpoint_transformer/src/datasets/base.py", line 682, in process
self._process_single_cloud(p)
File "/home/ntakhtke/superpoint_transformer/src/datasets/base.py", line 710, in _process_single_cloud
nag = self.pre_transform(data)
File "/home/ntakhtke/miniconda3/envs/spt2/lib/python3.8/site-packages/torch_geometric/transforms/compose.py", line 24, in __call__
data = transform(data)
File "/home/ntakhtke/superpoint_transformer/src/transforms/transforms.py", line 23, in __call__
return self._process(x)
File "/home/ntakhtke/superpoint_transformer/src/transforms/partition.py", line 207, in _process
d2 = d2.connect_isolated(k=self.k_adjacency)
File "/home/ntakhtke/superpoint_transformer/src/data/data.py", line 455, in connect_isolated
neighbors, distances = knn_2(
File "/home/ntakhtke/superpoint_transformer/src/utils/neighbors.py", line 195, in knn_2
distances, neighbors, _, _ = frnn.frnn_grid_points(
File "/home/ntakhtke/superpoint_transformer/src/dependencies/FRNN/frnn/frnn.py", line 335, in frnn_grid_points
idxs, dists, sorted_points2, pc2_grid_off, sorted_points2_idxs, grid_params_cuda = _frnn_grid_points.apply(
File "/home/ntakhtke/miniconda3/envs/spt2/lib/python3.8/site-packages/torch/autograd/function.py", line 553, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
File "/home/ntakhtke/superpoint_transformer/src/dependencies/FRNN/frnn/frnn.py", line 129, in forward
_C.counting_sort_cuda(points2, lengths2, pc2_grid_cell,
RuntimeError: expected scalar type Float but found Double
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
As suggested by the error, you should be using float32 precision to represent point positions. Double precision is usually unnecessary for point cloud semantic processing. Still, if you need to keep track of double precision for global geolocalization, you should use the Data.pos_offset
attribute.
You should probably adjust your raw point cloud reader function for that. Have a look at how the readers of the already implemented datasets do. And have a look at issue #72 for float/double precision and pos_offset
.
The initial issue is solved and the follow up questions have been related to user-specific implementation errors. I am then closing this issue.
As suggested by the error, you should be using float32 precision to represent point positions. Double precision is usually unnecessary for point cloud semantic processing. Still, if you need to keep track of double precision for global geolocalization, you should use the
Data.pos_offset
attribute.You should probably adjust your raw point cloud reader function for that. Have a look at how the readers of the already implemented datasets do. And have a look at issue #72 for float/double precision and
pos_offset
.The initial issue is solved and the follow up questions have been related to user-specific implementation errors. I am then closing this issue
Many thanks! Re-cloning and re-installation resolved the issue :)
Hi! Thanks for your nice work! I am training SuperCluster on a custom dataset (created by following the data instruction you provided). However, I am facing a crash. Please find detailed info below. Any suggestion would be greatly appreciated :)