Aligning Instance-Semantic Sparse Representation towards Unsupervised Object Segmentation and Shape Abstraction with Repeatable Primitives
This is an official PyTorch Implementation of Aligning Instance-Semantic Sparse Representation towards Unsupervised Object Segmentation and Shape Abstraction with Repeatable Primitives.
- PyTorch
- PyTorch3D
- SparseMax
- PyTorch Lightning
- tensorboard
- Open3D for visualization.
We use the ready-to-use datasets provised by CuboidAbstractionViaSeg:
To start the training, run
$ python train.py --data_dir /path/to/dataset
Please note that the sample_points_from_meshes function in PyTorch3D and the Sparsemax do not have a deterministic implementation. As a result, the following settings do not guarantee reproducibility:
os.environ["CUBLAS_WORKSPACE_CONFIG"] = ":4096:8"
torch.use_deterministic_algorithms(True)
seed_everything(2024, workers=True)The model is difficult to train. If retraining is needed, please check the validation results after 100 epochs. If the results do not meet expectations, restart the training.
To test a trained model, run
$ python test.py --data_dir /path/to/dataset
We provide the trained weights and the final results:
Weights: ./trained/ShapeNetNormal4096.pth
Results on Baidu Netdisk Code: v799
If you use our code for research, please cite our paper:
@ARTICLE{li2025aligning,
author={Li, Jiaxin and Wang, Hongxing and Tan, Jiawei and Ou, Zhilong and Yuan, Junsong},
journal={IEEE Transactions on Visualization and Computer Graphics},
title={Aligning Instance-Semantic Sparse Representation towards Unsupervised Object Segmentation and Shape Abstraction with Repeatable Primitives},
year={2025},
volume={},
number={},
pages={},
keywords={},
doi={}
}
Apache-2.0 Licence