![]() Two approaches to stereo conversion can be loosely defined: quality semiautomatic conversion for cinema and high quality 3DTV, and low-quality automatic conversion for cheap 3DTV, VOD and similar applications. If done properly and thoroughly, the conversion produces stereo video of similar quality to "native" stereo video which is shot in stereo and accurately adjusted and aligned in post-production. However, in order to be successful, the conversion should be done with sufficient accuracy and correctness: the quality of the original 2D images should not deteriorate, and the introduced disparity cue should not contradict other cues used by the brain for depth perception. Movies, television shows, social media, printed imagesĢD to 3D video conversion (also called 2D to stereo 3D conversion and stereo conversion) is the process of transforming 2D ("flat") film to 3D form, which in almost all cases is stereo, so it is the process of creating imagery for each eye from one 2D image.ĢD-to-3D conversion adds the binocular disparity depth cue to digital images perceived by the brain, thus, if done properly, greatly improving the immersive effect while viewing stereo video in comparison to 2D video. Run python text-to-3d.py and enter your prompt when the program asks for it.Process of transforming 2D film to 3D form 2D to 3D conversion Process type With open(f'.ply', 'wb') as f:ĭecode_latent_mesh(xm, latent).tri_mesh().write_ply(f)ġ7. Size = 64 # this is the size of the renders higher values take longer to render.įrom shap_e.util.notebooks import decode_latent_mesh Render_mode = 'nerf' # you can change this to 'stf' Model = load_model('text300M', device=device)ĭiffusion = diffusion_from_config(load_config('diffusion')) Xm = load_model('transmitter', device=device) ![]() import torchįrom shap_e.diffusion.sample import sample_latentsįrom shap_e.diffusion.gaussian_diffusion import diffusion_from_configįrom shap_e.models.download import load_model, load_configįrom shap_e.util.notebooks import create_pan_cameras, decode_latent_images, gif_widgetĭevice = vice('cuda' if _available() else 'cpu') It will allow you to generate PLY files based on text prompts at the command line. Create the following python script and save it as text-to-3d.py or another name. You'll see a directory of folders and files.ġ6. ![]() Navigate to the localhost URL the software shows you. Enter the shap-e folder and run the install using pip. Git will create a shap-e folder underneath the one you cloned it from.Ĩ. If you get a cuda error, try running sudo apt install nvidia-cuda-dev and then repeating the process.Ħ. This is the area where it took me hours and hours to find a combination that worked. conda install pytorch torchvision torchaudio cpuonly -c pytorchĥ. The install is speedy but processing the actual 3D generation with the CPU was extremely slow in my experience. If you don't have an Nvidia card, you'll need to do a CPU-based install. conda install pytorch=1.13.0 torchvision pytorch-cuda=11.6 -c pytorch -c nvidia If you have an Nvidia graphics card, Use this command. Create a Conda environment called shap-e with Python 3.9 installed (other versions of Python may work). You can find a download and instructions on the Conda site.Ģ. Install Miniconda or Anaconda in Linux if you don't already have it. So the instructions below will work either in native Linux or in WSL2 under Windows. However, when I decided to use WSL2 (Windows Subsytem for Linux), I was able to get it up and running with few hassles. However, I kept running into problems, especially because I could not get Pytorch3D, a required library, to install. I attempted to install and run the software in Windows, using Miniconda to create a dedicated Python environment. OpenAI has posted a Shap-E repository to GitHub, along with some instructions on how to run it. I should note that the first time you run any of the scripts, it will need to download the models, which are 2 to 3 GB and could take several minutes to transfer. In short, if you are going to use Shap-E, make sure you have an Nvidia GPU (Shap-E doesn't support other brands of GPUs. However, when I tried doing text-to-3D on my old laptop, with has an Intel 8th Gen U series CPU and integrated graphics, it had only finished 3 percent of a render after an hour. On an Asus ROG Strix Scar 18 with an RTX 4090 laptop GPU and an Intel Core i9-13980HX, it took two to three minutes. ![]() On my home desktop, with an RTX 3080 GPU and a Ryzen 9 5900X CPU, it took about five minutes to complete a render. Whether I was doing text or image to 3D processing, Shap-E required a ton of system resources. However, it's likely that if I had a 2D PNG that looked a bit more 3D-ish (the way the corgi does), I'd get better results.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |