python region_features/generate_regions.py \
    --input ./playground/data/LLaVA/LLaVA-Pretrain/images/ \
    --data_path ./playground/data/LLaVA/LLaVA-Pretrain/blip_laion_cc_sbu_10.json \
    --output ./playground/data/regions/LLaVA-Pretrain/visualize-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 128 \
    --pred-iou-thresh 0.5 \
    --stability-score-thresh 0.92 0.9 0.85 \
    --min-mask-region-area 10 \
    --visualize
    # --convert-to-rle

# python region_features/generate_regions.py \
#     --input ./playground/data/LLaVA \
#     --data_path ./playground/data/LLaVA/llava_v1_5_mix4k.json \
#     --output ./playground/data/regions/LLaVA-ft/visualize32 \
#     --checkpoint "./playground/models/sam2/sam2.1_hiera_large.pt" \
#     --use-sam2 \
#     --sam2-model-cfg sam2.1_hiera_l.yaml \
#     --points-per-side 32 \
#     --points-per-batch 512 \
#     --pred-iou-thresh 0.4 \
#     --stability-score-thresh 0.85 \
#     --min-mask-region-area 10 \
#     --visualize
#     # --convert-to-rle
