File size: 963 Bytes
326f5f7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash

# Model list
MODELS="your_model_name_here"

path="your_project_path_here"
CACHE_DIR="$path/TextEdit/checkpoint"
export PADDLE_OCR_BASE_DIR="$CACHE_DIR/.paddleocr"

# === Path configuration ===
BENCHMARK_DIR="$path/TextEdit/eval_prompts/miniset"
GT_ROOT_DIR="$path/TextEdit/data"
MODEL_OUTPUT_ROOT="$path/TextEdit/output"

# Output directory (the script will auto-generate {MODEL}.json here)
OUTPUT_DIR="$path/TextEdit/result/classic_miniset"

mkdir -p $OUTPUT_DIR

# === Force shell-level environment variable lock ===
export OMP_NUM_THREADS=1
export MKL_NUM_THREADS=1
export OPENBLAS_NUM_THREADS=1
export VECLIB_MAXIMUM_THREADS=1
export NUMEXPR_NUM_THREADS=1

cd "$path/TextEdit"

python eval_pipeline/classic_metrics_eval.py \
    --benchmark_dir "$BENCHMARK_DIR" \
    --gt_root_dir "$GT_ROOT_DIR" \
    --model_output_root "$MODEL_OUTPUT_ROOT" \
    --output_dir "$OUTPUT_DIR" \
    --cache_dir "$CACHE_DIR" \
    --models "$MODELS"

echo "Done."