model

Clay-foundationApache-2.0更新放缓

开源的地球观测基础模型,能把 Sentinel-1/2 卫星影像和数字高程数据转成向量嵌入,方便做地表特征检索与下游分析。

The Clay Foundation Model - An open source AI model and interface for Earth

v1.0.1发布于 2025-07-05 10:54 UTC625star107fork同步于 2026-11-07 07:31 UTC

怎么上手

由 README 提炼,执行前请确认
pip install git+https://github.com/Clay-foundation/model.git
硬件要求按 README 说明

README 未说明具体显存要求;仅注明 mamba 环境创建命令已在带 CUDA GPU 的 Linux 设备上测试过,未提及 CPU 运行或 GPU 厂商型号。

需要 CUDA
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

面向地球观测的开源 AI 模型与接口,提供可直接调用的预训练权重与训练流程

开源的地球观测基础模型,能把 Sentinel-1/2 卫星影像和数字高程数据转成向量嵌入,方便做地表特征检索与下游分析。

核心能力

  • 提供 Apache 许可的源码与训练好的模型权重
  • 以 pip 包 claymodel 形式提供数据模块与模型模块
  • 基于 PyTorch Lightning 的 LightningCLI 驱动训练与验证
  • 附带 Jupyter Book 文档与 Binder、SageMaker 在线教程
  • 用 mamba 环境文件一键搭建含 JupyterLab 的开发环境

容易踩的坑

pip 安装后仍需克隆仓库才能拿到 trainer.py 和 configs 配置文件;开发环境推荐用 mamba 创建,且官方仅在 Linux + CUDA GPU 上测试过;训练需通过 trainer.py 配合 configs/config.yaml 运行,不能只靠 pip 包完成。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

3 个版本v1.0.1
  1. v1.0.1v1.0.1 Pip installable最新正式版2025-07-05 · 2025-07-05 10:54 UTC

    What's Changed

    New Contributors

  2. v1.02024-06-06 · 2024-06-06 10:55 UTC
    查看更新说明

    Release v1.0 (2024/06/06)

    💫 Highlights

    • 🎉 Release of Clay Foundation Model v1.0 🎉

    🚀 Model

    🗃️ Data Pipeline

    • Moved data pipeline code into stacchip a dedicated library for the data wrangling

    📖 Documentation

    🧰 Maintenance

  3. v0.0.1pre-release2024-01-12 · 2024-01-12 06:21 UTC
    查看更新说明

    Release v0.0.1 (2024/01/12)

    💫 Highlights

    • 🎉 First release of Clay Foundation Model 🎉
    • Implement MAE with support for position, time, latlon & channel embeddings (#47)

    🚀 Model

    • Generate embeddings from CLAYModule trained with latlon/time encodings (#96)
    • Add multigpu support & UI to test embeddings (#109)
    • Refactor model for multi-device usage and easier disabling of masking (#95)
    • Rename embeddings file to include MGRS code and store GeoTIFF source_url (#86)
    • Callback function to log Masked Autoencoder reconstructions to WandB (#88)
    • Adapt model to load 512x512 images from s3 bucket (#85)
    • Save embeddings with spatiotemporal metadata to GeoParquet (#73)
    • Generate embeddings via prediction loop (#56)
    • Initial Vision Transformer architecture with MAE decoder (#37)

    🗃️ Data Pipeline

    • Adapted sampling strategy (#81)
    • Allow ClayDataModule to load GeoTIFF files directly from s3 (#92)
    • Let ClayDataModule return same spatiotemporal fields as GeoTIFFDataModule (#91)
    • Improve date handling for data pipeline (#76)
    • Let LightningDataModule return spatiotemporal metadata (#66)
    • check for no data on a tile level in sentinel 1 vv and vh, sentinel 2 and DEM (#60)
    • Batch setup (#54)
    • LightningDataModule to load GeoTIFF files (#52)
    • Ready for batch (#44)
    • Tiler module (#41)
    • Landcover based sampling strategy (#29)
    • Datacube (#27)

    📖 Documentation

    • Document how the benchmark dataset labels were prepared (#100)
    • Document how to finetune pretrained model on downstream task (#99)
    • Document how to generate vector embeddings (#98)
    • Document how to run the datacube pipeline with a batch job (#97)
    • Initialize Jupyter Book documentation (#89)
    • Setting the model license to OpenRail-M (#63)
    • Create CODE_OF_CONDUCT.md (#53)

    🧰 Maintenance

    • Bump pytorch from 2.0.0 to 2.1.0, CUDA from 11.8 to 12.0 (#51)
    • Add pre-commit hooks with ruff formatter/linter rules (#26)
    • Setup GitHub Actions Continuous Integration tests (#25)
    • Setup LightningCLI trainer script (#24)
    • Initial conda environment and binder links (#15)

    🧑‍🤝‍🧑 Contributors

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Clay Foundation Model

    Jupyter Book Badge Deploy Book Status

    An open source AI model and interface for Earth.

    License

    Clay Model is licensed under the Apache. This applies to the source code as well as the trained model weights.

    The Documentation is licensed under the CC-BY-4.0 license.

    Quickstart

    Launch into a JupyterLab environment on

    BinderSageMaker Studio Lab
    BinderOpen in SageMaker Studio Lab

    Installation

    Pip Installation (Recommended)

    The easiest way to install Clay Foundation Model is via pip:

    pip install git+https://github.com/Clay-foundation/model.git
    

    This will install the claymodel package and all its dependencies. You can then import and use it in your Python code:

    from claymodel.datamodule import ClayDataModule
    from claymodel.module import ClayMAEModule
    

    Development Installation

    For development or advanced usage, you can set up the full development environment:

    To help out with development, start by cloning this repo-url

    git clone <repo-url>
    cd model
    

    Then we recommend using mamba to install the dependencies. A virtual environment will also be created with Python and JupyterLab installed.

    mamba env create --file environment.yml
    

    [!NOTE] The command above has been tested on Linux devices with CUDA GPUs.

    Activate the virtual environment first.

    mamba activate claymodel
    

    Finally, double-check that the libraries have been installed.

    mamba list
    

    Usage

    Running jupyter lab

    mamba activate claymodel
    python -m ipykernel install --user --name claymodel  # to install virtual env properly
    jupyter kernelspec list --json                       # see if kernel is installed
    jupyter lab &
    

    Running the model

    The neural network model can be run via LightningCLI v2.

    [!NOTE] If you installed via pip, you'll need to clone the repository to access the trainer script and config files.

    To check out the different options available, and look at the hyperparameter configurations, run:

    python trainer.py --help
    

    To quickly test the model on one batch in the validation set:

    python trainer.py fit --model ClayMAEModule --data ClayDataModule --config configs/config.yaml --trainer.fast_dev_run=True
    

    To train the model:

    python trainer.py fit --model ClayMAEModule --data ClayDataModule --config configs/config.yaml
    

    More options can be found using python trainer.py fit --help, or at the LightningCLI docs.

    Contributing

    Writing documentation

    Our Documentation uses Jupyter Book.

    Install it with:

    pip install -U jupyter-book
    

    Then build it with:

    jupyter-book build docs/
    

    You can preview the site locally with:

    python -m http.server --directory _build/html
    

    There is a GitHub Action on .github/workflows/deploy-docs.yml that builds the site and pushes it to GitHub Pages.