# Page orientation check Small CPU preprocessor used before PepperOCR-VL on photographed pages. It runs the PP-LCNet_x1_0_doc_ori classifier (PaddleOCR) on every image, predicts 0/90/180/270 degrees, and writes an upright copy of each page to the output directory. A page is rotated only when the predicted angle has confidence 0.85 or higher; otherwise it is copied unchanged. ```bash uv run --project . --frozen python orient.py \ --input-dir /path/to/pages \ --output-dir /path/to/upright_pages \ --model-dir ./model \ --record-path /path/to/orientation.jsonl # optional per-image log ``` `pyproject.toml` and `uv.lock` pin PaddlePaddle CPU 3.2.2, OpenCV, Pillow and NumPy; `uv` creates the environment on first run. `model.sha256` lists the checksums of the two classifier files.