ashawkey / stable-dreamfusion

Text-to-3D & Image-to-3D & Mesh Exportation with NeRF + Diffusion.
Apache License 2.0
8.21k stars 721 forks source link

Question about zero123 radius #284

Open ug-kim opened 1 year ago

ug-kim commented 1 year ago

Hi, I have some questions about zero123 guidance model.

To use zero123, we have 3 parameters (polar, azimuth, and radius).

In your code, default_radius is 3.2, and delta_radius is the difference between a randomly generated radius (between 3.0 and 3.5) and default_radius.

  1. Why do you generate a radius randomly between 3.0 and 3.5?
  2. Default radius of zero123 is 3.2? If I use radius 3.2, do I have no additional delta_radius value? (i.e., zero123 input of radius is 0)
delta_radius = radius - self.opt.default_radius

Thank you.

ashawkey commented 1 year ago

@ug-kim Hi,

  1. that's quite empirical. We want to use a small fovy following make-it-3d, but to keep the object filling the [-1, 1]^3 cube, a large radius is needed.
  2. Yes, they seem train with delta_radius from [-0.5, 0.5], so this default radius should be ok.
claforte commented 1 year ago

I recommend enabling --save_guidance --save_guidance_interval 1 during your tests/development, that way you can see each image rendered during SD or Zero123 guidance, and you'll see if objects are overly cropped, and adjust the radius range accordingly. That was one of the key techniques I used to increase quality in my Anya tests... https://github.com/ashawkey/stable-dreamfusion/issues/263