Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Training with .obj files #37

Open
juanfraherrero opened this issue Apr 15, 2024 · 2 comments
Open

Training with .obj files #37

juanfraherrero opened this issue Apr 15, 2024 · 2 comments

Comments

@juanfraherrero
Copy link

Hi ZexinHe, sorry to bother!.

I have a question about training with .obj files. Is this possible? or if you can give a hint on how to.

Thanks in advance!

@ZexinHe
Copy link
Collaborator

ZexinHe commented May 6, 2024

Hi there,

The input and output of OpenLRM are in the format of images. You may need to render your .obj files to images first. https://github.com/3DTopia/OpenLRM?tab=readme-ov-file#data-preparation

@da2r-20
Copy link

da2r-20 commented May 26, 2024

Replace this function in the blender script under scripts

# load the glb model
def load_object(object_path: str) -> None:
    """Loads a glb model into the scene."""
    if object_path.suffix == ".glb":
        bpy.ops.import_scene.gltf(filepath=str(object_path), merge_vertices=True)
    elif object_path.suffix == ".fbx":
        bpy.ops.import_scene.fbx(filepath=str(object_path))
    elif object_path.suffix == ".obj":
        bpy.ops.import_scene.obj(filepath=str(object_path))
    else:
        raise ValueError(f"Unsupported file type: {object_path}")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants