[ISSUE] Problem Loading PTV3-Object Model with Provided.pth File

#1
by rubrrr - opened

Hi there,
I'm currently working on implementing the “SAMPart3D/pointcept/models/PTV3-Object.py” model and ran into an issue when using the “ptv3-object.pth” you provided.
When I tried to load the model weights using the following code:
QQ20250111-213201.png
I got the following runtime error:
07bf888a-0b8d-434e-b43c-08d714afade0.png
It appears that there's a key mismatch between the parameters in the.pth file and the model. I've made sure my local codebase is up to date and that I'm following the standard loading procedures.
I suspect it could be due to differences in the way the model was saved or potential changes in the model structure that I'm not aware of. Could you please take a look and provide some suggestions on how to fix this? Maybe there are some hidden dependencies or specific versions I should be using.
Any help would be really appreciated as this has been blocking my progress.
Thanks!

Hi, you may print the key in the ptv3-object.pth to check. I think there may be some str mismatching, like "model.", "backbone." or "module.".

torch.load(model_path)["state_dict"]

I am encountering a problem while loading the pre-trained parameters from the "ptv3-object.pth" file into the network defined in "PTv3Object.py". The number of parameters required by the network in "PTv3Object.py" is 114, but the "ptv3-object.pth" file contains 572 parameters. Additionally, the 114 parameters required by "PTv3Object.py" are included within the "ptv3-object.pth" file.
Could you help me understand:

  1. Why the number of parameters in the "ptv3-object.pth" file is significantly higher than what is defined in "PTv3Object.py"?
  2. How I can resolve this issue to successfully load the pre-trained weights?

Sign up or log in to comment