Loading modules/textdetector/detector_ysg.py +3 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ MODEL_DIR = 'data/models' CKPT_LIST = [] def update_ckpt_list(): if not osp.exists(MODEL_DIR): return global CKPT_LIST CKPT_LIST.clear() for p in os.listdir(MODEL_DIR): Loading @@ -34,11 +36,10 @@ CLS_MAP = { 'other': 'other' } update_ckpt_list() @register_textdetectors('ysgyolo') class YSGYoloDetector(TextDetectorBase): update_ckpt_list() params = { 'model path': { 'type': 'selector', Loading ui/module_parse_widgets.py +1 −1 Original line number Diff line number Diff line Loading @@ -246,7 +246,7 @@ class ParamWidget(QWidget): else: param_layout.addLayout(pw_lo, ii, widget_idx) else: raise ValueError(f"Failed to initialize widget for key: {param_key}") raise ValueError(f"Failed to initialize widget for key-value pair: {param_key}-" + params[param_key]) def on_flushbtn_clicked(self): paramw: ParamComboBox = self.sender() Loading Loading
modules/textdetector/detector_ysg.py +3 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,8 @@ MODEL_DIR = 'data/models' CKPT_LIST = [] def update_ckpt_list(): if not osp.exists(MODEL_DIR): return global CKPT_LIST CKPT_LIST.clear() for p in os.listdir(MODEL_DIR): Loading @@ -34,11 +36,10 @@ CLS_MAP = { 'other': 'other' } update_ckpt_list() @register_textdetectors('ysgyolo') class YSGYoloDetector(TextDetectorBase): update_ckpt_list() params = { 'model path': { 'type': 'selector', Loading
ui/module_parse_widgets.py +1 −1 Original line number Diff line number Diff line Loading @@ -246,7 +246,7 @@ class ParamWidget(QWidget): else: param_layout.addLayout(pw_lo, ii, widget_idx) else: raise ValueError(f"Failed to initialize widget for key: {param_key}") raise ValueError(f"Failed to initialize widget for key-value pair: {param_key}-" + params[param_key]) def on_flushbtn_clicked(self): paramw: ParamComboBox = self.sender() Loading