diff --git a/py/src/routes/videos.py b/py/src/routes/videos.py index 73fef46..f2e898d 100644 --- a/py/src/routes/videos.py +++ b/py/src/routes/videos.py @@ -108,7 +108,7 @@ def upload_video(): # Annotate the video (add bounding boxes and overlay data) overlay_path = f"{PROCESSED_OVERLAY_DIR}/overlay_{video_id}.json" output_path = f"{PROCESSED_DATA_DIR}/videos_with_nametags/{video_filename}.mp4" - model_path = f"{MODELS_DIR}/YOLOv11/{group_name}/hackv4i.pt" + model_path = f"{MODELS_DIR}/YOLOv11/{group_name}/hackv11i.pt" annotate_video(uploaded_video_path, output_path, overlay_path, model_path) # TODO: FIX ME. diff --git a/py/src/services/train_yolo_model/incremental_learning.py b/py/src/services/train_yolo_model/incremental_learning.py index a04b0bc..a77738e 100644 --- a/py/src/services/train_yolo_model/incremental_learning.py +++ b/py/src/services/train_yolo_model/incremental_learning.py @@ -48,10 +48,11 @@ def update_model_with_additional_dataset(DATASETS_DIR, MODELS_DIR, group): key=lambda x: os.path.getctime(os.path.join(runs_dir, x)), ) best_pt_path = os.path.join(runs_dir, latest_train_dir, "weights", "best.pt") + output_path = os.path.join(models_dir, "hackv11i.pt") if os.path.exists(best_pt_path): - shutil.copy(best_pt_path, models_dir) - print(f"best.pt を {best_pt_path} から {models_dir} にコピーしました。") + shutil.copy(best_pt_path, output_path) + print(f"best.pt を {best_pt_path} から {output_path} にコピーしました。") else: print("best.pt ファイルが見つかりませんでした。")