dsrestrepo commited on
Commit
11effdf
1 Parent(s): 6422472

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +24 -0
README.md CHANGED
@@ -12,6 +12,30 @@ The model was trained using bands 1-12 of the Sentinel-2 satellites and using th
12
 
13
  The input shape of the model is 224, 224, 12. To extract features you should remove the last layer.
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  ## Intended uses & limitations
16
 
17
  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.
 
12
 
13
  The input shape of the model is 224, 224, 12. To extract features you should remove the last layer.
14
 
15
+ The model can be read as (example in jupyer):
16
+ ```
17
+ !git lfs install
18
+ !git clone https://huggingface.co/MITCriticalData/Sentinel-2_ViT_Autoencoder_RGB
19
+
20
+ import tensorflow as tf
21
+ from transformers import TFViTModel
22
+
23
+
24
+ model = tf.keras.models.load_model('Sentinel-2_ViT_Autoencoder_RGB', custom_objects={"TFViTModel": TFViTModel})
25
+ ```
26
+
27
+ You can extract the embeddings removing the last layer using:
28
+ ```
29
+ import tensorflow as tf
30
+
31
+ model = tf.keras.Sequential()
32
+
33
+ for layer in autoencoder.layers[:-1]: # just exclude last layer from copying
34
+ model.add(layer)
35
+
36
+ ```
37
+
38
+
39
  ## Intended uses & limitations
40
 
41
  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.