--- license: other license_name: nasa-public-use license_link: https://ntrs.nasa.gov/citations/19830005543 language: - en task_categories: - image-to-text tags: - ocr - document-images - example configs: - config_name: default data_files: - split: train path: pages/** --- # OCR demo: Food for Space Flight Seven scanned pages from NASA's *Food for Space Flight* booklet, with headings, columns, photographs, food lists and tables. This small dataset is an input for trying OCR recipes and inspecting their results. The images are PDF pages **3-9** (printed pages **2-8**) of the original booklet. The selection omits the reproduction disclaimer and dark cover. The complete original PDF and a matching seven-page extract are in the [OCR demo Bucket](https://huggingface.co/buckets/uv-scripts/ocr-demo). ## Use as a dataset ```python from datasets import load_dataset pages = load_dataset("uv-scripts/ocr-demo", split="train") ``` There are seven rows in the `train` split: | Column | Meaning | |---|---| | `image` | Page image, rendered at 300 DPI and saved as JPEG at quality 85. | | `page_id` | Stable ID containing the original PDF page number. | | `source_page` | One-based page number in the original PDF. | | `printed_page` | Page number printed on the scanned page. | | `source` | NASA's source-record URL. | The images use the [ImageFolder format](https://huggingface.co/docs/datasets/en/image_dataset). `pages/metadata.jsonl` associates each image with its source-page information. There is no verified ground-truth transcription in this dataset. ## PDF and file inputs The [OCR demo Bucket](https://huggingface.co/buckets/uv-scripts/ocr-demo) contains: - `original/food-for-space-flight.pdf`: the unmodified nine-page NASA PDF. - `demo/food-for-space-flight.pdf`: a seven-page extract matching the dataset rows. - `pages/`: the same seven page images and metadata. Use one prefix, such as `hf://buckets/uv-scripts/ocr-demo/demo`, as your input to avoid processing both a PDF and its page images. ## Source and licence - [NASA record: NASA Facts: Food for Space Flight](https://ntrs.nasa.gov/citations/19830005543) - [Original PDF](https://ntrs.nasa.gov/api/citations/19830005543/downloads/19830005543.pdf) - [Document metadata](https://ntrs.nasa.gov/api/citations/19830005543) NASA's document record states **Work of the US Gov. Public Use Permitted**. The source pages retain that status; the repository's code license does not relicense the NASA document. See [NASA's usage guidance](https://www.nasa.gov/nasa-brand-center/images-and-media/). Attribute these source pages to NASA and identify any generated transcription as model output. NASA does not endorse this demo or verify its OCR results. The archival scan has damaged lettering and an imperfect existing OCR layer. Inspect generated text against the page images, especially tables and captions. ## Preparation Pages 3-9 were rendered from the original PDF with Poppler's `pdftoppm` at 300 DPI and saved as JPEG at quality 85. No OCR model was run during preparation. The Bucket's `manifest.json` records source URLs, file checksums and rendering settings.