OpenTexture / Paint3D

Paint3D: Paint Anything 3D with Lighting-Less Texture Diffusion Models, a no lighting baked texture generative model
https://paint3d.github.io/
Apache License 2.0
579 stars 22 forks source link

My input obj file is different from demo obj file #13

Open yejr0229 opened 1 month ago

yejr0229 commented 1 month ago

Hi, thanks for your great work. I put my obj file on stage 1 like this: python pipeline_paint3d_stage1.py --sd_config controlnet/config/depth_based_inpaint_template.yaml --render_config paint3d/config/train_config_paint3d.py --mesh_path /public/omniteam/yejr/Paint3D-main/input_data/penguin/face_blue.obj --outdir outputs/penguin/stage1 And I get the following error: Traceback (most recent call last): File "/public/omniteam/yejr/Paint3D-main/paint3d/models/mesh.py", line 30, in init mesh = kal.io.obj.import_mesh(mesh_path, with_normals=True, with_materials=True) File "/public/omniteam/yejr/conda_env/paint3d/lib/python3.9/site-packages/kaolin/io/obj.py", line 187, in import_mesh face_normals_idx.append([int(d[2]) for d in data]) File "/public/omniteam/yejr/conda_env/paint3d/lib/python3.9/site-packages/kaolin/io/obj.py", line 187, in face_normals_idx.append([int(d[2]) for d in data]) ValueError: invalid literal for int() with base 10: ''

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/public/omniteam/yejr/Paint3D-main/pipeline_paint3d_stage1.py", line 287, in main() File "/public/omniteam/yejr/Paint3D-main/pipeline_paint3d_stage1.py", line 193, in main mesh_model = TexturedMeshModel(cfg=render_cfg, device=device,).to(device) File "/public/omniteam/yejr/Paint3D-main/paint3d/models/textured_mesh.py", line 31, in init self.mesh = Mesh(self.cfg.guide.shape_path, self.device, target_scale=self.cfg.guide.shape_scale, File "/public/omniteam/yejr/Paint3D-main/paint3d/models/mesh.py", line 32, in init mesh = kal.io.obj.import_mesh(mesh_path, with_normals=True, with_materials=False) File "/public/omniteam/yejr/conda_env/paint3d/lib/python3.9/site-packages/kaolin/io/obj.py", line 187, in import_mesh face_normals_idx.append([int(d[2]) for d in data]) File "/public/omniteam/yejr/conda_env/paint3d/lib/python3.9/site-packages/kaolin/io/obj.py", line 187, in face_normals_idx.append([int(d[2]) for d in data]) ValueError: invalid literal for int() with base 10: ''

I try to copy the material.mtl file from demo and still can't run, how to deal with it?

yejr0229 commented 1 month ago

Seems like my obj file lacks of 'normal'?