API Reference¶
Core package
Utility helpers
- rshf.utils.from_config(model_class, repo_id, revision=None, **kwargs)[source]¶
Load a model with randomly initialized weights using the architecture configuration stored in a HuggingFace Hub repository.
This is useful for training a model from scratch while still using the same architecture as a known pretrained checkpoint.
- Parameters:
model_class – The model class to instantiate (e.g.
SatMAE).repo_id (str) – HuggingFace Hub repository ID (e.g.
"MVRL/satmae-vitlarge-fmow-pretrain-800").revision (str, optional) – Branch, tag, or commit hash to use. Defaults to the latest revision.
**kwargs – Additional keyword arguments that override values read from the repository’s
config.json. These must be valid parameters formodel_class.__init__; unknown parameters will raise an error when the model is instantiated.
- Returns:
An instance of
model_classwith randomly initialized weights.- Raises:
huggingface_hub.utils.EntryNotFoundError – If
config.jsonis not found in the repository.huggingface_hub.utils.RepositoryNotFoundError – If
repo_iddoes not exist or is not accessible.
Example
>>> from rshf import from_config >>> from rshf.satmae import SatMAE >>> model = from_config(SatMAE, "MVRL/satmae-vitlarge-fmow-pretrain-800")
Model entry-point modules¶
The following modules expose the primary model classes:
rshf.biocliprshf.climplicitrshf.cliprshf.cromarshf.dinov3_satrshf.geoclaprshf.geocliprshf.prestorshf.prithvirshf.prom3ershf.rcmershf.remotecliprshf.rvsarshf.sat2caprshf.satcliprshf.satmaershf.satmaepprshf.scalemaershf.sencliprshf.sinrrshf.streetcliprshf.taxabind
See Model loading guide for load snippets and Functions and helpers for helper functions.