dsrestrepo
commited on
Commit
·
9cddc13
1
Parent(s):
68fbdd4
Update README.md
Browse files
README.md
CHANGED
@@ -11,6 +11,30 @@ The model was trained using bands RGB (2, 3 and 4) (Red, Green and Blue) of the
|
|
11 |
|
12 |
The input shape of the model is 224, 224, 3. To extract features you should remove the last layer.
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
## Intended uses & limitations
|
15 |
|
16 |
The model was trained with images of 10 different cities in Colombia, however it may require fine tuning or retraining to learn from other contexts such as countries and other continents.
|
|
|
11 |
|
12 |
The input shape of the model is 224, 224, 3. To extract features you should remove the last layer.
|
13 |
|
14 |
+
The model can be read as (example in jupyer):
|
15 |
+
```
|
16 |
+
!git lfs install
|
17 |
+
!git clone https://huggingface.co/MITCriticalData/Sentinel-2_ViT_Autoencoder_RGB
|
18 |
+
|
19 |
+
import tensorflow as tf
|
20 |
+
from transformers import TFViTModel
|
21 |
+
|
22 |
+
|
23 |
+
model = tf.keras.models.load_model('Sentinel-2_ViT_Autoencoder_RGB', custom_objects={"TFViTModel": TFViTModel})
|
24 |
+
```
|
25 |
+
|
26 |
+
You can extract the embeddings removing the last layer using:
|
27 |
+
```
|
28 |
+
import tensorflow as tf
|
29 |
+
|
30 |
+
model = tf.keras.Sequential()
|
31 |
+
|
32 |
+
for layer in autoencoder.layers[:-1]: # just exclude last layer from copying
|
33 |
+
model.add(layer)
|
34 |
+
|
35 |
+
```
|
36 |
+
|
37 |
+
|
38 |
## Intended uses & limitations
|
39 |
|
40 |
The model was trained with images of 10 different cities in Colombia, however it may require fine tuning or retraining to learn from other contexts such as countries and other continents.
|