This repository contains the official implementation of HiT: Hierarchical Transformers for Unsupervised 3D Shape Abstraction.
-
Clone the Repository:
git clone --recursive https://github.com/aditya-vora/HiT cd HiT -
Set Up the Conda Environment:
conda create -n hit python=3.10; conda activate hit -
Install the dependencies inside the conda environment:
pip install -r requirements.txt
Train HiT on ShapeNet-formatted data (see preprocess/ for how to build the required .hdf5 files):
sh scripts/train_all_cats.shor invoke train.py directly, e.g.:
python train.py --train --data-dir <path-to-data> --dataset-name shapenet --cats all --exp-name my_experimenteval_seg.py loads a trained checkpoint (--ckpt) and evaluates it on the test split in one of five modes, selected by passing exactly one of the following flags:
| Flag | Output |
|---|---|
--recon |
Colored part + full-shape meshes for a single shape (--shape-id), via marching cubes. |
--mesh |
Colored part + full-shape meshes for every shape in the test set. |
--pointcloud |
A colored, per-part-segmented point cloud (.ply) for every test shape. |
--iou |
Per-shape, per-category, and overall part-segmentation mIoU against ground-truth labels. |
--cd |
Per-category and overall Chamfer Distance / F-score against the ground-truth surface. |
sh scripts/eval_all_cats.shor directly, e.g. to compute segmentation mIoU:
python eval_seg.py --iou --ckpt <path-to-checkpoint.pt> --data-dir <path-to-data> --dataset-name shapenet --cats all --splits testResults are written under <exp-dir>/<exp-name>/<NNN>/.
- Release training code.
- Release data processing scripts.
- Release evaluation scripts.
- Testing.
@inproceedings{vora2026hit, title={HiT: Hierarchical Transformers for Unsupervised 3D Shape Abstraction}, author={Vora, Aditya and Goli, Lily and Tagliasacchi, Andrea and Zhang, Hao}, booktitle={2026 International Conference on 3D Vision (3DV)}, pages={1598--1607}, year={2026}, organization={IEEE} }
