salesforce / ULIP

BSD 3-Clause "New" or "Revised" License
436 stars 44 forks source link

Can not load pretrained weight of PointNext in finetuning on ModelNet40, in_channels is 3 not 4 #39

Open TangYuan96 opened 1 year ago

TangYuan96 commented 1 year ago

First of all, thank you for sharing such an excellent work !!

The pretrained weight of PointNext is released, where '-- use_height' is used. However, during finetune on ModelNet40 or ScanObjectNN, there was no "-- use_height" in the data, which resulted in the pretrained weight being unable to be loaded.

The in_channels is 4 in pretrained weight of PointNext. But the in_channels is 3 in setting of finetune on ModelNet40 or ScanObjectNN

Tycho-Xue commented 1 year ago

@TangYuan96 , sorry for the late reply, I was out of the office until this week. I think by default we use --use_height during the pre-training since it typically gets the best performance, I believe during the finetuing, you can also enable the 4 channel input, that's how we fine-tuned the model.

shiboliu commented 1 week ago

RuntimeError: Given groups=1, weight of size [32, 4, 1], expected input[16, 3, 2048] to have 4 channels, but got 3 channels instead how to solve?

Tycho-Xue commented 1 week ago

Hi I think if you are using the pointnext version, you need both the weights and the input to have four dimensions, including the height information. in the code i used the --use_height to enable this.