--- license: - cc-by-nc-sa-4.0 configs: - config_name: default data_files: - split: train path: data/train-* - split: validation path: data/validation-* - split: test path: data/test-* dataset_info: features: - name: text dtype: string - name: image dtype: image splits: - name: train num_bytes: 3375690407.25 num_examples: 90350 - name: validation num_bytes: 185854656.625 num_examples: 5019 - name: test num_bytes: 184884997.5 num_examples: 5020 download_size: 3230633440 dataset_size: 3746430061.375 annotations_creators: - expert-generated language_creators: - expert-generated language: - en multilinguality: - monolingual size_categories: - 100K ![ChemPile Logo](CHEMPILE_LOGO.png) [![Dataset](https://img.shields.io/badge/🤗%20Hugging%20Face-Dataset-yellow)](https://huggingface.co/datasets/jablonkagroup/chempile-caption) [![License: CC BY-NC-SA 4.0](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-blue.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/) [![Paper](https://img.shields.io/badge/📄-Paper-red)](https://arxiv.org/abs/2505.12534) [![Website](https://img.shields.io/badge/🌐-Website-green)](https://chempile.lamalab.org/) *A comprehensive collection of image-caption pairs for chemistry-related visual content* ChemPile-Caption is a dataset designed for image captioning tasks in the field of chemistry. It is part of the ChemPile project, which aims to create a comprehensive collection of chemistry-related data for training language models. This dataset includes a variety of images scraped from LibreTexts related to chemical structures, reactions, and laboratory equipment, along with corresponding captions that describe the content of the images. All the content is made open-source under the license cc-by-nc-sa-4.0, allowing for non-commercial use and adaptation with proper attribution. The origin of the dataset is the LibreTexts project, which provides a wealth of educational resources in chemistry. The images in this dataset are sourced from various LibreTexts pages, ensuring a diverse range of chemical topics and visual representations. To obtain the images, an in house web scraping process was employed, specifically targeting all the books LibreTexts Chemistry. The images were downloaded and stored in a structured format, with each image associated with its corresponding caption and alt text, filtering out any images that did not have a long enough caption or alt text. The dataset is structured into a single simple default configuration, which simplifies the loading and usage of the dataset. The configuration includes the following fields: - text: The alt text plus the caption of the image, providing a detailed description of the image content. - image: The image, allowing users to access the visual content directly. Thus, the resulting ChemPile-Caption dataset contains a total of 100K image-caption pairs. ## Usage ```python from datasets import load_dataset dataset = load_dataset("jablonkagroup/chempile-caption") print(dataset) # DatasetDict({ # train: Dataset({ # features: ['text', 'image'], # num_rows: 90350 # }) # validation: Dataset({ # features: ['text', 'image'], # num_rows: 5019 # }) # test: Dataset({ # features: ['text', 'image'], # num_rows: 5020 # }) # }) sample = dataset['train'][0] print(f"Sample caption: {sample}") # Sample caption: {'text': '2 drawings and a photograph, as described...', 'image': ![ChemPile Logo](CHEMPILE_LOGO.png) Part of the ChemPile project - Advancing AI for Chemical Sciences