turkic-ocr-code / scripts /r5_testpass2 /tp2_kzb_run.sbatch
treoa's picture
Release 1
24aaa76
Raw History Blame Contribute Delete
1.45 kB
#!/bin/bash
#SBATCH --job-name=tp2_kzb_run
#SBATCH --partition=ZEN4
#SBATCH --cpus-per-task=16
#SBATCH --mem=64G
#SBATCH --time=12:00:00
#SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out
# Test pass 2, amendment 2: Kazakh real-document benchmark handwritten pages, opened once: YOLO11s stage 2 on CPU, then M1 per line
# (same scripts and settings as the TurkishOCR-Bench pages), then the descriptive page scorer.
set -u
CODE=/path/to/TURKIC_OCR_CODE
D=/path/to/TURKIC_OCR_DATA
S=$CODE/scripts/r5_testpass2
T=$D/outputs/r5/testpass2
K=$T/kzb
G=$T/GATE_testpass2_started.txt
export HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 OMP_NUM_THREADS=16 MKL_NUM_THREADS=16 TOKENIZERS_PARALLELISM=false
hostname; date -u
if [ ! -f $T/plan_amendment2_copied.txt ]; then echo "REFUSED: amendment 2 not copied"; exit 3; fi
$CODE/.venv_kraken/bin/python -I $S/tp2_tob_detect.py --pages $K/pages_kzb.tsv --image-col image_1280 \
--weights $D/checkpoints/r5/linedet/detectors/yolo_s2/weights/best.pt --out $K/det_kzb.jsonl
echo "=== det exit $? $(date -u)"
$CODE/.venv_vlm/bin/python -I $S/tp2_tob_read.py --pages $K/pages_kzb.tsv --det $K/det_kzb.jsonl \
--model $D/checkpoints/r5/paddleocr_vl_1_6/leader --out $K/read_kzb.jsonl --gate-file $G
echo "=== read exit $? $(date -u)"
$CODE/.venv_kraken/bin/python -I $S/tp2_kzb_score.py --pages $K/pages_kzb.tsv --pred $K/read_kzb.jsonl --gate-file $G --out $K/page_score_kzb.json
echo "=== score exit $? $(date -u)"