In the field of image shoots, we struggle a lot in getting multiple angles of any product image and there are heavy costs in doing these photoshoots with different angles of any business product which takes time as well.
But not a problem, because StabilityAi has released a new model Stability Zero123 which generates multiple 3d images from a single image with just a single click in no time.
Introducing Stable Zero123: Quality 3D object generation from single images.
— Stability AI (@StabilityAI) December 13, 2023
Stable Zero123, a new in-house generative AI model is capable of creating 3D objects from any input image.
Due to improved training datasets and elevation conditioning, the model demonstrates 3D… pic.twitter.com/JGCigD3f7a
We are excited to share with you a straightforward tutorial on how to effortlessly rotate 3D images using the new Stability AI model. Let's dive right into it.
If you want to download the model and use it locally then your can go to their github repo and download from there.
These are the basic fuctionalities provided by the model:
1. Novel View Synthesis
2. 3D reconstruction from a 2D image
Step-by-Step Tutorial:
If you come to the hugging face Zero123 demo platfrom, you will get many setting for generating image which are described below:
-Polar angle (vertical rotation in degrees)
-Azimuth angle (horizontal rotation in degrees)
-Zoom (relative distance from center)
-Number of samples to generate
In the advanced options you get these options:
-Diffusion guidance scale
-Number of diffusion inference steps
1. First of all, select your image and remove its background from any website online like remove.bg.2. Open the free platform by Hugging Face.
https://huggingface.co/spaces/cvlab/zero123-live
3. Upload your background removed image by dragging and drop into the box area.
4. After uploading, you will get various button options for getting the images from different angles. Just click on any one and you will get that side of images. There are various angles available like "View from Left", "View from right", "View from top", "View from bottom" etc.
This is top view of image.
You can see that viewing angle of second image that is from top is not up to mark. So, we have to take in mind that the model is in new state and we have to try multiple times to get the actual output.
Lets try something else like a human face.
We took this image and removed its background.
Here are its 3d images in different angles. And these are the results we got after using all the options from different angles. As for generating human face its not up to the mark. So, its not recommended for generating a 3d human face however its definitely give good results for generating product images.
Implementing the Rotation
Now, let's break down the workflow:
- Load your image using a checkpoint loader.
- Utilize the Clip Vision output using Mato's notebook for
incremental rotation.
- Experiment with parameters like batch size, resolution,
base elevation, and base azimuth.
- View your rotated images or create a GIF using the Video
Combine function.
b. Creating a Rotation Video
- Similar to the single image process but with a tweak for
video creation.
- Adjust parameters to suit your preferences.
- Combine the images into a GIF or explore other output
formats.
Tips need to consider while generating image using Zero123
-If you face any error while generating images then you must use low resolution.
-Generating 3d human face is not supported.
-You can also use "Advanced options" for good and detailed results.
-Its recommended to choose low value at "Number of sample" option because model will generate probabilistic results. Range from 3-5 will be good enough for setting the generating samples.
Conclusion:
Feel free to experiment with different settings, sampling methods, and resolutions. The possibilities are vast, and you can adapt the tutorial to your specific creative needs. Zero 123 Model has made our work easy and it is really a cost-cutting model from the business perspective.
And there you have it. A simple yet powerful tutorial on 3D rotation of 2D images.