Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
Zhengping Che a2a225b8b7 | 10 months ago | |
---|---|---|
cfgs | 9 months ago | |
docs | 9 months ago | |
examples | 9 months ago | |
openpoints | 9 months ago | |
.gitignore | 9 months ago | |
LICENSE | 9 months ago | |
README.md | 9 months ago | |
environment.yml | 9 months ago | |
install.sh | 9 months ago | |
requirements.txt | 9 months ago |
Official PyTorch implementation for the following paper:
CP³: Channel Pruning Plug-in for Point-based Networks, CVPR 2023
by Yaomin Huang*, Ning Liu*, Zhengping Che, Zhiyuan Xu, Chaomin Shen, Yaxin Peng, Guixu Zhang, Xinmei Liu, Feifei Feng, Jian Tang.
In this paper, we proposed CP³, which is a Channel Pruning Plugin for Point-based network. CP³ is elaborately designed to leverage the characteristics of point clouds and PNNs in order to enable 2D channel pruning methods for PNNs.
There is a simple bash file to install the environment:
git clone $THIS_REPO.git
cd CP3
source install.sh
Note:
the install.sh
requires CUDA 11.3; if another version of CUDA is used, install.sh
has to be modified accordingly; check your CUDA version by: nvcc --version
before using the bash file;
you might need to read install.sh
for a step-by-step installation if the bash file (install.sh
) does not work for you by any chance;
for all experiments, we use wandb for online logging. Run wandb --login
only at the first time in a new machine. Set wandn.use_wandb=False
to use this function. Read the official wandb documentation if needed.
For specific details on downloading the dataset and preprocessing, please refer to the respective handling methods for different datasets in the docs/examples.
Here, we take CHIP as an example to provide a detailed explanation of the workflow for the CP³ method using PointNet++ on the ScanObjectNN dataset.
python examples/classification/generation_main.py --cfg cfgs/scanobjectnn/chip_generation_pointnet++.yaml --cof_factor 1 --dis_factor 1 --rank_factor 1
python examples/classification/main.py --cfg cfgs/scanobjectnn/chip_generation_pointnet++.yaml --prun_rate 0.52 --pretrained_path fully_model/pre_train
To test the trained results mentioned above, you can use the following command to load the pre-trained model for model inference testing.
python examples/classification/main.py --cfg cfgs/scanobjectnn/CP3_chip_pointnetv2.yaml --prun_rate 0.52 mode=test --pretrained_path pruned_model/pre_train
You can download the pre-trained models after pruning with HRank and the pre-trained models after using CP³ from HRank and HRank&CP³respectively.
With the downloaded pre-trained models, you can test the pruning effects of HRank and CP³ on PointNext using the following commands respectively,
# Test original HRank with PointNext-S(C=32) on ScanObjectNN
python examples/classification/main.py --cfg cfgs/scanobjectnn/CP3_chip_pointnext_32.yaml --prun_rate 0.68 mode=test --pretrained_path log/pre_train/final/pointnext/c32/hrank_pointnext_c32_0.68.pth
# Test CP³ with PointNext-S(C=32) on ScanObjectNN
python examples/classification/main.py --cfg cfgs/scanobjectnn/CP3_chip_pointnext_32.yaml --prun_rate 0.69 mode=test --pretrained_path log/pre_train/final/pointnext/c32/hrank_cp3_pointnext_c32_0.69.pth
This library is inspired by PointNext and OpenPointnet. Thanks their awesome codebase.
The following modifications have been made to the original PointNext code:
If you find CP³ useful, please cite:
@inproceedings{huang2023cp3,
title={CP3: Channel Pruning Plug-In for Point-Based Networks},
author={Huang, Yaomin and Liu, Ning and Che, Zhengping and Xu, Zhiyuan and Shen, Chaomin and Peng, Yaxin and Zhang, Guixu and Liu, Xinmei and Feng, Feifei and Tang, Jian},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={5302--5312},
year={2023}
}
No Description
Python C++ Cuda Text Shell other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》