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

[OpenLRM] inference, training, evaluation codes #824

Open
wants to merge 42 commits into
base: master
Choose a base branch
from

Conversation

chenyingshu
Copy link
Collaborator

What does this PR do?

This PR adds OpenLRM Inference, Training, and Evaluation codes in examples/openlrm:

Main modules include:

  • OpenLRM model that convert single image to 3D Triplane NeRF: openlrm/models/modeling_lrm.py
  • Inference pipeline: openlrm/runners/infer
  • Training pipeline and training model: openlrm/runners/train and openlrm/models/lrm_with_loss.py
  • Evaluation script: eval.py

@SamitHuang

**render_results, # 'images_rgb', 'images_depth', 'images_weight'
}

def construct_train(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

diff from construct?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

original construct() is never used. I have replaced construct() with new construct_train() in latest revision. [commit#62d1021]

perceptual_weight: 1.0
tv_weight: 5e-4
optim:
# lr: 4e-4 # args.start_learning_rate
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uncomment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary configs/comments were removed.

logger.info("Batch time cost: %.3fs.", batch_time)

target_images = data_batch["target_images"] # [M, C, H, W]
# print(f"target_images {target_images.shape}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove redundant comments. pls also check the other parts

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all redundant comments were removed.


### Inference Performance
- Input a single image, here reports speed of image-to-3D and image rendering.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls describe the ms version and graph/pynative mode that are used in testing, referring to the mindone wiki page

Copy link
Collaborator Author

@chenyingshu chenyingshu Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added ms version and pynative mode that are used in "inference performance" and "training performance" in README. [commit#307d51a]

@chenyingshu chenyingshu requested a review from vigo999 as a code owner February 6, 2025 03:36
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

Successfully merging this pull request may close these issues.

3 participants