Document the GQA200 dataset
Browse files
README.md
CHANGED
|
@@ -350,3 +350,82 @@ configs:
|
|
| 350 |
- split: validation
|
| 351 |
path: data/validation-*
|
| 352 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 350 |
- split: validation
|
| 351 |
path: data/validation-*
|
| 352 |
---
|
| 353 |
+
# GQA200
|
| 354 |
+
|
| 355 |
+
GQA200 is the scene-graph-generation benchmark subset of
|
| 356 |
+
[GQA](https://cs.stanford.edu/people/dorarad/gqa/index.html). This repository
|
| 357 |
+
uses the standard GQA200 taxonomy with 200 foreground object classes
|
| 358 |
+
and 100 foreground predicate classes.
|
| 359 |
+
|
| 360 |
+
## Splits
|
| 361 |
+
|
| 362 |
+
| Split | Images | Source |
|
| 363 |
+
| --- | ---: | --- |
|
| 364 |
+
| `train` | 57,623 | Standard GQA200 Train |
|
| 365 |
+
| `validation` | 8,209 | Standard GQA200 Test |
|
| 366 |
+
|
| 367 |
+
The standard GQA200 Test annotations are intentionally exposed as
|
| 368 |
+
`validation`. This repository does not define a separate `test` split.
|
| 369 |
+
|
| 370 |
+
## Fields
|
| 371 |
+
|
| 372 |
+
- `id`: GQA image identifier.
|
| 373 |
+
- `image`: image embedded in Parquet and decoded by `datasets` as a PIL image.
|
| 374 |
+
- `width`, `height`: image dimensions.
|
| 375 |
+
- `location`, `weather`: nullable strings copied from the original GQA scene
|
| 376 |
+
graph metadata.
|
| 377 |
+
- `boxes`: object boxes in `[x1, y1, x2, y2]` order.
|
| 378 |
+
- `labels`: GQA200 object `ClassLabel` IDs.
|
| 379 |
+
- `relations`: parallel `subject_index`, `object_index`, and predicate arrays.
|
| 380 |
+
|
| 381 |
+
Index 0 is `__background__` in both ClassLabel vocabularies. Foreground object
|
| 382 |
+
IDs are 1–200 and foreground predicate IDs are 1–100. Attributes and the full
|
| 383 |
+
raw GQA taxonomy are not included.
|
| 384 |
+
|
| 385 |
+
Boxes are clipped to image bounds. Objects with zero area after clipping are
|
| 386 |
+
removed, remaining object indices are compacted, and relations touching removed
|
| 387 |
+
objects are discarded.
|
| 388 |
+
|
| 389 |
+
## Loading
|
| 390 |
+
|
| 391 |
+
```python
|
| 392 |
+
from datasets import load_dataset
|
| 393 |
+
|
| 394 |
+
dataset = load_dataset("wliafe/GQA200")
|
| 395 |
+
sample = dataset["train"][0]
|
| 396 |
+
|
| 397 |
+
image = sample["image"] # PIL.Image.Image
|
| 398 |
+
object_name = dataset["train"].features["labels"].feature.int2str(
|
| 399 |
+
sample["labels"][0]
|
| 400 |
+
)
|
| 401 |
+
predicate_name = (
|
| 402 |
+
dataset["train"]
|
| 403 |
+
.features["relations"]["predicate"]
|
| 404 |
+
.feature.int2str(sample["relations"]["predicate"][0])
|
| 405 |
+
)
|
| 406 |
+
```
|
| 407 |
+
|
| 408 |
+
`location` and `weather` may be `None` when the original scene graph omits the
|
| 409 |
+
field.
|
| 410 |
+
|
| 411 |
+
## Sources and citation
|
| 412 |
+
|
| 413 |
+
The original format is documented on the
|
| 414 |
+
[GQA download page](https://cs.stanford.edu/people/dorarad/gqa/download.html).
|
| 415 |
+
The GQA200 benchmark split and taxonomy follow the SHA-GCL evaluation setup.
|
| 416 |
+
|
| 417 |
+
```bibtex
|
| 418 |
+
@inproceedings{hudson2019gqa,
|
| 419 |
+
title={GQA: A New Dataset for Real-World Visual Reasoning and Compositional Question Answering},
|
| 420 |
+
author={Hudson, Drew A. and Manning, Christopher D.},
|
| 421 |
+
booktitle={CVPR},
|
| 422 |
+
year={2019}
|
| 423 |
+
}
|
| 424 |
+
|
| 425 |
+
@inproceedings{dong2022stacked,
|
| 426 |
+
title={Stacked Hybrid-Attention and Group Collaborative Learning for Unbiased Scene Graph Generation},
|
| 427 |
+
author={Dong, Xingning and Gan, Tian and Song, Xianjing and Wu, Jinhui and Cheng, Yuan and Nie, Liqiang},
|
| 428 |
+
booktitle={CVPR},
|
| 429 |
+
year={2022}
|
| 430 |
+
}
|
| 431 |
+
```
|