Datasets:
Tasks:
Visual Question Answering
Formats:
parquet
Languages:
English
Size:
10K - 100K
ArXiv:
Tags:
remote-sensing
satellite-imagery
geospatial
earth-observation
spatial-reasoning
quantitative-reasoning
DOI:
License:
Card: cleaner examples figure and usage
Browse files- README.md +8 -5
- assets/examples.jpg +2 -2
README.md
CHANGED
|
@@ -46,25 +46,28 @@ SQuID asks vision-language models to measure satellite images: count objects, co
|
|
| 46 |
from datasets import load_dataset
|
| 47 |
|
| 48 |
bench = load_dataset("PeterAM4/SQuID", "benchmark", split="test")
|
|
|
|
| 49 |
ex = bench[0]
|
| 50 |
-
ex["
|
| 51 |
-
ex["
|
|
|
|
| 52 |
```
|
| 53 |
|
| 54 |
-
|
| 55 |
|
| 56 |
```python
|
| 57 |
def is_correct(pred, ex):
|
| 58 |
lo, hi = ex["acceptable_range_lower"], ex["acceptable_range_upper"]
|
| 59 |
-
if lo is None:
|
| 60 |
return str(pred) == ex["answer"]
|
| 61 |
return lo <= float(pred) <= hi
|
| 62 |
```
|
| 63 |
|
| 64 |
-
The `train` config
|
| 65 |
|
| 66 |
```python
|
| 67 |
from huggingface_hub import snapshot_download
|
|
|
|
| 68 |
snapshot_download("PeterAM4/SQuID", repo_type="dataset", local_dir="data")
|
| 69 |
```
|
| 70 |
|
|
|
|
| 46 |
from datasets import load_dataset
|
| 47 |
|
| 48 |
bench = load_dataset("PeterAM4/SQuID", "benchmark", split="test")
|
| 49 |
+
|
| 50 |
ex = bench[0]
|
| 51 |
+
ex["question"] # 'What percentage of the image is agricultural land within 50m of water bodies? (GSD: 0.3m)'
|
| 52 |
+
ex["answer"] # '29.32'
|
| 53 |
+
ex["image"] # PIL image; ex["mask"] is its reference mask (None for NAIP)
|
| 54 |
```
|
| 55 |
|
| 56 |
+
A numeric answer is correct inside its accepted range; the others must match exactly:
|
| 57 |
|
| 58 |
```python
|
| 59 |
def is_correct(pred, ex):
|
| 60 |
lo, hi = ex["acceptable_range_lower"], ex["acceptable_range_upper"]
|
| 61 |
+
if lo is None: # yes/no (1/0), connected/fragmented
|
| 62 |
return str(pred) == ex["answer"]
|
| 63 |
return lo <= float(pred) <= hi
|
| 64 |
```
|
| 65 |
|
| 66 |
+
The `train` config holds 75,687 questions whose `image` and `mask` are paths in this repository:
|
| 67 |
|
| 68 |
```python
|
| 69 |
from huggingface_hub import snapshot_download
|
| 70 |
+
|
| 71 |
snapshot_download("PeterAM4/SQuID", repo_type="dataset", local_dir="data")
|
| 72 |
```
|
| 73 |
|
assets/examples.jpg
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|