• Stars
    star
    127
  • Rank 282,790 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 1 year ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An unofficial reproduction of Fantasia3D

Fantasia3D.unofficial

This is a quickly produced unofficial reproduction of Fantasia3D for text-to-3D generation, featuring the ability to generate high-quality meshes with PBR textures directly.

Thanks for the author's kind help in elaborating the details! This repo is also heavily based on Nvdiffrec (with extremely untidy modifications...).

Important Notice: This repo is like a preview of this impressive method, and may not be actively maintained since the authors will release the official implementation. The performance seems not as good as the original paper, and there are still some details may be different, but it's still a start point if you are interested.

output_compress.mp4

Install

pip install -r requirements.txt

Usage

First you need to create a config file under configs, you can copy and edit one of the provided examples like this:

{
    "text": "a ripe strawberry",
    "random_textures": true,
    "iter": 5000,
    "save_interval": 10,
    "texture_res": [ 1024, 1024 ],
    "train_res": [512, 512],
    "batch": 8,
    "learning_rate": 0.001,
    "ks_min" : [0, 0.25, 0],
    "out_dir": "strawberry",
    "base_mesh": "./data/sphere.obj"
}

We provide two base meshes under ./data (sphere.obj and ellipsoid.obj), but you can use any mesh to initialize the geometry.

The default settings are tested under a 32GB V100. Lower batch and increase iter if your GPU memory is limited.

Then you can run training by:

# single GPU
python train.py --config configs/strawberry.json

# multi GPU (experimental)
torchrun --nproc_per_node 4 train.py --config configs/strawberry.json

For single GPU (V100), it takes about 4 hours to train a single model (5000 iters at batch size of 8).

The validation/checkpoints/final mesh will be stored to ./out/<out_dir>

Implementation Notes

  • the major logic of SDS is hard coded in geometry/dmtet.py.
  • It seems important to apply antialiasing on the normal and visibility mask (render/render.py) so the gradient can be propagated to DMTet.

Acknowledgement

  • The awesome original paper:
@misc{chen2023fantasia3d,
      title={Fantasia3D: Disentangling Geometry and Appearance for High-quality Text-to-3D Content Creation}, 
      author={Rui Chen and Yongwei Chen and Ningxin Jiao and Kui Jia},
      year={2023},
      eprint={2303.13873},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

More Repositories

1

stable-dreamfusion

Text-to-3D & Image-to-3D & Mesh Exportation with NeRF + Diffusion.
Python
7,270
star
2

torch-ngp

A pytorch CUDA extension implementation of instant-ngp (sdf and nerf), with a GUI.
Python
1,863
star
3

nerf2mesh

[ICCV2023] Delicate Textured Mesh Recovery from NeRF via Adaptive Surface Refinement
Python
743
star
4

RAD-NeRF

Real-time Neural Radiance Talking Portrait Synthesis via Audio-spatial Decomposition
Python
707
star
5

Drag3D

DragGAN meets GET3D for interactive mesh generation and editing.
Python
456
star
6

diff-gaussian-rasterization

Cuda
308
star
7

Segment-Anything-NeRF

Segment-anything interactively in NeRF.
Python
277
star
8

chatgpt_please_improve_my_paper_writing

a thin wrapper of chatgpt for improving paper writing.
Python
251
star
9

torch-merf

An unofficial pytorch implementation of MeRF
Python
137
star
10

dreamfields-torch

A pytorch implementation of dreamfields with modifications.
Python
134
star
11

CCNeRF

[NeurIPS 2022] Compressible-composable NeRF via Rank-residual Decomposition.
Python
125
star
12

nerf_template

a simple template for practicing NeRF.
Python
125
star
13

cubvh

CUDA Mesh BVH tools.
Cuda
121
star
14

jiif

[ACM MM 2021] Joint Implicit Image Function for Guided Depth Super-Resolution
Python
90
star
15

raytracing

A CUDA Mesh RayTracer with BVH acceleration, with python bindings and a GUI.
Cuda
83
star
16

volumentations

3D volume data augmentation package inspired by albumentations
Python
78
star
17

kiuikit

A maintained, reusable and trustworthy toolkit for computer vision tasks.
Python
42
star
18

envlight

Environment light tools.
Python
38
star
19

FocalLoss.pytorch

Implementation of focal loss in pytorch for unbalanced classification.
Python
35
star
20

dimr

[ECCV 2022] Disentangled Instance Mesh Reconstruction
Python
27
star
21

NotVeryFastNeRF

an unofficial and partial implementation of FastNeRF
Jupyter Notebook
25
star
22

note

notebook archive
PowerShell
19
star
23

3d_human_poser

a naive 3d human pose editor GUI.
Python
16
star
24

vscode-mesh-viewer

A 3D mesh viewer for vscode
JavaScript
16
star
25

CCA

CCA, DCCA, DCCAE, ConvCCA
Python
14
star
26

grid_put

An operation trying to do the opposite of F.grid_sample
Python
13
star
27

index_grid_sample

Extension to `F.grid_sample` that allows using batch index per grid point.
Cuda
12
star
28

made-in-heaven-timer

create timer videos at any speed.
Python
11
star
29

q10r

A simple web questionnaire application.
Python
6
star
30

ddddsr

A python library for end-to-end image super resolution.
Python
5
star
31

lightnet

light weight convolutional neural network implementation in one c++ file.
C++
5
star
32

bsp_cvae

Python
4
star
33

learn_matmul

Cuda
3
star
34

trojan-privoxy-client

for unraid proxy.
Dockerfile
2
star
35

numpytorch

Monkey-patched numpy with pytorch syntax
Python
2
star
36

point_seg_dist

a CUDA implementation of points to lines/segments distance
C
2
star
37

pytorch_ddp_examples

Python
1
star
38

uuunet

Python
1
star
39

fbxloader

FBX file loader for python (only supports geometry currently)
Python
1
star
40

unraid_tutorial

2021ๅนด็š„unraidๆญๅปบๆ•™็จ‹
1
star
41

Uncertainty

program to calculate uncertainty for Physics experiment.
Python
1
star
42

CapsNet.pytorch

reimplementation of capsule network for MNIST classification.
Python
1
star
43

nonsense

NoNSeNSe frontend.
JavaScript
1
star
44

JLGCN

Joing learning of graphs and features
Python
1
star
45

live-speech-recognition

A simple sliding window based real-time speech recognition example.
Python
1
star
46

dullPLYviewer

HTML
1
star
47

MaxClique

Heuristic algorithms to solve the max clique problem.
C++
1
star
48

hawtorch

pytorch extensions for code reuse
Python
1
star