humanpose1 / MS-SVConv

Compute descriptors for 3D point cloud registration using a multi scale sparse voxel architecture
MIT License
63 stars 7 forks source link

Error running notebook demo #1

Closed wingvortex closed 3 years ago

wingvortex commented 3 years ago

Hi, an error happed when running the Google colab notebook:

INFO - 2021-06-13 07:40:21,390 - model_checkpoint - Loading checkpoint from models/MS_SVCONV_2cm_X2_3head_3dm.pt invalid syntax (, line 1)

ConfigAttributeError Traceback (most recent call last)

in () 19 } 20 ---> 21 model = PretainedRegistry.from_file(pcd_model[choice_model], mock_property={}) 22 23 data_s = pcd_DA[choice_model](read_pcd(pcd_path[choice_data][0])) 10 frames /usr/local/lib/python3.7/dist-packages/torch_points3d/applications/pretrained_api.py in from_file(path, weight_name, mock_property) 166 dataset = instantiate_dataset(checkpoint.data_config) 167 --> 168 model: BaseModel = checkpoint.create_model(dataset, weight_name=weight_name) 169 BaseDataset.set_transform(model, checkpoint.data_config) 170 return model /usr/local/lib/python3.7/dist-packages/torch_points3d/metrics/model_checkpoint.py in create_model(self, dataset, weight_name) 183 if not self.is_empty: 184 run_config = copy.deepcopy(self._checkpoint.run_config) --> 185 model = instantiate_model(OmegaConf.create(run_config), dataset) 186 if hasattr(self._checkpoint, "model_props"): 187 for k, v in self._checkpoint.model_props.items(): /usr/local/lib/python3.7/dist-packages/torch_points3d/models/model_factory.py in instantiate_model(config, dataset) 42 % (model_module, class_name) 43 ) ---> 44 model = model_cls(model_config, "dummy", dataset, modellib) 45 return model /usr/local/lib/python3.7/dist-packages/torch_points3d/models/registration/ms_svconv3d.py in __init__(self, option, model_type, dataset, modules) 192 option_unet.backbone, 193 input_nc=option_unet.input_nc, --> 194 pointnet_nn=option_unet.pointnet_nn, 195 post_mlp_nn=option_unet.post_mlp_nn, 196 pre_mlp_nn=option_unet.pre_mlp_nn, /usr/local/lib/python3.7/dist-packages/omegaconf/dictconfig.py in __getattr__(self, key) 352 except ConfigKeyError as e: 353 self._format_and_raise( --> 354 key=key, value=None, cause=e, type_override=ConfigAttributeError 355 ) 356 except Exception as e: /usr/local/lib/python3.7/dist-packages/omegaconf/base.py in _format_and_raise(self, key, value, cause, type_override) 194 msg=str(cause), 195 cause=cause, --> 196 type_override=type_override, 197 ) 198 assert False /usr/local/lib/python3.7/dist-packages/omegaconf/_utils.py in format_and_raise(node, key, value, msg, cause, type_override) 819 ex.ref_type_str = ref_type_str 820 --> 821 _raise(ex, cause) 822 823 /usr/local/lib/python3.7/dist-packages/omegaconf/_utils.py in _raise(ex, cause) 717 else: 718 ex.__cause__ = None --> 719 raise ex.with_traceback(sys.exc_info()[2]) # set end OC_CAUSE=1 for full backtrace 720 721 /usr/local/lib/python3.7/dist-packages/omegaconf/dictconfig.py in __getattr__(self, key) 349 350 try: --> 351 return self._get_impl(key=key, default_value=_DEFAULT_MARKER_) 352 except ConfigKeyError as e: 353 self._format_and_raise( /usr/local/lib/python3.7/dist-packages/omegaconf/dictconfig.py in _get_impl(self, key, default_value) 436 def _get_impl(self, key: DictKeyType, default_value: Any) -> Any: 437 try: --> 438 node = self._get_node(key=key, throw_on_missing_key=True) 439 except (ConfigAttributeError, ConfigKeyError): 440 if default_value is not _DEFAULT_MARKER_: /usr/local/lib/python3.7/dist-packages/omegaconf/dictconfig.py in _get_node(self, key, validate_access, throw_on_missing_value, throw_on_missing_key) 468 if value is None: 469 if throw_on_missing_key: --> 470 raise ConfigKeyError(f"Missing key {key}") 471 elif throw_on_missing_value and value._is_missing(): 472 raise MissingMandatoryValue("Missing mandatory value") ConfigAttributeError: Missing key pointnet_nn full_key: models.MS_SVCONV_B2cm_X2_3head.option_unet.pointnet_nn object_type=dict
trinhnhut-gif commented 3 years ago

hi, Did you have some idea? I also have a similar problem with this part

humanpose1 commented 3 years ago

I think I know where the problem is coming from The Omegaconf version has changed. I'm doing a PR on torch-points3d to solve the problem.

trinhnhut-gif commented 3 years ago

Yes, I am also trying to solve the problem on torch-points3d. Thank you so much for your reply

humanpose1 commented 3 years ago

@wingvortex and @trinhnhut-gif please have a look at this PR: https://github.com/nicolas-chaulet/torch-points3d/pull/622

If you want to check it before the PR is accepted, you can replace

!pip install git+https://github.com/nicolas-chaulet/torch-points3d.git

by

!pip install git+https://github.com/humanpose1/deeppointcloud-benchmarks@bug_ms_ssvconv_0
humanpose1 commented 3 years ago

It has been merged and the colab works so I will close the issue.