修改配置。

This commit is contained in:
2025-11-07 09:40:54 +08:00
parent 3ca5d6e7d0
commit 45ed6b905a
5 changed files with 20 additions and 19 deletions
+4 -4
View File
@@ -66,15 +66,15 @@ class EmbeddingFoodClassifierApp:
# model_path = "../model/embedding_20251011_133653/best_embedding_model.pth"
# model_path = os.path.join(BASE_DIR, "../model/embedding_20251011_133653/best_embedding_model.pth")
# model_path = os.path.join(BASE_DIR, "../model/ProcessedIngredientRecognition/embedding_20251029_170904/best_embedding_model.pth")
# model_path = os.path.join(BASE_DIR, "../model/WholeIngredientRecognition/embedding_20251024_091151/best_embedding_model.pth")
model_path = os.path.join(BASE_DIR, "../model/DishClassification/cosface_20251105_200551/best_cosface_model.pth")
model_path = os.path.join(BASE_DIR, "../model/WholeIngredientRecognition/cosface_20251106_134718/best_cosface_model.pth")
# model_path = os.path.join(BASE_DIR, "../model/DishClassification/cosface_20251105_200551/best_cosface_model.pth")
# FAISS索引目录
# index_dir = "../faiss_vector_db/faiss_index"
# index_dir = os.path.join(BASE_DIR, "../faiss_vector_db/faiss_index")
# index_dir = os.path.join(BASE_DIR, "../faiss_vector_db/ProcessedIngredientRecognition/faiss_index")
# index_dir = os.path.join(BASE_DIR, "../faiss_vector_db/WholeIngredientRecognition/faiss_index")
index_dir = os.path.join(BASE_DIR, "../faiss_vector_db/DishClassification/faiss_index")
index_dir = os.path.join(BASE_DIR, "../faiss_vector_db/WholeIngredientRecognition/faiss_index")
# index_dir = os.path.join(BASE_DIR, "../faiss_vector_db/DishClassification/faiss_index")
if os.path.exists(model_path) and os.path.exists(index_dir):
# 1. 加载embedding模型