Document the ReCon1M dataset
Browse filesDocument schema, image path resolution, splits, source ID remapping, and citation while preserving the generated YAML front matter (SHA-256: 63ad10bc99e3a7c4fe247126f74de7f0823b431f397587989c1fde8fd092bc89).
175 unmodified lines176177178175 unmodified lines- split: testpath: data/test-*---175 unmodified lines176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299175 unmodified lines- split: testpath: data/test-*---# ReCon1MReCon1M is a remote-sensing scene graph generation dataset derived fromFAIR1M. This repository packages the local release as structured Hugging FaceParquet annotations while keeping PNG images as ordinary repository files.The packaged release contains **22,262 images**,**60 object classes**, and**59 predicate classes**:| Split | Images || --- | ---: || `train` | 11,131 || `validation` | 3,710 || `test` | 7,421 |These counts describe the files in this packaged release. They differ from thecounts in the paper abstract, which may describe another ReCon1M release.## Repository layout```textimages/<split>/<first-two-ID-characters>/<id>.pngdata/...README.md```The `image` column is a POSIX repository-relative path such as`images/train/09/09868.png`. It contains neither image bytes nor an automaticPillow object. Most images use `.png`; the three JPEG-encoded source images usetheir corrected `.jpeg` filenames: `00024.jpeg`, `00033.jpeg`, and`00037.jpeg`.## Schema- `id`: original zero-padded image identifier.- `image`: repository-relative PNG path.- `width`, `height`: PNG dimensions.- `image_source`, `gsd`: metadata from the object annotation header.- `polygons`: one four-point polygon per object. Coordinates and vertex orderare preserved; polygons are not converted to bounding boxes.- `labels`: object `ClassLabel` values.- `difficult`: original per-object difficulty integers.- `relations.subject_index`, `relations.object_index`: zero-based indices into`labels` and `polygons`.- `relations.predicate`: predicate `ClassLabel` values.The source object and predicate vocabularies use one-based IDs. This packagemaps them to zero-based Hugging Face `ClassLabel` indices without changingtheir vocabulary order. No `attributes` field is added.## Download and open imagesInstall `datasets`, `huggingface_hub`, and Pillow, then download the repositorysnapshot and load its Parquet annotations:```pythonfrom pathlib import Pathfrom datasets import load_datasetfrom huggingface_hub import snapshot_downloadfrom PIL import Imagerepo_dir = Path(snapshot_download("wliafe/recon1m", repo_type="dataset"))dataset = load_dataset("wliafe/recon1m")sample = dataset["train"][0]image_path = repo_dir / sample["image"]with Image.open(image_path) as image:image.load()print(image.size)```OpenCV can read the same resolved path:```pythonimport cv2image_bgr = cv2.imread(str(image_path), cv2.IMREAD_COLOR)if image_bgr is None:raise RuntimeError(f"Failed to read {image_path}")```The complete snapshot includes roughly 32.6 GB of PNG files. Calling only`load_dataset()` downloads the Parquet annotations, not all image files.For reproducible loading, pass the same revision to both calls:```pythonrevision = "<commit-sha>"repo_dir = Path(snapshot_download("wliafe/recon1m",repo_type="dataset",revision=revision,))dataset = load_dataset("wliafe/recon1m", revision=revision)```## CitationIf you use ReCon1M, cite the original paper:```bibtex@article{sun2024recon1m,title={ReCon1M: A Large-scale Benchmark Dataset for Relation Comprehension in Remote Sensing Imagery},author={Sun, Xian and Yan, Qiwei and Deng, Chubo and Liu, Chenglong and Jiang, Yi and Hou, Zhongyan and Lu, Wanxuan and Yao, Fanglong and Liu, Xiaoyu and Hao, Lingxiang and Yu, Hongfeng},journal={arXiv preprint arXiv:2406.06028},year={2024}}```See the [ReCon1M paper](https://arxiv.org/abs/2406.06028) for the datasetmethodology. Use of the images and annotations remains subject to the terms ofthe original ReCon1M and FAIR1M releases.
README.md+121