ported from nbdev
Browse files
README.md
CHANGED
@@ -2,4 +2,118 @@
|
|
2 |
license: openrail
|
3 |
license_name: open-rail-m
|
4 |
license_link: https://raw.githubusercontent.com/Clay-foundation/model/main/LICENSE-MODEL.md
|
5 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
license: openrail
|
3 |
license_name: open-rail-m
|
4 |
license_link: https://raw.githubusercontent.com/Clay-foundation/model/main/LICENSE-MODEL.md
|
5 |
+
---
|
6 |
+
|
7 |
+
# Clay documentation
|
8 |
+
|
9 |
+
|
10 |
+
## Overview
|
11 |
+
|
12 |
+
Clay is a [foundational model](#) of Earth using Earth Observation data.
|
13 |
+
As the AI Deep Learning architecture, it uses an expanded [visual
|
14 |
+
transformer](#) upgraded to understant geospatial and temporal relations
|
15 |
+
on Earth data, from any instrument/spectral data. The AI self-supervised
|
16 |
+
fundational task is a [Masked Autoencoder
|
17 |
+
(MAE)](https://arxiv.org/abs/2111.06377) approach for training.
|
18 |
+
|
19 |
+
The Clay model primarily functions in two ways: first, by directly
|
20 |
+
generating semantic embeddings for tasks like similarity searches, and
|
21 |
+
second, through fine-tuning its outputs with additional data labels.
|
22 |
+
This fine-tuning supports various tasks, including classification
|
23 |
+
(e.g. flood detection and deforestation monitoring), regression
|
24 |
+
(e.g. estimating carbon stock or crop yields), and generative tasks such
|
25 |
+
as creating RGB imagery from SAR data. Moreover, users can further
|
26 |
+
enhance model performance by incorporating higher-resolution data.
|
27 |
+
|
28 |
+
This documentation uses [nbdev](#), which combines documentation, code
|
29 |
+
samples and an SDK. This means that every page is also a python notebook
|
30 |
+
anyone can use, with practical code examples for each functionality, and
|
31 |
+
use case. Moreover, you can install `pip install clay` and use the same
|
32 |
+
functions.
|
33 |
+
|
34 |
+
Clay is open source, open data and open for business.
|
35 |
+
|
36 |
+
## Where is what
|
37 |
+
|
38 |
+
- Our **website** is [madewithclay.org](https://madewithclay.org).
|
39 |
+
- The Clay model **code** lives on
|
40 |
+
[Github](https://github.com/Clay-foundation/model). License:
|
41 |
+
[Apache](https://github.com/Clay-foundation/model/LICENSE).
|
42 |
+
- The Clay model **weights** live on [Huggin Face](https://huggingface.co/made-with-clay/Clay/). License:
|
43 |
+
[OpenRAIL-M](https://github.com/Clay-foundation/model/blob/main/LICENSE-MODEL.md).
|
44 |
+
- The Clay **documentation** [lives on this
|
45 |
+
site](https://clay-foundation.github.io/documentation/). License:
|
46 |
+
[CC-BY](#).
|
47 |
+
- The Clay **SDK** lives on
|
48 |
+
[PyPi](https://pypi.org/project/madewithclay/). License: [Apache](#).
|
49 |
+
- We maintain a set of **embeddings** on [Source Cooperative](#).
|
50 |
+
License: [ODC-BY](#).
|
51 |
+
|
52 |
+
## How to use Clay
|
53 |
+
|
54 |
+
The model can be used in two main ways:
|
55 |
+
|
56 |
+
1. Directly, use it to make inference. See [Model](Model.html)
|
57 |
+
1. Check and run Benchmarks on the model. See
|
58 |
+
[Benchmarks](Benchmarks.html)
|
59 |
+
2. Generating semantic **embeddings**. E.g. for Similarity search. See
|
60 |
+
[Embeddings](Embeddings.html).
|
61 |
+
3. **Fine-tunning** the model for other tasks, or for other input data.
|
62 |
+
E.g. flood detection, crop yields, … See
|
63 |
+
[Fine-tunning](Fine-tunning.html).
|
64 |
+
|
65 |
+
## How to contribute
|
66 |
+
|
67 |
+
Clay is an open source project, and we welcome contributions of all
|
68 |
+
kinds.
|
69 |
+
|
70 |
+
The Documentation, python package and notebooks are all the same
|
71 |
+
[NBdev](https://nbdev.fast.ai/) project, located
|
72 |
+
[here](https://github.com/Clay-foundation/documentation).
|
73 |
+
|
74 |
+
> Note: If you want to contribute to the model code, please check the
|
75 |
+
> [model repository](https://github.com/Clay-foundation/model).
|
76 |
+
|
77 |
+
To install the nbdev project locally, you can use:
|
78 |
+
|
79 |
+
``` bash
|
80 |
+
git clone git@github.com:Clay-foundation/documentation.git
|
81 |
+
cd documentation
|
82 |
+
pip install nbdev
|
83 |
+
nbdev_install_git_hooks
|
84 |
+
```
|
85 |
+
|
86 |
+
After you make changes, you can export the notebooks into both the
|
87 |
+
package, rendered documentation and clean jupyter notebook execution
|
88 |
+
metadata with:
|
89 |
+
|
90 |
+
``` bash
|
91 |
+
nbdev_prepare
|
92 |
+
```
|
93 |
+
|
94 |
+
If you want to preview the documentation locally, you can use:
|
95 |
+
|
96 |
+
``` bash
|
97 |
+
nbdev_preview
|
98 |
+
```
|
99 |
+
|
100 |
+
To run the test locally, you need to install [Github
|
101 |
+
CLI](https://cli.github.com/) and act extension
|
102 |
+
`sudo gh extension install nektos/gh-act`.
|
103 |
+
|
104 |
+
The “Clay model releases” folder uses a lot of resources to document the
|
105 |
+
version releases. To run these you also need access to the `S3` bucket
|
106 |
+
with outputs and all the embeddgins. You will need a local file
|
107 |
+
(e.g. `.secrets`) with the AWS credentials to read the Clay buckets.
|
108 |
+
Remember to confirm this file is on `.gitignore` to avoid commiting it.
|
109 |
+
|
110 |
+
Then you can run the tests with:
|
111 |
+
|
112 |
+
``` bash
|
113 |
+
gh act --secret-file .secrets
|
114 |
+
```
|
115 |
+
|
116 |
+
–
|
117 |
+
|
118 |
+
Clay is a fiscally sponsored project of [Radiant Earth](), a USA
|
119 |
+
registered 501(c)3 non-profit.
|