[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-114046":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":15,"stars30d":16,"stars90d":13,"forks30d":13,"starsTrendScore":14,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":28,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":13,"starSnapshotCount":13,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},114046,"JoVox","yuyujunjun\u002FJoVox","yuyujunjun","JoVox: Joint Hierarchical Flow Matching for Lightweight Voxel Generation","https:\u002F\u002Fyuyujunjun.github.io\u002FJovox-page\u002F",null,"Python",69,0,1,7,9,44.4,"Apache License 2.0",false,"main",true,[23,24,25,26,27],"3d-generation","discrete-flow-matching","flow-matching","image-to-3d","voxel","2026-11-18 06:15:42","2026-11-21 01:02:11","# \u003Cimg src=\"assets\u002Fjovox_logo.svg\" height=\"44\" align=\"top\" alt=\"JoVox logo\"> JoVox: Joint Hierarchical Flow Matching for Lightweight Voxel Generation\n\n\u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2611.10690\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPaper-Arxiv-b31b1b.svg\" alt=\"Paper\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fyuyujunjun.github.io\u002FJovox-page\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FProject-Page-blue\" alt=\"Project Page\">\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fhuggingface.co\u002Fxiangjuntang\u002FJoVox-64\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FHugging%20Face-Model-yellow\" alt=\"Hugging Face\">\u003C\u002Fa>\n\u003Ca href=\"LICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache--2.0-green\" alt=\"License\">\u003C\u002Fa>\n\n\u003Ctable>\n  \u003Ctr>\n    \u003Ctd align=\"center\">\u003Cb>Level by level\u003C\u002Fb>\u003C\u002Ftd>\n    \u003Ctd align=\"center\">\u003Cb>JoVox: all levels jointly\u003C\u002Fb>\u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd>\u003Cimg src=\"assets\u002Flevel_by_level.webp\" width=\"380\" alt=\"Level-by-level generation\">\u003C\u002Ftd>\n    \u003Ctd>\u003Cimg src=\"assets\u002Fours.webp\" width=\"380\" alt=\"JoVox generates all levels jointly\">\u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n**JoVox** is a discrete flow matching framework that learns the **joint hierarchical distribution** of voxels while keeping generation lightweight.\nThis repository releases the image-conditioned **64³** generator with its training, sampling and evaluation code.\nAn image-to-mesh script turns the generated structure into a mesh with the second stage of [TRELLIS.2](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTRELLIS.2).\n\n\n## ✨ Features\n\n### 1. Joint Hierarchical Generation\nOne model generates all levels, **4³ → 16³ → 64³**, from a single image.\n\n### 2. Lightweight Training\nCompared with TRELLIS.2 with the same backbone:\n*   **8×** training throughput\n*   **1\u002F15** FLOPs per forward pass (0.82 vs. 12.2 TFLOPs)\n*   **4 vs. 32** H100 GPUs to train\n\n### 3. Accuracy\nOn 1000 Toys4k objects (image-conditioned), the Chamfer distance is **11% lower** than that of TRELLIS.2.\n\n| Method | CD_V ↓ | IoU ↑ | CD_shell ↓ | FID_N ↓ | Uni3D ↑ |\n| :--- | :--- | :--- | :--- | :--- | :--- |\n| TRELLIS.2 | 0.01250 | 0.4017 | 0.524e-3 | 33.3 | 0.3865 |\n| **JoVox** | **0.01107** | **0.4158** | **0.407e-3** | **31.6** | **0.3868** |\n\n### 4. Image to Mesh\nThree steps: background removal, structure generation, and meshing with the second stage of TRELLIS.2.\n\n\n## 🛠 Installation\n\n### Prerequisites\n- **System**: Linux.\n- **Hardware**: an NVIDIA GPU (tested on **A100**).\n- **Software**: [CUDA Toolkit](https:\u002F\u002Fdeveloper.nvidia.com\u002Fcuda-toolkit-archive) 12.4, [Conda](https:\u002F\u002Fdocs.anaconda.com\u002Fminiconda\u002Finstall\u002F#quick-command-line-install), Python 3.10, PyTorch 2.6.0.\n\n### Installation Steps\n1. Clone the repo and create the environment:\n    ```sh\n    git clone https:\u002F\u002Fgithub.com\u002Fyuyujunjun\u002FJoVox.git\n    cd JoVox\n    conda create -n jovox python=3.10 -y && conda activate jovox\n    pip install torch==2.6.0 torchvision==0.21.0 --index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcu124\n    ```\n\n2. Clone [TRELLIS.2](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTRELLIS.2) into `third_party\u002FTRELLIS.2`:\n    ```sh\n    git clone https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTRELLIS.2.git third_party\u002FTRELLIS.2\n    git -C third_party\u002FTRELLIS.2 checkout 5565d24\n    ```\n\n3. Install the Python dependencies:\n    ```sh\n    pip install -r requirements.txt\n    ```\n\n4. Build the CUDA extensions on a machine with an NVIDIA GPU:\n    ```sh\n    pip install flash-attn==2.7.3 --no-build-isolation\n    pip install \"git+https:\u002F\u002Fgithub.com\u002FNVlabs\u002Fnvdiffrast.git@v0.4.0\" --no-build-isolation\n    pip install \"git+https:\u002F\u002Fgithub.com\u002FJeffreyXiang\u002FCuMesh.git@c4ad6125924fcedfd13f0bd61520ca2d24eb7a87\" --no-build-isolation\n    pip install \"git+https:\u002F\u002Fgithub.com\u002FJeffreyXiang\u002FFlexGEMM.git@6f4147d7a22017f491167d2b6b37ce673566e8ee\" --no-build-isolation\n    pip install \"git+https:\u002F\u002Fgithub.com\u002Fyuyujunjun\u002Fo-voxel-gpu.git@fa9ae23eaefacfeee77e0608bb7c52e78d127a6a\" --no-build-isolation --no-deps\n    pip install \"git+https:\u002F\u002Fgithub.com\u002Ffacebookresearch\u002Fpytorch3d.git@v0.7.9\" --no-build-isolation\n    ```\n\n\n## 📦 Pretrained Weights\n\n| Model | Resolution | Link |\n| :--- | :--- | :--- |\n| **JoVox-64** | 64³ | [Hugging Face](https:\u002F\u002Fhuggingface.co\u002Fxiangjuntang\u002FJoVox-64) |\n\nDownload it together with the models that the code uses:\n```sh\nhf download xiangjuntang\u002FJoVox-64 model.safetensors --local-dir checkpoints\u002Fvoxelgen64\nhf download facebook\u002Fdinov3-vitl16-pretrain-lvd1689m        # gated: accept the license on its page first\nhf download microsoft\u002FTRELLIS.2-4B --revision af44b45f2e35a493886929c6d786e563ec68364d\nhf download briaai\u002FRMBG-2.0                                 # gated: accept the license on its page first\npython -c \"import lpips, torch; lpips.LPIPS(net='alex'); torch.hub.load('facebookresearch\u002Fdinov2', 'dinov2_vitl14_reg')\"\n```\n*   **DINOv3**: encodes the condition image.\n*   **TRELLIS.2-4B**, **RMBG-2.0**: second-stage meshing and background removal, used only by Image to Mesh.\n*   **LPIPS**, **DINOv2**: used only by the evaluation (LPIPS_V and DINO_V).\n\nAll of them are read from the local caches (`$HF_HOME` and `$TORCH_HOME`), so a machine without internet access\ncan use copies downloaded elsewhere.\n\n\n## 🚀 Usage\n\n### 1. Quick Try\n`assets\u002Fexamples\u002F` holds eight condition images of Toys4k test objects. They already have a transparent background,\nso instead of running the `prep` stage, copy them into `prep\u002F`:\n```sh\nmkdir -p outputs\u002Fexamples\u002Fprep && cp assets\u002Fexamples\u002F*.png outputs\u002Fexamples\u002Fprep\u002F\npython scripts\u002Fimg2mesh.py --stage voxel --out outputs\u002Fexamples --seed 0\npython scripts\u002Fimg2mesh.py --stage mesh  --out outputs\u002Fexamples --seed 0\n```\nThe meshes are written to `outputs\u002Fexamples\u002Fmesh\u002F`.\n\n### 2. Image to Mesh\nRun the three stages on a folder of images:\n```sh\npython scripts\u002Fimg2mesh.py --stage prep  --in_dir \u003Cimages> --out \u003Cout>\npython scripts\u002Fimg2mesh.py --stage voxel --out \u003Cout> --seed 0\npython scripts\u002Fimg2mesh.py --stage mesh  --out \u003Cout> --seed 0\n```\nThe results are in `\u003Cout>\u002Fprep\u002F` (centered images), `\u003Cout>\u002Fvoxels\u002F` (structures) and `\u003Cout>\u002Fmesh\u002F` (one `.ply` per image).\n```sh\nUsage: scripts\u002Fimg2mesh.py --stage STAGE --out OUT [OPTIONS]\nOptions:\n    --stage           prep: remove the background and center the object\n                      voxel: generate the 64³ structure\n                      mesh: turn the structure into a mesh with the second stage of TRELLIS.2\n    --out             Output folder. Each stage reads the results of the previous one from it\n    --in_dir          prep: folder of input images (.png, .jpg, .jpeg, .webp)\n    --fill            prep: fraction of the image covered by the longest side of the object (default 0.72)\n    --seed            voxel, mesh: random seed (default 0)\n    --spec            voxel: voxelgen64 (the released model, default) or voxelgen64_trained (your checkpoint)\n    --step            voxel: checkpoint step, only with voxelgen64_trained\n    --batch           voxel: images per sampling call (default 1)\n```\n\n### 3. Evaluation\nCompare the structures generated by the released model with the ground truth of the same objects by CD_V, IoU, LPIPS_V and DINO_V.\n\n1. Write the list of test objects to `data\u002Fsplits\u002Feval_cond.csv`, one row per object:\n\n    | Column | Content |\n    | :--- | :--- |\n    | `split` | always `test` |\n    | `subset`, `uid` | the object |\n    | `image_path` | its condition image, under `data\u002Frenders\u002F\u003Csubset>\u002Frenders3\u002F\u003Cuid>\u002F` |\n    | `seed` | sampling seed |\n\n2. Put the ground-truth meshes in one folder as `\u003Cuid>.glb`, and voxelize and render them:\n    ```sh\n    python scripts\u002Fvoxelize_gt.py --dataset toys4k --src \u003Cmesh folder>\n    python scripts\u002Frender_gt.py --dataset toys4k\n    ```\n\n3. Generate one structure per object:\n    ```sh\n    python scripts\u002Fgenerate.py --spec voxelgen64 --dataset toys4k\n    ```\n\n4. Compute the metrics:\n    ```sh\n    python scripts\u002Fevaluate.py --dataset toys4k --method voxelgen64 --compute_gt_dino\n    ```\n\n```sh\nUsage: scripts\u002Fgenerate.py --spec SPEC --dataset DATASET [OPTIONS]\nOptions:\n    --spec            voxelgen64 (the released model) or voxelgen64_trained (your checkpoint)\n    --step            Checkpoint step, only with voxelgen64_trained\n    --dataset         Name of the evaluation set (toys4k). Results go to data\u002Fgen\u002F\u003Cdataset>\u002F\u003Cspec>\u002F\n    --n               Use only the first N objects of the list\n    --batch           Images per sampling call (default 8)\n    --rank            Index of this job when the list is split over several jobs (default 0)\n    --world_size      Number of jobs the list is split over (default 1)\n\nUsage: scripts\u002Fevaluate.py --dataset DATASET --method METHOD [OPTIONS]\nOptions:\n    --dataset         Name of the evaluation set (toys4k)\n    --method          The --spec given to generate.py, or gt\n    --step            Checkpoint step, only with voxelgen64_trained\n    --n               Use only the first N objects of the list\n    --metrics         core (CD_V, IoU), vis_pair (LPIPS_V, DINO_V), or both comma-separated (default)\n    --compute_gt_dino Compute and cache the ground-truth DINOv2 features used by DINO_V\n                      (needed the first time a ground truth is evaluated)\n    --overwrite       Recompute metrics that already exist (otherwise the script stops)\n    --batch           Objects per batch for CD_V and IoU, changes only memory and speed (default 32)\n    --device          Torch device (default cuda)\n\nUsage: scripts\u002Fvoxelize_gt.py --dataset DATASET --src SRC [--pattern PATTERN]\nOptions:\n    --dataset         Name of the evaluation set (toys4k). Results go to data\u002Fgen\u002F\u003Cdataset>\u002Fgt\u002F\n    --src             Folder of ground-truth meshes named \u003Cuid>.\u003Cext>\n    --pattern         File pattern of the meshes in --src (default *.glb)\n\nUsage: scripts\u002Frender_gt.py --dataset DATASET [OPTIONS]\nOptions:\n    --dataset         Name of the evaluation set (toys4k). Renders data\u002Fgen\u002F\u003Cdataset>\u002Fgt\u002F from 6 views\n    --rank            Index of this job when the work is split over several jobs (default 0)\n    --world_size      Number of jobs the work is split over (default 1)\n```\n\nThe metrics are written to `data\u002Fgen\u002Ftoys4k\u002Fvoxelgen64\u002Freleased\u002Feval\u002Ftoys4k\u002F`:\n*   `core.json`: `result.cd_p24_sum` is CD_V, `result.iou64` to `result.iou8` are the IoUs at 64³ to 8³\n*   `core.csv`: the same metrics for every object\n*   `vis_pair.json`: `vis_pair.lpips` is LPIPS_V and `vis_pair.dino_cos` is DINO_V\n\nAdd `--n N` to steps 3 and 4 to use only the first N objects. The results then go to `released_n\u003CN>\u002F` instead of `released\u002F`.\n\n\n## 🏋 Training\n\n### 1. Data Preparation\nTraining reads, for each object, its occupancy and its condition images. We trained on the sketchfab, 3D-FUTURE,\nHSSD and ABO subsets of TRELLIS-500K and kept Toys4k for testing.\n\n| Path | Content |\n| :--- | :--- |\n| `$PROJECT_DATA\u002FTRELLIS-500K-blender\u002F\u003Csubset>\u002Fvoxels\u002F\u003Cuid>.vxz` | 64³ occupancy |\n| `$PROJECT_DATA\u002FTRELLIS-500K-blender\u002Fsplits\u002F{train,test}.csv` | objects of each split (columns `subset,uid`) |\n| `$VFM_IMAGE_ROOT\u002F\u003Csubset>\u002Frenders3\u002F\u003Cuid>\u002F*.png` | condition images (RGBA) |\n| `$VFM_IMAGE_ROOT\u002F\u003Csubset>\u002Frenders3\u002F\u003Cuid>\u002Ftransforms.json` | camera poses (optional) |\n\n`PROJECT_DATA` defaults to `.\u002Fdata` and `VFM_IMAGE_ROOT` to `.\u002Fdata\u002FTRELLIS-500K`.\nIf `transforms.json` is present, conditions are drawn from views with an elevation between −10° and 30° when there are any.\n\nThe occupancy is made from the meshes in two steps. The voxelization runs on the GPU with\n[o-voxel-gpu](https:\u002F\u002Fgithub.com\u002Fyuyujunjun\u002Fo-voxel-gpu), which gives the same voxels as TRELLIS.2's CPU o-voxel\nand is 15–170× faster.\n```sh\npython scripts\u002Fvoxelize_meshes.py --root \u003Craw>\u002F\u003Csubset> --max_workers 8\npython scripts\u002Fto_blender_frame.py --src_root \u003Craw>\u002F\u003Csubset> --dst_root $PROJECT_DATA\u002FTRELLIS-500K-blender\u002F\u003Csubset>\n```\n```sh\nUsage: scripts\u002Fvoxelize_meshes.py --root ROOT [OPTIONS]\nVoxelizes every mesh listed in ROOT\u002Fmetadata.csv (the file the TRELLIS.2 data toolkit writes) at 512³ and 64³.\nOptions:\n    --root            Subset folder containing metadata.csv (columns sha256, local_path)\n    --instances       Voxelize only these sha256 ids (a file with one per line, or comma-separated)\n    --resolution      Resolutions to write, the first must be 512 (default 512,64)\n    --max_workers     Meshes processed in parallel (default 8)\n    --rank            Index of this job when the work is split over several jobs (default 0)\n    --world_size      Number of jobs the work is split over (default 1)\n\nUsage: scripts\u002Fto_blender_frame.py --src_root SRC --dst_root DST [OPTIONS]\nRotates the occupancy from Y-up to Z-up, the orientation of the condition images.\nOptions:\n    --src_root        Subset folder written by voxelize_meshes.py (with dual_grid_512\u002F and voxels\u002F)\n    --dst_root        Output folder, different from --src_root\n    --max_workers     Files processed in parallel (default 8)\n    --rank            Index of this job when the work is split over several jobs (default 0)\n    --world_size      Number of jobs the work is split over (default 1)\n```\n\n### 2. Running Training\n```sh\naccelerate launch --config_file configs\u002Faccelerate-train.yaml scripts\u002Ftrain.py --config configs\u002Fvoxelgen64.yaml\n```\nThe default configuration trains for 328,400 steps on 4 GPUs with 64 objects per GPU.\nFor another number of GPUs, set `num_processes` in `configs\u002Faccelerate-train.yaml` (and `distributed_type: \"NO\"` for one GPU).\n```sh\nUsage: scripts\u002Ftrain.py --config CONFIG [KEY=VALUE ...]\nOptions:\n    --config                      Configuration file (configs\u002Fvoxelgen64.yaml)\n    KEY=VALUE                     Override any value of the configuration. The ones you are most likely to change:\n      train.batch_size            Objects per GPU (default 64). Keep batch_size × GPUs × accum_steps at 256\n      train.accum_steps           Gradient accumulation steps (default 1)\n      model.num_levels            2: generate 64³ (default). 3: add one level and generate 256³,\n                                  reading the 512³ occupancy in \u003Csubset>\u002Fdual_grid_512\u002F\n      model.global_infer_root_end Fraction of sampling after which each coarser level is complete.\n                                  [0.8] for 2 levels (default), [0.6,0.8] for 3\n      logger.trackers             [tensorboard] (default), or [tensorboard,wandb] with logger.wandb.entity=\u003Centity>\n```\n\nCheckpoints are saved to `exps\u002Fcheckpoints\u002Fvoxelgen\u002Fvoxel_fm_64\u002F\u003Cstep>\u002F`, and training resumes from the latest one.\n\n### 3. Using Your Checkpoint\nThe commands above use the released model (`voxelgen64`). To use a checkpoint of your own training instead,\nname it `voxelgen64_trained` and give its step:\n```sh\npython scripts\u002Fimg2mesh.py --stage voxel --out \u003Cout> --spec voxelgen64_trained --step 328400          # Image to Mesh\npython scripts\u002Fgenerate.py --spec voxelgen64_trained --step 328400 --dataset toys4k                   # Evaluation, step 3\npython scripts\u002Fevaluate.py --dataset toys4k --method voxelgen64_trained --step 328400 --compute_gt_dino # Evaluation, step 4\n```\n\n\n## 🧩 Related Packages\n\n*   **[TRELLIS.2](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTRELLIS.2):**\n    sparse transformer backbone, second-stage meshing, and data toolkit.\n*   **[o-voxel-gpu](https:\u002F\u002Fgithub.com\u002Fyuyujunjun\u002Fo-voxel-gpu):**\n    a CUDA port of TRELLIS.2's o-voxel. Mesh voxelization on the GPU with the same output as the CPU path,\n    15× faster on a cold start and 170× when warm (593K faces, 512³, A100), plus voxel file I\u002FO.\n\n\n## ⚖ License\n\nThe code is released under the **[Apache-2.0 License](LICENSE)**.\n\nThe training code builds on [OpenLRM](https:\u002F\u002Fgithub.com\u002F3DTopia\u002FOpenLRM) (Apache-2.0).\n`voxelgen\u002Fnetwork\u002Fbackbone.py` and the image encoder in `voxelgen\u002Fnetwork\u002Fmodel.py` build on\n[TRELLIS.2](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTRELLIS.2) (MIT).\n[DINOv3](https:\u002F\u002Fhuggingface.co\u002Ffacebook\u002Fdinov3-vitl16-pretrain-lvd1689m) and [RMBG-2.0](https:\u002F\u002Fhuggingface.co\u002Fbriaai\u002FRMBG-2.0)\nare under their own licenses (see their model pages).\n\n\n## 📚 Citation\n\nIf you find this work useful, please cite:\n```bibtex\n@article{tang2026jovox,\n    title   = {JoVox: Joint Hierarchical Flow Matching for Lightweight Voxel Generation},\n    author  = {Tang, Xiangjun and Chen, Jianqi and Wonka, Peter},\n    journal = {arXiv preprint arXiv:2611.10690},\n    year    = {2026}\n}\n```\n","JoVox 是一个面向轻量级体素生成的离散流匹配框架，专注于图像到3D体素的联合分层建模。它通过单次前向推理同步生成4³→16³→64³多尺度体素结构，显著降低计算开销（训练吞吐量提升8倍，单步FLOPs降至TRELLIS.2的1\u002F15），同时在Chamfer距离等指标上优于基线方法。项目提供完整的图像条件化64³体素生成、评估及配套mesh转换流程（依赖TRELLIS.2第二阶段）。适用于资源受限场景下的高效图像到3D重建任务，如3D内容生成、AR\u002FVR资产快速建模与轻量化工业设计原型生成。",2,"2026-11-24 04:47:46","CREATED_QUERY"]