Git Product home page Git Product logo

Comments (2)

ZexinHe avatar ZexinHe commented on May 29, 2024 1

Hi,

You can simply change the model configs and dataset configs based on the differences described in the model_card.md.
Here's an example.
image

from openlrm.

da2r-20 avatar da2r-20 commented on May 29, 2024

Hi, could you provide the configuration files that you used to train the models that are made available on huggingface? I noticed that the one available in the repo refers to the small model, but I would like to try finetuning the base and large.
Every published model contains a config.json file with the info
See here for example: https://huggingface.co/zxhezexin/openlrm-obj-small-1.1/tree/main

You can also fetch this configuration with the following code:

import transformers
model_config = transformers.PretrainedConfig.from_pretrained("zxhezexin/openlrm-obj-base-1.1")
print(model_config)
PretrainedConfig {
  "camera_embed_dim": 1024,
  "encoder_feat_dim": 768,
  "encoder_freeze": false,
  "encoder_model_name": "dinov2_vitb14_reg",
  "encoder_type": "dinov2",
  "rendering_samples_per_ray": 96,
  "transformer_dim": 768,
  "transformer_heads": 12,
  "transformer_layers": 12,
  "transformers_version": "4.28.1",
  "triplane_dim": 48,
  "triplane_high_res": 64,
  "triplane_low_res": 32
}

Personaly for pretraining I've changed the code to load the pretrained model directly

from openlrm.utils.hf_hub import wrap_model_hub

class LRMTrainer(Trainer):

    ...

    def _build_model(self, cfg):
        assert (
            cfg.experiment.type == "lrm"
        ), f"Config type {cfg.experiment.type} does not match with runner {self.__class__.__name__}"
        from openlrm.models import ModelLRM

        model_class = wrap_model_hub(ModelLRM)
        model = model_class.from_pretrained(cfg.experiment.pretrained)
        return model

you can replace cfg.experiment.pretrained with "zxhezexin/openlrm-obj-base-1.1" or add a pretrained key to your config

from openlrm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.