Commit 23cb098a authored by dmMaze's avatar dmMaze
Browse files

try to fix ysg load error #904

parent 7ba1a3dc
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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):
@@ -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',
+1 −1
Original line number Diff line number Diff line
@@ -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()