Files
yolov26_3d/tools/model_merging/merge_models_of_2roi.sh
2026-06-24 09:35:46 +08:00

21 lines
798 B
Bash
Executable File

#!/bin/bash
#
# Merge two ROI models into a single model
#
# Arguments:
# --roi0_model_path: Path to the ROI0 model file
# --roi1_model_path: Path to the ROI1 model file
# --save_dir: Directory to save the merged model file
# Set PYTHONPATH to project root for module imports
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
export PYTHONPATH="${PROJECT_ROOT}:${PYTHONPATH}"
python tools/model_merging/merge_models_of_2roi.py \
--roi0_model_path runs/train/yolov5s-300w-roi0-newdata-cncap-bottom_aug_20260312_012251/weights/last.pt \
--roi1_model_path runs/train/yolov5s-300w-roi1-newdata-cncap-bottom_aug_20260312_012755/weights/last.pt \
--save_dir release/yolov5s-300w-newdata-cncap-768x352 \
--imgsz 352 768