| from __future__ import annotations | |
| import os | |
| # MedGemma | |
| MEDGEMMA_MODEL_ID = os.getenv("MEDGEMMA_MODEL_ID", "google/medgemma-1.5-4b-it") | |
| # MedSAM | |
| MEDSAM_CHECKPOINT = os.getenv("MEDSAM_CHECKPOINT", "work_dir/MedSAM/medsam_vit_b.pth") | |
| MEDSAM_DEVICE = os.getenv("MEDSAM_DEVICE", "cuda:0") | |
| MEDSAM_IMAGE_SIZE = 1024 | |
| # Bounding box coordinate space (MedGemma normalizes to [0, BBOX_SCALE]) | |
| BBOX_NORMALIZATION_SCALE = 1000 | |
| # Stage 1 – detection | |
| DEFAULT_MAX_FINDINGS = 10 | |
| DISCOVERY_MAX_NEW_TOKENS = 2000 | |
| LOCALIZATION_MAX_NEW_TOKENS = 2000 | |
| # Stage 3 – report | |
| REPORT_MAX_NEW_TOKENS = 2000 | |