SPLIT=${1:-"-1"}

python region_features/generate_regions.py \
    --input ./playground/data/eval/ocrbench/ \
    --data_path echo840/OCRBench \
    --output ./playground/data/regions/ocrbench/regions-mixed \
    --checkpoint "./playground/models/sam2/sam2.1_hiera_large.pt" \
    --use-sam2 \
    --sam2-model-cfg sam2.1_hiera_l.yaml \
    --num-granularities 2 \
    --points-per-side 48 64 \
    --points-per-batch 256 \
    --pred-iou-thresh 0.6 0.5 \
    --stability-score-thresh 0.92 0.9 \
    --min-mask-region-area 10 \
    --nmasks-soft-min 64 \
    --convert-to-rle \
    # --overwrite
    # --visualize
