Spaces:
Sleeping
Sleeping
| # Totem: Smoke Signal v0.1 | |
| Picture-book OCR & Codex extraction pipeline. | |
| ## Folder Structure | |
| ``` | |
| smoke_signal/ | |
| βββ source_pdfs/ # Immutable β never overwrite source PDFs | |
| βββ manifest/ # source_manifest.csv, run logs | |
| βββ renders/ # Page PNG/TIFF renders from PDF | |
| βββ ocr_raw/ # Raw OCR outputs per page/region | |
| βββ regions/ # Region detection JSON, bounding boxes | |
| βββ review/ # Human review queue CSVs and corrections | |
| βββ exports/ # Codex-ready JSONL/CSV/Markdown exports | |
| βββ logs/ # Per-run timestamped logs | |
| βββ configs/ # Frozen config files per run | |
| βββ schemas/ # JSON schemas for all output types | |
| βββ reports/ # Validation and batch reports | |
| βββ scripts/ # Pipeline scripts | |
| ``` | |
| ## Quickstart | |
| ```bash | |
| # 1. Install dependencies | |
| pip install -r requirements.txt | |
| # 2. Add PDFs to source_pdfs/ folder | |
| # 3. Register and hash all sources | |
| python scripts/01_register_sources.py | |
| # 4. Review manifest/source_manifest.csv and set rights_class for each book | |
| # 5. Run PDF profiler (Stage 3) | |
| # python scripts/02_profile_pdfs.py β coming in next stage | |
| ``` | |
| ## Control Principles | |
| | Rule | Description | | |
| |------|-------------| | |
| | No silent acquisition | Every source file must be logged with rights/provenance/hash before extraction | | |
| | No OCR soup in Codex | Low-confidence pages must be flagged before influencing fingerprints | | |
| | No extractor logic drift | Changes to scoring/labels/thresholds require a versioned issue | | |
| | Page-level traceability | Every exported line maps back to book ID, page, region, and extraction method | | |
| ## Naming Convention | |
| - Files: `BOOKID_page_REGIONID.ext` | |
| - Batches: `SS-BATCH-001`, `SS-BATCH-002`, ... | |
| - Configs: `ss_ocr_config_v0.1.json` | |
| - Schemas: `schema_book_manifest_v1.json` | |
| # push test | |