slothfulxtx / TransLoc3D

TransLoc3D : Point Cloud based Large-scale Place Recognition using Adaptive Receptive Fields (CVM2022)
MIT License
17 stars 5 forks source link

What version of MinkowskiEngine does it use? #1

Closed woltium closed 2 years ago

woltium commented 2 years ago

Thank you for your code, which gave me a lot of help, but I found that MinkowskiEngine always made mistakes in the process of trying to run the code. What version of MinkowskiEngine do you use?

woltium commented 2 years ago

like:

when i try python main.py

it turns out:

/home/wws/anaconda3/envs/transloc/lib/python3.7/site-packages/MinkowskiEngine-0.5.4-py3.7-linux-x86_64.egg/MinkowskiEngine/init.py:42: UserWarning: The environment variable OMP_NUM_THREADS not set. MinkowskiEngine will automatically set OMP_NUM_THREADS=16. If you want to set OMP_NUM_THREADS manually, please export it on the command line before running a python script. e.g. export OMP_NUM_THREADS=12; python your_program.py. It is recommended to set it below 24. "It is recommended to set it below 24.", 2022-05-04 20:56:42,541 - INFO - Config : optimizer_type = 'Adam' optimizer_cfg = dict(lr=0.0002, weight_decay=0, betas=(0.9, 0.999)) scheduler_type = 'MultiStepLR' scheduler_cfg = dict(gamma=0.1, milestones=(80, 120, 160)) end_epoch = 200 loss_type = 'BatchHardTripletMarginLoss' loss_cfg = dict(margin=0.2, normalize_embeddings=False) train_cfg = dict( save_per_epoch=2, val_per_epoch=2, batch_sampler_type='ExpansionBatchSampler', batch_sampler_cfg=dict( max_batch_size=256, batch_size_expansion_rate=1.4, batch_expansion_threshold=0.7, batch_size=32, shuffle=True, drop_last=True), num_workers=16) eval_cfg = dict( batch_sampler_cfg=dict(batch_size=16, drop_last=False), num_workers=16, normalize_embeddings=False) model_type = 'TransLoc3D' model_cfg = dict( backbone_cfg=dict( up_conv_cfgs=[ dict(in_channels=1, out_channels=64, kernel_size=5, stride=1), dict(in_channels=64, out_channels=64, kernel_size=2, stride=2) ], transformer_cfg=dict( num_attn_layers=6, global_channels=64, local_channels=0, num_centers=[256, 128, 128, 64, 64, 64], num_heads=2), in_channels=1, out_channels=512), pool_cfg=dict( type='NetVlad', in_channels=512, out_channels=256, cluster_size=64, gating=True, add_bn=True), quantization_size=0.01) dataset_type = 'Oxford' data_root_dir = '/home/wws/PycharmProjects/pythonProject/TransLoc3D-main/datasets/preprocess/' dataset_cfg = dict( data_root_dir= '/home/wws/PycharmProjects/pythonProject/TransLoc3D-main/datasets/preprocess/', transform_cfg=dict( train=[ dict( type='Jitter3D', objs=['pcd'], params=dict(sigma=0.001, clip=0.002)), dict( type='Drop3D', objs=['pcd'], params=dict(method='random', min_dr=0.0, max_dr=0.1)), dict( type='Translation3D', objs=['pcd'], params=dict(max_delta=0.01)), dict( type='Drop3D', objs=['pcd'], params=dict(method='cuboid', p=0.4, bbox_pc_name='pcd')), dict(type='ToTensor', objs=['pcd'], params=dict()) ], database=[dict(type='ToTensor', objs=['pcd'], params=dict())], queries=[dict(type='ToTensor', objs=['pcd'], params=dict())]), batch_transform_cfg=dict( train=[ dict( type='Rotation3D', objs=['pcd'], params=dict( batch=True, max_theta1=5, max_theta2=0, axis=[0, 0, 1])), dict( type='Mirror3D', objs=['pcd'], params=dict( batch=True, method='xyz_plane', p=[0.25, 0.25, 0.0])) ], database=[], queries=[]), train_catalog_file_path= '/home/wws/PycharmProjects/pythonProject/TransLoc3D-main/datasets/preprocess/training_queries_baseline.pickle', cached_train_catalog_file_path= '/home/wws/PycharmProjects/pythonProject/TransLoc3D-main/datasets/preprocess/training_queries_baseline_cached.pickle', database_file_path= '/home/wws/PycharmProjects/pythonProject/TransLoc3D-main/datasets/preprocess/oxford_evaluation_database.pickle', queries_file_path= '/home/wws/PycharmProjects/pythonProject/TransLoc3D-main/datasets/preprocess/oxford_evaluation_query.pickle' ) task_type = 'default_me' work_dir = '/home/wws/PycharmProjects/pythonProject/TransLoc3D-main/workspace/transloc3d_baseline_cfg/2022-05-04_20-56-41' resume_from = None resume_items = [ 'model', 'epoch', 'metrics', 'optim', 'sched', 'sampler', 'all', 'no_metrics' ] mode = 'train' debug = False seed = None deterministic = False

