不要类别加权

This commit is contained in:
2025-11-26 14:50:00 +08:00
parent 99d9eea757
commit 0e8a1df590
5 changed files with 28 additions and 21 deletions
+4 -3
View File
@@ -67,14 +67,15 @@ class EmbeddingFoodClassifierApp:
# 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/cosface_20251106_134718/best_cosface_model.pth")
model_path = os.path.join(BASE_DIR, "../model/DishClassification/cosface_20251111_153649/best_cosface_model.pth")
model_path = os.path.join(BASE_DIR, "../model/WholeIngredientRecognition/grid_search_20251120_205839/model_s68.0_m0.38.pth")
# model_path = os.path.join(BASE_DIR, "../model/DishClassification/cosface_20251111_153649/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模型