处理embedding的请求时长。

This commit is contained in:
2025-11-13 16:23:02 +08:00
parent d24b40c9ec
commit 3ae8c677ff
4 changed files with 34 additions and 19 deletions
+7 -6
View File
@@ -497,16 +497,17 @@ def main():
# 配置参数
# MODEL_PATH = "../model/embedding_20251011_133653/best_embedding_model.pth"
# MODEL_PATH = "../model/ProcessedIngredientRecognition/embedding_20251103_172012/best_embedding_model.pth"
# MODEL_PATH = "../model/WholeIngredientRecognition/cosface_20251106_134718/best_cosface_model.pth"
MODEL_PATH = "../model/WholeIngredientRecognition/cosface_20251113_160103/best_cosface_model.pth"
# MODEL_PATH = "../model/WholeIngredientRecognition/grid_search_20251113_095659/model_s68.0_m0.4.pth"
# MODEL_PATH = "../model/DishClassification/cosface_20251105_200551/best_embedding_model.pth"
MODEL_PATH = "../model/DishClassification/cosface_20251111_153649/best_cosface_model.pth"
# MODEL_PATH = "../model/DishClassification/cosface_20251111_153649/best_cosface_model.pth"
# TRAIN_DIR = "../dataset/ProcessedIngredientRecognition/train"
# TRAIN_DIR = "../dataset/WholeIngredientRecognition/train"
TRAIN_DIR = "../dataset/DishClassification/train"
TRAIN_DIR = "../dataset/WholeIngredientRecognition/train"
# TRAIN_DIR = "../dataset/DishClassification/train"
# OUTPUT_DIR = "ProcessedIngredientRecognition/faiss_index"
# OUTPUT_DIR = "WholeIngredientRecognition/faiss_index"
OUTPUT_DIR = "DishClassification/faiss_index"
OUTPUT_DIR = "WholeIngredientRecognition/faiss_index"
# OUTPUT_DIR = "DishClassification/faiss_index"
BATCH_SIZE = 16
INDEX_TYPE = 'flat' # 'flat', 'ivf', 'hnsw'
EMBEDDING_DIM = 512