if you increase resolution to 8192 and use pytorch3d, a single 4090 can generate production ready models in about 5 minutes
hi, im using an older version where pytorch3d was used before nvdiffrast was implemented. and i noticed if you bump the resolution to 8192, unique3d is able to generate production ready models.
nvdiffrast is limited to a resolution of 2048, and this limitation holds the program back significantly. there are artifacts in some models when using 2048 resolution.
but with 8192 resolution, the models can be production ready, have look at the videos to see the quality. the eye model had artifacts in the demo, before i bumped it up to 8192. upon raising the resolution the artifacts went away
https://github.com/AiuniAI/Unique3D/assets/11796091/80e47969-6945-4418-a2e8-92e364b2ecdf
https://github.com/AiuniAI/Unique3D/assets/11796091/dc2ad584-cd2a-400e-9043-ce34dfe4ec86
Those results look amazing, would you be able to write up the setup process for the older version you're using?
its pretty simple. download the current version and uncomment line 101 of project_mesh.py and comment next line after it. then set the resolution variable anywhere its found within that file from 512 to 8192. its hard encoded in every function to a lower value.
make sure you have a 24GB vram gpu and 64GB of ram, because the high resolution will spill over a bit into cpu ram, but the speed is still decent, it will say it will take like hours to finish, but then atleast for me it sped up, and finished in 3-5 minutes.
Could you please upload the modified file? I changed the code but it doesn't generate the same good result as yours using the same picture.
@Humanoid-z Use the version here https://huggingface.co/spaces/Wuvin/Unique3D/tree/main
The line 101 is just a comment line though:
https://huggingface.co/spaces/Wuvin/Unique3D/blob/main/scripts/project_mesh.py
Would you mind show your detail changes ?
@Humanoid-z Use the version here https://huggingface.co/spaces/Wuvin/Unique3D/tree/main
The line 101 is just a comment line though:
https://huggingface.co/spaces/Wuvin/Unique3D/blob/main/scripts/project_mesh.py
Would you mind show your detail changes ?
that version is already using pytorch, i was refering to the github version
download that spaces one and just edit the resolution.
@Humanoid-z Use the version here https://huggingface.co/spaces/Wuvin/Unique3D/tree/main
The line 101 is just a comment line though:
https://huggingface.co/spaces/Wuvin/Unique3D/blob/main/scripts/project_mesh.py Would you mind show your detail changes ?
that version is already using pytorch, i was refering to the github version
download that spaces one and just edit the resolution.
Thanks for the confirmation.
Do you appear to know how to get this model output unwrapped mesh with UV and textures instead of heavy vertex colors mesh ? Or is there a way to achieve this by combining other projects somehow ?
its pretty simple. download the current version and uncomment line 101 of project_mesh.py and comment next line after it. then set the resolution variable anywhere its found within that file from 512 to 8192. its hard encoded in every function to a lower value.
make sure you have a 24GB vram gpu and 64GB of ram, because the high resolution will spill over a bit into cpu ram, but the speed is still decent, it will say it will take like hours to finish, but then atleast for me it sped up, and finished in 3-5 minutes.
How much of this ram are you sharing with gpu? 64gb shared?
hi, im using an older version where pytorch3d was used before nvdiffrast was implemented. and i noticed if you bump the resolution to 8192, unique3d is able to generate production ready models.
nvdiffrast is limited to a resolution of 2048, and this limitation holds the program back significantly. there are artifacts in some models when using 2048 resolution.
but with 8192 resolution, the models can be production ready, have look at the videos to see the quality. the eye model had artifacts in the demo, before i bumped it up to 8192. upon raising the resolution the artifacts went away
Recording.2024-06-17.181808.mp4 Recording.2024-06-17.181757.mp4
Can you help me with this issue here? https://github.com/AiuniAI/Unique3D/issues/61 It would be greatly appreciated and you likely have some insight.
i forgot to mention that after changing the resolution in the files i used a 8192x8192 image file that is perfectly square. if the image is not 8192x8192 to begin with then changing the resolution to 8192 in the project file wont do much.
i used AI upscaling to scale my images to 8192x8192, that seemed to help alot
your link requires access permission to see it. but anyways one thing i noticed was that images of your object need to be looking dead center at the camera. and i've gotten the best results from using an image of a character that are not turning away or angled oddly, and without fingers exposed. see the examples below
In the project_mesh.py file, I replaced all '512' and '1024' with 8192 and in the following line
ret = project_color(meshes, camera, image, eps=eps, resolution=8192, device=device, use_alpha=use_alpha)
I set the resolution to 8192 so all the calls from other functions will use that resolution. Input image is 8192x8192.
But I haven't seen any big improvement, Am i missing something important?
@pharrowboy @mattia-z Can you upload the updated files? in the space resolution is a parameter with the value hardcoded. Is that what you are saying to change? I'm a little confused as others and this is a very interesting improvement to test.
@josepmy sorry for the long wait, I just cloned the repo from Hugging face and in the file unique3d/scripts/project_mesh.py, I change all the paramters "resolution to 8192" so basically i replaced all the value like 512 or 1024 with 8192. And I upscaled my input image to 8192x8192. But I've not noticed any quality improvement
