From 9230383531742cfd13e7e47cd73dc02035695252 Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 19 Jun 2024 01:37:12 +0100 Subject: [PATCH] Upgrade to medium detector with more classes --- clashroyalebuildabot/state/detector.py | 2 +- clashroyalebuildabot/state/unit_detector.py | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/clashroyalebuildabot/state/detector.py b/clashroyalebuildabot/state/detector.py index da83be9..e0e9610 100644 --- a/clashroyalebuildabot/state/detector.py +++ b/clashroyalebuildabot/state/detector.py @@ -23,7 +23,7 @@ def __init__(self, cards, debug=False): os.path.join(DATA_DIR, "numbers_S_128x32.onnx") ) self.unit_detector = UnitDetector( - os.path.join(DATA_DIR, "units_S_480x352.onnx"), self.cards + os.path.join(DATA_DIR, "units_M_480x352.onnx"), self.cards ) self.screen_detector = ScreenDetector() self.side_detector = SideDetector(os.path.join(DATA_DIR, "side.onnx")) diff --git a/clashroyalebuildabot/state/unit_detector.py b/clashroyalebuildabot/state/unit_detector.py index c11df50..51cc6d5 100644 --- a/clashroyalebuildabot/state/unit_detector.py +++ b/clashroyalebuildabot/state/unit_detector.py @@ -81,9 +81,3 @@ def run(self, image): pred = self.fix_bboxes(pred, width, height, padding) pred = self._post_process(pred, height, image) return pred - - -detector = UnitDetector( - os.path.join(DATA_DIR, "units_S_480x352.onnx"), - cards=[Cards.GOBLIN_HUT, Cards.GOBLINS, Cards.ROYAL_HOGS], -)