chaytonmin / Occupancy-MAE

Official implementation of our TIV'23 paper: Occupancy-MAE: Self-supervised Pre-training Large-scale LiDAR Point Clouds with Masked Occupancy Autoencoders
Apache License 2.0
251 stars 18 forks source link

Will you like me to optimize the code repo? #12

Open IrohXu opened 2 years ago

IrohXu commented 2 years ago

Hi, chaytonmin:

Thanks for your ideas in applying MAE to 3D object detection in CP. I checked your code and noticed that some parts can be replaced by functions in torch. For example, the line 165-170 in voxel_mae.py. It may accelerate the training speed If you like, I can publish the code into your repo.

Best

chaytonmin commented 2 years ago

Hi, chaytonmin:

Thanks for your ideas in applying MAE to 3D object detection in CP. I checked your code and noticed that some parts can be replaced by functions in torch. For example, the line 165-170 in voxel_mae.py. It may accelerate the training speed If you like, I can publish the code into your repo.

Best

Great! Thanks for your excellent idea.

jlqzzz commented 1 year ago

@IrohXu @chaytonmin

Hello,

After code optimization, I encountered an error "AttributeError: module 'torch' has no attribute 'argwhere'".

    id_list_select_30 = torch.argwhere(select_30==True).reshape(torch.argwhere(select_30==True).shape[0])
    id_list_select_30to50 = torch.argwhere(select_30to50==True).reshape(torch.argwhere(select_30to50==True).shape[0])
    id_list_select_50 = torch.argwhere(select_50==True).reshape(torch.argwhere(select_50==True).shape[0])

It looks like the problem of the torch.argwhere().

My version of pytorch is 1.8.0. What is your version of pytorch? Have you ever encountered the above problems?

IrohXu commented 1 year ago

Update it to 1.13 might help.

See: https://pytorch.org/docs/stable/generated/torch.argwhere.html

jlqzzz commented 1 year ago

@IrohXu

Hello,

Thank you for your timely reply. That is to say, there is no such function in the case of pytorch<1.13?

Is there a backward compatible implementation? Because the version of pytorch1.13 may be too new and may not be a commonly used version.

IrohXu commented 1 year ago

I remember pytorch added argwhere func in 1.11. You can roll back to the old version locally if you need. But it is very slow during training.

463727502 commented 1 year ago

我记得 pytorch 在 1.11 中添加了 argwhere func。如果需要,可以在本地回滚到旧版本。但是在训练过程中非常慢。

你好,我也是报'火炬'没有属性'argwhere'”的错,然后我也在虚拟环境切换到pytorch1.12,然后pcdet得要重新编译,就装不上了,报的是pytorch太高的原因错,您是如何解决的

463727502 commented 1 year ago

我记得 pytorch 在 1.11 中添加了 argwhere func。如果需要,可以在本地回滚到旧版本。但是在训练过程中非常慢。

您的环境配置是什么样的

ChunZheng2022 commented 1 year ago

@IrohXu

Hello,

Thank you for your timely reply. That is to say, there is no such function in the case of pytorch<1.13?

Is there a backward compatible implementation? Because the version of pytorch1.13 may be too new and may not be a commonly used version.

For lower version pytorch, use 'torch. nonzero' instead. You can view this answer #27