对于类别中样本超过30个的采用K-Means算法截取前30个,存入向量数据库

This commit is contained in:
2026-03-03 17:07:06 +08:00
parent 8a50e2973b
commit dedf72f53c
4 changed files with 120 additions and 32 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ class EmbeddingFoodClassifierApp:
# 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/WholeIngredientRecognition/grid_search_20251204_140816/model_s64.0_m0.4.pth")
model_path = os.path.join(BASE_DIR, "../model/WholeIngredientRecognition/grid_search_20260302_092600/best_model_s64.0_m0.4.pth")
model_path = os.path.join(BASE_DIR, "../model/WholeIngredientRecognition/grid_search_20260302_182102/best_model_s60.0_m0.42.pth")
# model_path = os.path.join(BASE_DIR, "../model/DishClassification/cosface_20251111_153649/best_cosface_model.pth")
# FAISS索引目录