屏蔽/255,避免重复除以。

This commit is contained in:
zhanghuan
2025-09-11 17:49:37 +08:00
parent 06e440a6d1
commit e1cb936e32
4 changed files with 10 additions and 6 deletions
+1
View File
@@ -548,6 +548,7 @@ class FoodClassifierApp:
# 不再需要手动预处理,模型会自动处理
# 使用模型的预处理方法
input_tensor = self.model.preprocess_image(pil_image)
# print('input_tensor',input_tensor)
input_tensor = input_tensor.to(self.device)
# 进行预测