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

python region_features/generate_regions.py \
    --input ./playground/data/eval/mmbench/ \
    --data_path ./playground/data/eval/mmbench/mmbench_dev_20230712/${SPLIT}_of_4.tsv \
    --output ./playground/data/regions/mmbench/regions-mixed \
    --checkpoint "./playground/models/sam2/sam2.1_hiera_large.pt" \
    --use-sam2 \
    --sam2-model-cfg sam2.1_hiera_l.yaml \
    --num-granularities 3 \
    --points-per-side 48 64 96 \
    --points-per-batch 64 \
    --pred-iou-thresh 0.6 0.5 0.4 \
    --stability-score-thresh 0.92 0.9 0.85 \
    --min-mask-region-area 10 \
    --nmasks-soft-min 80 \
    --convert-to-rle \
    # --overwrite
    # --visualize