2022-05-04 20:56:42,695 - INFO - Building default_me task ... 1 2 3 2022-05-04 20:56:42,809 - INFO - Parameters in default_me task : 10972111 cuda:0 2022-05-04 20:56:44,713 - INFO - [Epoch 1/ 200] Start training ... 0%| | 0/679 [00:02<?, ?it/s] Traceback (most recent call last): File "main.py", line 101, in main() File "main.py", line 92, in main train(cfg, log) File "/home/wws/PycharmProjects/pythonProject/TransLoc3D-main/core/train.py", line 68, in train loss_info = task.step(meta, data) File "/home/wws/PycharmProjects/pythonProject/TransLoc3D-main/tasks/base_me_task.py", line 107, in step return self._train_step(meta_data, batch_data, kwargs) File "/home/wws/PycharmProjects/pythonProject/TransLoc3D-main/tasks/default_me_task.py", line 23, in _train_step model_replicas, [((pcd, raw_pcd),) for pcd, raw_pcd in zip(batch_data['pcd'], batch_data['raw_pcd'])], devices=self.devices) File "/home/wws/anaconda3/envs/transloc/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 86, in parallel_apply output.reraise() File "/home/wws/anaconda3/envs/transloc/lib/python3.7/site-packages/torch/_utils.py", line 434, in reraise raise exception AttributeError: Caught AttributeError in replica 0 on device 0. Original Traceback (most recent call last): File "/home/wws/anaconda3/envs/transloc/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 61, in _worker output = module(*input, *kwargs) File "/home/wws/anaconda3/envs/transloc/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(input, kwargs) File "/home/wws/PycharmProjects/pythonProject/TransLoc3D-main/models/transloc3d/model.py", line 263, in forward x = self.backbone(x) File "/home/wws/anaconda3/envs/transloc/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, kwargs) File "/home/wws/PycharmProjects/pythonProject/TransLoc3D-main/models/transloc3d/model.py", line 223, in forward x = self.up_conv0(x) File "/home/wws/anaconda3/envs/transloc/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(*input, *kwargs) File "/home/wws/anaconda3/envs/transloc/lib/python3.7/site-packages/torch/nn/modules/container.py", line 141, in forward input = module(input) File "/home/wws/anaconda3/envs/transloc/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl return forward_call(input, kwargs) File "/home/wws/anaconda3/envs/transloc/lib/python3.7/site-packages/MinkowskiEngine-0.5.4-py3.7-linux-x86_64.egg/MinkowskiEngine/MinkowskiConvolution.py", line 302, in forward assert input.D == self.dimension File "/home/wws/anaconda3/envs/transloc/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1178, in getattr type(self).name, name)) AttributeError: 'MinkowskiConvolution' object has no attribute 'dimension'

slothfulxtx commented 2 years ago

hi, ME on my env is 0.4.3