[ICCV 2023] Make-It-3D: High-Fidelity 3D Creation from A Single Image with Diffusion Prior
change readme
junshutangf64218d73d57
diff --git a/README.md b/README.mdindex 8f062a9..c8baf1a 100644--- a/README.md+++ b/README.md@@ -1,5 +1,11 @@-# Make-It-3D: High-Fidelity 3D Creation from A Single Image with Diffusion Prior-+# Make-It-3D: High-Fidelity 3D Creation from A Single Image with Diffusion Prior (ICCV 2023)+<!--  -->+<div class="half">+ <img src="demo/bunny-cake.png" width="150"><img src="demo/bunny-cake-rgb.gif" width="150"><img src="demo/bunny-cake-normal.gif" width="150"><img src="demo/castle.png" width="150"><img src="demo/castle-rgb.gif" width="150"><img src="demo/castle-normal.gif" width="150">+</div>+<div class="half">+ <img src="demo/house.png" width="150"><img src="demo/house-rgb.gif" width="150"><img src="demo/house-normal.gif" width="150"><img src="demo/jay.png" width="150"><img src="demo/jay-rgb.gif" width="150"><img src="demo/jay-normal.gif" width="150">+</div>### [Project page](https://make-it-3d.github.io/) | [Paper](https://arxiv.org/abs/2303.14184)<!-- <br> -->[Junshu Tang](https://junshutang.github.io/), [Tengfei Wang](https://tengfei-wang.github.io/), [Bo Zhang](https://bo-zhang.me/), [Ting Zhang](https://www.microsoft.com/en-us/research/people/tinzhan/), [Ran Yi](https://yiranran.github.io/), [Lizhuang Ma](https://dmcv.sjtu.edu.cn/), and [Dong Chen](https://www.microsoft.com/en-us/research/people/doch/).@@ -9,20 +15,23 @@>In this work, we investigate the problem of creating high-fidelity 3D content from only a single image. This is inherently challenging: it essentially involves estimating the underlying 3D geometry while simultaneously hallucinating unseen textures. To address this challenge, we leverage prior knowledge from a well-trained 2D diffusion model to act as 3D-aware supervision for 3D creation. Our approach, Make-It-3D, employs a two-stage optimization pipeline: the first stage optimizes a neural radiance field by incorporating constraints from the reference image at the frontal view and diffusion prior at novel views; the second stage transforms the coarse model into textured point clouds and further elevates the realism with diffusion prior while leveraging the high-quality textures from the reference image. Extensive experiments demonstrate that our method outperforms prior works by a large margin, resulting in faithful reconstructions and impressive visual quality. Our method presents the first attempt to achieve high-quality 3D creation from a single image for general objects and enables various applications such as text-to-3D creation and texture editing.+++## Todo (Latest update: 2023/07/01)- [x] **Release coarse stage training code**- [x] **Release all training code (coarse + [refine stage](#refine-stage))**- [ ] Release the test benchmark for all results in the paper- [ ] Release more applications-## Some demo of coarse stage+## Demo of 360° geometry<div class="half">- <img src="demo/teddy.png" width="128"><img src="demo/teddy-rgb.gif" width="128"><img src="demo/teddy-normal.gif" width="128"><img src="demo/teddy-2.png" width="128"><img src="demo/teddy-2-rgb.gif" width="128"><img src="demo/teddy-2-normal.gif" width="128">+ <img src="demo/teddy.png" width="150"><img src="demo/teddy-rgb.gif" width="150"><img src="demo/teddy-normal.gif" width="150"><img src="demo/teddy-2.png" width="150"><img src="demo/teddy-2-rgb.gif" width="150"><img src="demo/teddy-2-normal.gif" width="150"></div>## SAM + Make-It-3D<div class="half">- <img src="demo/corgi-demo.png" height="170"><img src="demo/corgi.png" width="170"><img src="demo/corgi-rgb.gif" width="170"><img src="demo/corgi-normal.gif" width="170">+ <img src="demo/corgi-demo.png" height="200"><img src="demo/corgi.png" width="200"><img src="demo/corgi-rgb.gif" width="200"><img src="demo/corgi-normal.gif" width="200"></div>diff --git a/demo/astronaut-normal.gif b/demo/astronaut-normal.gifnew file mode 100644index 0000000..8a2531eBinary files /dev/null and b/demo/astronaut-normal.gif differdiff --git a/demo/astronaut-rgb.gif b/demo/astronaut-rgb.gifnew file mode 100644index 0000000..74ceb2aBinary files /dev/null and b/demo/astronaut-rgb.gif differdiff --git a/demo/astronaut.png b/demo/astronaut.pngnew file mode 100644index 0000000..2ff37dcBinary files /dev/null and b/demo/astronaut.png differdiff --git a/demo/bunny-cake-alpha.png b/demo/bunny-cake-alpha.pngnew file mode 100644index 0000000..38c3805Binary files /dev/null and b/demo/bunny-cake-alpha.png differdiff --git a/demo/bunny-cake-normal.gif b/demo/bunny-cake-normal.gifnew file mode 100644index 0000000..2a13e1cBinary files /dev/null and b/demo/bunny-cake-normal.gif differdiff --git a/demo/bunny-cake-rgb.gif b/demo/bunny-cake-rgb.gifnew file mode 100644index 0000000..931cbdeBinary files /dev/null and b/demo/bunny-cake-rgb.gif differdiff --git a/demo/bunny-cake.png b/demo/bunny-cake.pngnew file mode 100644index 0000000..f514078Binary files /dev/null and b/demo/bunny-cake.png differdiff --git a/demo/castle-normal.gif b/demo/castle-normal.gifnew file mode 100644index 0000000..3d95c51Binary files /dev/null and b/demo/castle-normal.gif differdiff --git a/demo/castle-rgb.gif b/demo/castle-rgb.gifnew file mode 100644index 0000000..90590b6Binary files /dev/null and b/demo/castle-rgb.gif differdiff --git a/demo/castle.png b/demo/castle.pngnew file mode 100644index 0000000..03fc934Binary files /dev/null and b/demo/castle.png differdiff --git a/demo/house-normal.gif b/demo/house-normal.gifnew file mode 100644index 0000000..3136ea9Binary files /dev/null and b/demo/house-normal.gif differdiff --git a/demo/house-rgb.gif b/demo/house-rgb.gifnew file mode 100644index 0000000..b8819e1Binary files /dev/null and b/demo/house-rgb.gif differdiff --git a/demo/house.png b/demo/house.pngnew file mode 100644index 0000000..7640e97Binary files /dev/null and b/demo/house.png differdiff --git a/demo/jay-normal.gif b/demo/jay-normal.gifnew file mode 100644index 0000000..da2ad0eBinary files /dev/null and b/demo/jay-normal.gif differdiff --git a/demo/jay-rgb.gif b/demo/jay-rgb.gifnew file mode 100644index 0000000..1ecc7baBinary files /dev/null and b/demo/jay-rgb.gif differdiff --git a/demo/jay.png b/demo/jay.pngnew file mode 100644index 0000000..1c5015aBinary files /dev/null and b/demo/jay.png differdiff --git a/main.py b/main.pyindex 8f588f3..b744266 100644--- a/main.py+++ b/main.py@@ -69,7 +69,7 @@ if __name__ == '__main__':parser.add_argument('--bound', type=float, default=1, help="assume the scene is bounded in box(-bound, bound)")parser.add_argument('--dt_gamma', type=float, default=0, help="dt_gamma (>=0) for adaptive ray marching. set to 0 to disable, >0 to accelerate rendering (but usually with worse quality)")parser.add_argument('--min_near', type=float, default=0.1, help="minimum near distance for camera")- parser.add_argument('--radius_range', type=float, nargs='*', default=[0.8, 1.2], help="training camera radius range")+ parser.add_argument('--radius_range', type=float, nargs='*', default=[1.0, 1.5], help="training camera radius range")parser.add_argument('--fov', type=float, default=20, help="training camera fovy range")parser.add_argument('--fovy_range', type=float, nargs='*', default=[15, 25], help="training camera fovy range")parser.add_argument('--theta_range', type=float, nargs='*', default=[70, 110], help="training camera phi range")diff --git a/nerf/sd.py b/nerf/sd.pyindex 542bec0..34fbd55 100644--- a/nerf/sd.py+++ b/nerf/sd.py@@ -202,8 +202,8 @@ class StableDiffusion(nn.Module):latents = 1 / 0.18215 * latents- # with torch.no_grad():- imgs = self.vae.decode(latents).sample+ with torch.no_grad():+ imgs = self.vae.decode(latents).sampleimgs = (imgs / 2 + 0.5).clamp(0, 1)