HengyiWang / Co-SLAM

[CVPR'23] Co-SLAM: Joint Coordinate and Sparse Parametric Encodings for Neural Real-Time SLAM
https://hengyiwang.github.io/projects/CoSLAM.html
Apache License 2.0
413 stars 37 forks source link

How to calculate total model parameter of Co-SLAM? #51

Open saulgooodman opened 3 months ago

saulgooodman commented 3 months ago

Hello, I tried to calculate the total parameter of Co-SLAM by calculating all the parameters in decoder, but I found the result is much smaller than the data in the paper. I thought it was because I didn't take the learnable parameters outside the decoder into consideration. I'd like to ask how you calculate all the parameter in Co-SLAM. Thanks a lot!

HengyiWang commented 3 months ago

Hi @saulgooodman, you can either use torchsummary or calculate the total amount of params of encodings based on hash table size. For all default settings reported in our paper, we use hash size 13.

saulgooodman commented 3 months ago

Thank you for your reply. I would like to confirm again, all the parameters include network parameters + parameters for multi-resolution hash grid + parameters for camera pose, right?

HengyiWang commented 3 months ago

As far as I remember, we did not count the parameters for camera pose in the paper. But, yes, definitely decoder + hash grid. For example, let us say if your hash size is 10, then the total params for your hash grid should be something around 16 2^10 2. where 16 is #resolution, and 2 is feature dim.

FDF521X commented 3 days ago

Why did you use hash=16 for experiments, but hash=13 for calculating the parameter count?

HengyiWang commented 3 days ago

Sorry, I do not get what you mean. For Tab.1, all results are generated using hash=13. And 16 in my previous reply corresponds to the num of resolutions since we use a multi-resolution hash grid as in instant-ngp.

FDF521X commented 17 hours ago

Sorry, I do not get what you mean. For Tab.1, all results are generated using hash=13. And 16 in my previous reply corresponds to the num of resolutions since we use a multi-resolution hash grid as in instant-ngp.

I apologize for not being clear. I noticed that in your provided code, the hashsize for the replica scenario was set to 16, so I thought this was your default configuration.