19 lines
648 B
Bash
Executable file
19 lines
648 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Full pipeline: extract frames + OCR → heuristic fixes → sew + dedupe → result.csv
|
|
# Usage: ./run.sh [video] [output_dir]
|
|
# Default: video=video-data.webm, output_dir=frames, result=result.csv
|
|
set -e
|
|
VIDEO="${1:-video-data.webm}"
|
|
OUT_DIR="${2:-frames}"
|
|
RESULT="result.csv"
|
|
|
|
echo "1. Extract frames (every 10) + OCR with template.svg → ${OUT_DIR}/"
|
|
python3 extract_frames_and_tables.py "$OUT_DIR" "$VIDEO" template.svg 10
|
|
|
|
echo "2. Heuristic fixes on ${OUT_DIR}/*.csv"
|
|
python3 fix_all_csvs.py "$OUT_DIR"
|
|
|
|
echo "3. Sew CSVs + dedupe → ${RESULT}"
|
|
python3 sew_csvs.py "$OUT_DIR" "$RESULT"
|
|
|
|
echo "Done. Output: ${RESULT}"
|