turkic-ocr-code / scripts /r5 /r5_after_gen.sbatch
treoa's picture
Release 1
24aaa76
Raw History Blame Contribute Delete
891 Bytes
#!/bin/bash
#SBATCH --job-name=r5_after_gen
#SBATCH --partition=ZEN4
#SBATCH --qos=nu-zen4
#SBATCH --gres=none
#SBATCH --cpus-per-task=8
#SBATCH --mem=24G
#SBATCH --time=02:00:00
#SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out
# R5 DATA: run this ONCE GEN's synthetic manifests (synth_{hand,typed,clutter,pages}_{train,val,test}.tsv) are written and no longer change.
# 1 hash GEN's images, 2 report-only duplicate check over all manifests (rewrites nothing), 3 validate every manifest, 4 recut the unseen-word slice P2 with the
# synthetic train labels, 5 rewrite manifest_stats.json, evalsets.json and mix_v1_shares.json (placeholders become ready sets).
PY=/path/to/TURKIC_OCR_CODE/.venv/bin/python
S=/path/to/TURKIC_OCR_CODE/scripts/r5
$PY -I $S/r5_build_real.py hash_synth dedupe_all --force
$PY -I $S/r5_validate_manifests.py
$PY -I $S/r5_p2_slice.py
$PY -I $S/r5_registry.py