we propose an efficient Training-free Few-shot 3D Segmentation netwrok, TFS3D, and a further training-based variant, TFS3D-T. TFS3D introduces no learnable parameters and and requires no training. Specifically, TFS3D extracts dense representations by trigonometric positional encodings and achieves comparable performance to some training-based methods. Building upon TFS3D, TFS3D-T only requires to train a lightweight query-support transferring attention (QUEST), which enhances the interaction between the few-shot query and support data.
Create a conda environment and install dependencies:
cd TFS3D
conda create -n TFS3D python=3.7
conda activate TFS3D
# Install the according versions of torch and torchvision
conda install pytorch torchvision cudatoolkit
pip install -r requirements.txt
pip install pointnet2_ops_lib/.
Installation and data preparation please follow attMPTI.
TFS3D does not require any training and can conduct few-shot segmentation directly via:
bash scripts/training_free.sh
Train and test our method under few-shot setting:
bash scripts/training.sh
The test procedure has been included in the above command after training and validation.
Note that the above scripts are used for 2-way 1-shot on S3DIS (S_0). Please modify the corresponding hyperparameters to conduct experiments on other settings.
We thank Point-NN, PAP-FZS3D, and attMPTI for sharing their source code.