Document the OCR demo dataset and PDF Bucket

#1
by davanstrien HF Staff - opened
Files changed (1) hide show
  1. README.md +57 -8
README.md CHANGED
@@ -19,16 +19,65 @@ configs:
19
 
20
  # OCR demo: Food for Space Flight
21
 
22
- Seven scanned page images (PDF pages 3-9) from NASA's *NASA Facts: Food for Space Flight*.
23
- Load with `load_dataset("uv-scripts/ocr-demo", split="train")`.
24
- The original PDF and matching extract are in the [OCR demo Bucket](https://huggingface.co/buckets/uv-scripts/ocr-demo).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
  ## Source and licence
27
 
28
- Source: [NASA NTRS record 19830005543](https://ntrs.nasa.gov/citations/19830005543).
29
- [Original PDF](https://ntrs.nasa.gov/api/citations/19830005543/downloads/19830005543.pdf).
 
30
 
31
  NASA's document record states **Work of the US Gov. Public Use Permitted**.
32
- See [NASA's usage guidance](https://www.nasa.gov/nasa-brand-center/images-and-media/).
33
- The pages retain their source rights; the recipe repository's code licence does not relicense them.
34
- NASA does not endorse this demo. No verified ground-truth transcription is included.
 
 
 
 
 
 
 
 
 
 
 
19
 
20
  # OCR demo: Food for Space Flight
21
 
22
+ Seven scanned pages from NASA's *Food for Space Flight* booklet, with headings,
23
+ columns, photographs, food lists and tables. This small dataset is an input for
24
+ trying OCR recipes and inspecting their results.
25
+
26
+ The images are PDF pages **3-9** (printed pages **2-8**) of the original booklet.
27
+ The selection omits the reproduction disclaimer and dark cover. The complete
28
+ original PDF and a matching seven-page extract are in the
29
+ [OCR demo Bucket](https://huggingface.co/buckets/uv-scripts/ocr-demo).
30
+
31
+ ## Use as a dataset
32
+
33
+ ```python
34
+ from datasets import load_dataset
35
+
36
+ pages = load_dataset("uv-scripts/ocr-demo", split="train")
37
+ ```
38
+
39
+ There are seven rows in the `train` split:
40
+
41
+ | Column | Meaning |
42
+ |---|---|
43
+ | `image` | Page image, rendered at 300 DPI and saved as JPEG at quality 85. |
44
+ | `page_id` | Stable ID containing the original PDF page number. |
45
+ | `source_page` | One-based page number in the original PDF. |
46
+ | `printed_page` | Page number printed on the scanned page. |
47
+ | `source` | NASA's source-record URL. |
48
+
49
+ The images use the [ImageFolder format](https://huggingface.co/docs/datasets/en/image_dataset).
50
+ `pages/metadata.jsonl` associates each image with its source-page information.
51
+ There is no verified ground-truth transcription in this dataset.
52
+
53
+ ## PDF and file inputs
54
+
55
+ The [OCR demo Bucket](https://huggingface.co/buckets/uv-scripts/ocr-demo) contains:
56
+
57
+ - `original/food-for-space-flight.pdf`: the unmodified nine-page NASA PDF.
58
+ - `demo/food-for-space-flight.pdf`: a seven-page extract matching the dataset rows.
59
+ - `pages/`: the same seven page images and metadata.
60
+
61
+ Use one prefix, such as `hf://buckets/uv-scripts/ocr-demo/demo`, as your input to
62
+ avoid processing both a PDF and its page images.
63
 
64
  ## Source and licence
65
 
66
+ - [NASA record: NASA Facts: Food for Space Flight](https://ntrs.nasa.gov/citations/19830005543)
67
+ - [Original PDF](https://ntrs.nasa.gov/api/citations/19830005543/downloads/19830005543.pdf)
68
+ - [Document metadata](https://ntrs.nasa.gov/api/citations/19830005543)
69
 
70
  NASA's document record states **Work of the US Gov. Public Use Permitted**.
71
+ The source pages retain that status; the repository's code license does not
72
+ relicense the NASA document. See [NASA's usage guidance](https://www.nasa.gov/nasa-brand-center/images-and-media/).
73
+ Attribute these source pages to NASA and identify any generated transcription as
74
+ model output. NASA does not endorse this demo or verify its OCR results.
75
+
76
+ The archival scan has damaged lettering and an imperfect existing OCR layer.
77
+ Inspect generated text against the page images, especially tables and captions.
78
+
79
+ ## Preparation
80
+
81
+ Pages 3-9 were rendered from the original PDF with Poppler's `pdftoppm` at
82
+ 300 DPI and saved as JPEG at quality 85. No OCR model was run during preparation.
83
+ The Bucket's `manifest.json` records source URLs, file checksums and rendering settings.