ITADN

Add argparse-based CLI for flexible path configuration and container compatibility

#102Pull Requestanujonthemove 创建于 2025-05-13
A
anujonthemovecommented
This PR introduces an `argparse`-based Command-Line Interface (CLI) for `grounded_sam2_local_demo.py` to improve usability, flexibility, and compatibility especially for containerized environments. --- ### ✅ **Key Changes:** * Replaces hardcoded file paths with CLI arguments using Python’s `argparse`. * Adds support for dynamically specifying: * Input image path * Text prompts * SAM2 checkpoint path and config * Grounding DINO config and checkpoint * Output directory * Thresholds and optional flags * Includes inline comments to clarify argument purpose and usage. --- ### 📌 **How can this help:** * **Improved Usability:** Users no longer need to modify the script manually for different datasets or experiments. * **Container Compatibility:** The original script's hardcoded paths made it difficult to run in Docker/Apptainer containers. The CLI allows dynamic path passing via mounted volumes or runtime parameters.
合并状态:未合并 0 条评论