```python import numpy as np import earthview as ev data = ev.load_dataset("satellogic", shards=[10]) # shard is optional sample = next(iter(data)) print(sample.keys()) print(np.array(sample['rgb']).shape) # RGB Data print(np.array(sample['1m']).shape) # NIR Data ``` |
``` dict_keys(['1m', 'rgb', 'metadata']) (1, 3, 384, 384) (1, 1, 384, 384) ``` |
```python sample = ev.item_to_images("satellogic", sample) display(sample) display(*sample["rgb"]) display(*sample["1m"]) ``` |
```
{'1m': [ |
```python from itertools import islice import earthview as ev data = ev.load_dataset("satellogic", shards=[10]) # shard is optional datai = iter(data) for sample in islice(datai, 10): sample = ev.item_to_images("satellogic", sample) print(sample["metadata"]["bounds"]) sample["rgb"][0].show() ``` |
```python import numpy as np import earthview as ev # data = ev.load_dataset("sentinel_1", shards=[88]) # shard is optional data = ev.load_parquet("dataset/sentinel_1/train-00088-of-01763.parquet") sample = next(iter(data)) print(sample.keys()) print(np.array(sample['rgb']).shape) # RGB Data print(np.array(sample['10m']).shape) # NIR Data ``` |
``` dict_keys(['10m', 'metadata']) (6, 2, 384, 384) ``` |
```python sample = ev.item_to_images("sentinel_1", sample) display(sample) display(*sample["10m"][:2]) ``` |
```
{'10m': [ |
```python import numpy as np import earthview as ev data = ev.load_dataset("neon", shards=[100]) # shard is optional # data = ev.load_parquet("neon", batch_size = 10) sample = next(iter(data)) print(sample.keys()) print(np.array(sample['rgb']).shape) # RGB Data print(np.array(sample['chm']).shape) # Canopy Height print(np.array(sample['1m']).shape) # Hyperspectral ``` |
``` dict_keys(['1m', 'chm', 'rgb', 'metadata']) (3, 3, 640, 640) (3, 1, 64, 64) (3, 369, 64, 64) ``` |
```python sample = ev.item_to_images("neon", sample) display(sample) display(sample["rgb"][0]) display(sample["1m"][0]) display(sample["chm"][0]) ``` |
```
{'1m': [ |