Files
kg-scr/config.yaml

103 lines
2.1 KiB
YAML

input:
paths:
- "~/Pictures"
patterns:
- "SCR-*.png"
- "*.jpg"
- "*.jpeg"
- "*.tiff"
- "*.bmp"
recursive: true
exclude_patterns:
- "*.photoslibrary/*"
ocr:
engine: "paddleocr"
languages: ["en", "latin"]
use_gpu: false
use_angle_cls: true
det_db_thresh: 0.3
det_db_box_thresh: 0.6
det_db_unclip_ratio: 1.5
rec_batch_num: 6
cpu_threads: 4
processing:
workers: 4
batch_size: 10
retry_attempts: 2
timeout_per_image: 120
skip_existing: true
detectors:
figures:
enabled: true
model: "lp://PubLayNet/faster_rcnn_R_50_FPN_3x/config"
confidence_threshold: 0.7
tables:
enabled: true
model: "microsoft/table-transformer-detection"
confidence_threshold: 0.7
captions:
enabled: true
model: "lp://PubLayNet/faster_rcnn_R_50_FPN_3x/config"
confidence_threshold: 0.5
entities:
enabled: true
model: "en_core_sci_lg"
types:
- "GENE"
- "PROTEIN"
- "CHEMICAL"
- "SPECIES"
- "DISEASE"
- "CELL_LINE"
- "ORGANISM"
- "CELL_TYPE"
merge_entities: true
citations:
regex_enabled: true
grobid_enabled: false
grobid_url: "http://localhost:8070"
grobid_timeout: 30
chunking:
chunk_size: 1000
chunk_overlap: 200
separators: ["\n\n", "\n", ". ", " ", ""]
keep_separator: true
output:
write_consolidated: true
consolidated_filename: "all_ocr.md"
# Uses platformdirs default: ~/.local/share/ocr-pipeline (Linux), ~/Library/Application Support/ocr-pipeline (macOS), %LOCALAPPDATA%\ocr-pipeline (Windows)
format: "markdown"
organize_by: "date_run"
frontmatter:
fields:
- "source_path"
- "source_hash"
- "timestamp"
- "ocr_engine"
- "ocr_confidence_mean"
- "language"
- "detected_entities"
- "has_figures"
- "has_tables"
- "citations_found"
- "chunk_index"
- "total_chunks"
include_raw_text: false
watch:
enabled: true
debounce_seconds: 5
# Uses platform-aware defaults from config.py
# ignore_patterns:
# - ".DS_Store"
# - "*.tmp"
# - "*.partial"
# - "*.crdownload"
poll_interval: 1.0