|
| 1 | +<div itemscope itemtype="http://schema.org/Dataset"> |
| 2 | + <div itemscope itemprop="includedInDataCatalog" itemtype="http://schema.org/DataCatalog"> |
| 3 | + <meta itemprop="name" content="TensorFlow Datasets" /> |
| 4 | + </div> |
| 5 | + <meta itemprop="name" content="ai2dcaption" /> |
| 6 | + <meta itemprop="description" content="This dataset is primarily based off the AI2D Dataset (see [here]( https://prior.allenai.org/projects/diagram-understanding)). See [Section 4.1](https://arxiv.org/pdf/2310.12128) of our paper for the AI2D-Caption dataset annotation process. To use this dataset: ```python import tensorflow_datasets as tfds ds = tfds.load('ai2dcaption', split='train') for ex in ds.take(4): print(ex) ``` See [the guide](https://www.tensorflow.org/datasets/overview) for more informations on [tensorflow_datasets](https://www.tensorflow.org/datasets). <img src="https://storage.googleapis.com/tfds-data/visualization/fig/ai2dcaption-1.0.0.png" alt="Visualization" width="500px"> " /> |
| 7 | + <meta itemprop="url" content="https://www.tensorflow.org/datasets/catalog/ai2dcaption" /> |
| 8 | + <meta itemprop="sameAs" content="https://huggingface.co/datasets/abhayzala/AI2D-Caption" /> |
| 9 | + <meta itemprop="citation" content="@inproceedings{Zala2024DiagrammerGPT, author = {Abhay Zala and Han Lin and Jaemin Cho and Mohit Bansal}, title = {DiagrammerGPT: Generating Open-Domain, Open-Platform Diagrams via LLM Planning}, year = {2024}, booktitle = {COLM}, }" /> |
| 10 | +</div> |
| 11 | + |
| 12 | +# `ai2dcaption` |
| 13 | + |
| 14 | + |
| 15 | +Note: This dataset was added recently and is only available in our |
| 16 | +`tfds-nightly` package |
| 17 | +<span class="material-icons" title="Available only in the tfds-nightly package">nights_stay</span>. |
| 18 | + |
| 19 | +* **Description**: |
| 20 | + |
| 21 | +This dataset is primarily based off the AI2D Dataset (see |
| 22 | +[here](https://prior.allenai.org/projects/diagram-understanding)). |
| 23 | + |
| 24 | +See [Section 4.1](https://arxiv.org/pdf/2310.12128) of our paper for the |
| 25 | +AI2D-Caption dataset annotation process. |
| 26 | + |
| 27 | +* **Homepage**: |
| 28 | + [https://huggingface.co/datasets/abhayzala/AI2D-Caption](https://huggingface.co/datasets/abhayzala/AI2D-Caption) |
| 29 | + |
| 30 | +* **Source code**: |
| 31 | + [`tfds.datasets.ai2dcaption.Builder`](https://github.com/tensorflow/datasets/tree/master/tensorflow_datasets/datasets/ai2dcaption/ai2dcaption_dataset_builder.py) |
| 32 | + |
| 33 | +* **Versions**: |
| 34 | + |
| 35 | + * **`1.0.0`** (default): Initial release. |
| 36 | + |
| 37 | +* **Download size**: `Unknown size` |
| 38 | + |
| 39 | +* **Dataset size**: `2.01 GiB` |
| 40 | + |
| 41 | +* **Auto-cached** |
| 42 | + ([documentation](https://www.tensorflow.org/datasets/performances#auto-caching)): |
| 43 | + No |
| 44 | + |
| 45 | +* **Splits**: |
| 46 | + |
| 47 | +Split | Examples |
| 48 | +:-------------------------------- | -------: |
| 49 | +`'auditor_llm_training_examples'` | 30 |
| 50 | +`'gpt4v'` | 4,903 |
| 51 | +`'llava_15'` | 4,902 |
| 52 | +`'planner_llm_training_examples'` | 30 |
| 53 | +`'test'` | 75 |
| 54 | + |
| 55 | +* **Feature structure**: |
| 56 | + |
| 57 | +```python |
| 58 | +FeaturesDict({ |
| 59 | + 'caption': Text(shape=(), dtype=string), |
| 60 | + 'entities': Sequence({ |
| 61 | + 'bounds': BBoxFeature(shape=(4,), dtype=float32), |
| 62 | + 'cat': ClassLabel(shape=(), dtype=int64, num_classes=10), |
| 63 | + 'from': Text(shape=(), dtype=string), |
| 64 | + 'id': Text(shape=(), dtype=string), |
| 65 | + 'label': Text(shape=(), dtype=string), |
| 66 | + 'to': Text(shape=(), dtype=string), |
| 67 | + 'type': ClassLabel(shape=(), dtype=int64, num_classes=5), |
| 68 | + }), |
| 69 | + 'image': Image(shape=(None, None, 3), dtype=uint8, description=The image of the diagram.), |
| 70 | + 'image_filename': Text(shape=(), dtype=string), |
| 71 | + 'layout': ClassLabel(shape=(), dtype=int64, num_classes=7), |
| 72 | + 'relationships': Sequence(Text(shape=(), dtype=string)), |
| 73 | + 'topic': ClassLabel(shape=(), dtype=int64, num_classes=4), |
| 74 | +}) |
| 75 | +``` |
| 76 | + |
| 77 | +* **Feature documentation**: |
| 78 | + |
| 79 | +| Feature | Class | Shape | Dtype | Description | |
| 80 | +| :-------------- | :------------- | :----------- | :------ | :--------------- | |
| 81 | +| | FeaturesDict | | | | |
| 82 | +| caption | Text | | string | | |
| 83 | +| entities | Sequence | | | | |
| 84 | +| entities/bounds | BBoxFeature | (4,) | float32 | | |
| 85 | +| entities/cat | ClassLabel | | int64 | | |
| 86 | +| entities/from | Text | | string | | |
| 87 | +| entities/id | Text | | string | | |
| 88 | +| entities/label | Text | | string | | |
| 89 | +| entities/to | Text | | string | | |
| 90 | +| entities/type | ClassLabel | | int64 | | |
| 91 | +| image | Image | (None, None, | uint8 | The image of the | |
| 92 | +: : : 3) : : diagram. : |
| 93 | +| image_filename | Text | | string | Image filename. | |
| 94 | +: : : : : e.g. "1337.png" : |
| 95 | +| layout | ClassLabel | | int64 | | |
| 96 | +| relationships | Sequence(Text) | (None,) | string | | |
| 97 | +| topic | ClassLabel | | int64 | | |
| 98 | + |
| 99 | +* **Supervised keys** (See |
| 100 | + [`as_supervised` doc](https://www.tensorflow.org/datasets/api_docs/python/tfds/load#args)): |
| 101 | + `None` |
| 102 | + |
| 103 | +* **Figure** |
| 104 | + ([tfds.show_examples](https://www.tensorflow.org/datasets/api_docs/python/tfds/visualization/show_examples)): |
| 105 | + |
| 106 | +<img src="https://storage.googleapis.com/tfds-data/visualization/fig/ai2dcaption-1.0.0.png" alt="Visualization" width="500px"> |
| 107 | + |
| 108 | +* **Examples** |
| 109 | + ([tfds.as_dataframe](https://www.tensorflow.org/datasets/api_docs/python/tfds/as_dataframe)): |
| 110 | + |
| 111 | +<!-- mdformat off(HTML should not be auto-formatted) --> |
| 112 | + |
| 113 | +{% framebox %} |
| 114 | + |
| 115 | +<button id="displaydataframe">Display examples...</button> |
| 116 | +<div id="dataframecontent" style="overflow-x:auto"></div> |
| 117 | +<script> |
| 118 | +const url = "https://storage.googleapis.com/tfds-data/visualization/dataframe/ai2dcaption-1.0.0.html"; |
| 119 | +const dataButton = document.getElementById('displaydataframe'); |
| 120 | +dataButton.addEventListener('click', async () => { |
| 121 | + // Disable the button after clicking (dataframe loaded only once). |
| 122 | + dataButton.disabled = true; |
| 123 | + |
| 124 | + const contentPane = document.getElementById('dataframecontent'); |
| 125 | + try { |
| 126 | + const response = await fetch(url); |
| 127 | + // Error response codes don't throw an error, so force an error to show |
| 128 | + // the error message. |
| 129 | + if (!response.ok) throw Error(response.statusText); |
| 130 | + |
| 131 | + const data = await response.text(); |
| 132 | + contentPane.innerHTML = data; |
| 133 | + } catch (e) { |
| 134 | + contentPane.innerHTML = |
| 135 | + 'Error loading examples. If the error persist, please open ' |
| 136 | + + 'a new issue.'; |
| 137 | + } |
| 138 | +}); |
| 139 | +</script> |
| 140 | + |
| 141 | +{% endframebox %} |
| 142 | + |
| 143 | +<!-- mdformat on --> |
| 144 | + |
| 145 | +* **Citation**: |
| 146 | + |
| 147 | +``` |
| 148 | +@inproceedings{Zala2024DiagrammerGPT, |
| 149 | + author = {Abhay Zala and Han Lin and Jaemin Cho and Mohit Bansal}, |
| 150 | + title = {DiagrammerGPT: Generating Open-Domain, Open-Platform Diagrams via LLM Planning}, |
| 151 | + year = {2024}, |
| 152 | + booktitle = {COLM}, |
| 153 | +} |
| 154 | +``` |
| 155 | + |
0 commit comments