From 9d544ae0e8019175d271328fff988306eed22f83 Mon Sep 17 00:00:00 2001 From: weeswelai <52352067+weeswelai@users.noreply.github.com> Date: Sun, 24 Aug 2025 16:14:57 +0800 Subject: [PATCH] Upd: Update ShopItem_250814 method predict_valid, use np.max --- module/shop/base.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/module/shop/base.py b/module/shop/base.py index f9aea581d..ef9ded06a 100644 --- a/module/shop/base.py +++ b/module/shop/base.py @@ -46,9 +46,13 @@ FILTER = Filter(FILTER_REGEX, FILTER_ATTR) class ShopItem_250814(Item): + """ + Calculation result of unsold ship_T2 is 0.36, so 0.3 is taken as threshold, + result of sold product is < 0.2 + """ def predict_valid(self): - mean = np.mean(rgb2gray(self.image) > 139) - return mean > 0.23 + mean = np.mean(np.max(self.image, axis=2) > 139) + return mean > 0.3 class ShopItemGrid(ItemGrid):