统计训练图片数量脚本中,增加导出excel功能,便于在餐厅看各个品类的数量
This commit is contained in:
@@ -1151,7 +1151,11 @@ class EmbeddingFoodClassifierApp:
|
||||
|
||||
# 提取查询图片的特征向量
|
||||
query_embedding = self.model.extract_embedding(pil_image, normalize=True)
|
||||
# print('特征向量:', query_embedding)
|
||||
# 打印前50位向量,用于与秤端结果对比
|
||||
# print("=" * 60)
|
||||
# print(f"[PC端] 模型输出向量(前50位,共{len(query_embedding)}维):")
|
||||
# print(", ".join(f"{v:.6f}" for v in query_embedding[:50]))
|
||||
# print("=" * 60)
|
||||
query_embedding = query_embedding.reshape(1, -1).astype(np.float32)
|
||||
|
||||
# 在FAISS索引中搜索最相似的k张图片
|
||||
|
||||
Reference in New Issue
Block a user