Skip to content

Commit

Permalink
Update tutorials to Clay v1.5 (#336)
Browse files Browse the repository at this point in the history
* Update tutorials & embedder notebook

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
srmsoumya and pre-commit-ci[bot] authored Dec 4, 2024
1 parent 436d304 commit 774db28
Show file tree
Hide file tree
Showing 8 changed files with 1,868 additions and 1,544 deletions.
601 changes: 0 additions & 601 deletions docs/tutorials/clay-v1-wall-to-wall.ipynb

This file was deleted.

878 changes: 878 additions & 0 deletions docs/tutorials/embeddings.ipynb

Large diffs are not rendered by default.

File renamed without changes.
148 changes: 92 additions & 56 deletions docs/tutorials/reconstruction.ipynb

Large diffs are not rendered by default.

827 changes: 0 additions & 827 deletions docs/tutorials/visualize-embeddings.ipynb

This file was deleted.

655 changes: 655 additions & 0 deletions docs/tutorials/wall-to-wall.ipynb

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions finetune/embedder/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
```bash
python -m finetune.embedder.factory \
--img_size 256 \
--ckpt_path checkpoints/clay-v1-base.ckpt \
--ckpt_path checkpoints/clay_v1.5.ckpt \
--device cuda \
--name clay-v1-encoder.onnx \
--name clay-v1.5-encoder.onnx \
--onnx
# exports Clay encoder to ONNX format that can handle chips of size 256x256
# for different sensors like Sentinel-2, Landsat-8, NAIP, LINZ & Sentinel 1.
Expand All @@ -19,9 +19,9 @@
```bash
python -m finetune.embedder.factory \
--img_size 224 \
--ckpt_path checkpoints/clay-v1-base.ckpt \
--ckpt_path checkpoints/clay_v1.5.ckpt \
--device cuda \
--name clay-v1-encoder.pt2 \
--name clay-v1.5-encoder.pt2 \
--ep
# exports Clay encoder to pytorch ExportedProgram format that can handle chips
# of size 224x224 for different sensors like Sentinel-2, Landsat-8, NAIP, LINZ
Expand Down Expand Up @@ -146,9 +146,9 @@ def __init__(self, img_size=256, ckpt_path=None, device="cpu"):
EmbeddingEncoder( # Default parameters for the Clay base model
img_size=img_size,
patch_size=8,
dim=768,
depth=12,
heads=12,
dim=1024,
depth=24,
heads=16,
dim_head=64,
mlp_ratio=4.0,
).to(device)
Expand Down
Loading

0 comments on commit 774db28

Please sign in to comment.