From c6bdbc639c002d0e90034b67a707a279019bc5bb Mon Sep 17 00:00:00 2001 From: HinGwenWoong Date: Sat, 22 Jan 2022 12:02:52 +0800 Subject: [PATCH] Fixed: Only use cpu while using paddlepaddle-gpu when process auto recognition --- PPOCRLabel/PPOCRLabel.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/PPOCRLabel/PPOCRLabel.py b/PPOCRLabel/PPOCRLabel.py index 6a0b5059..f7016b6f 100644 --- a/PPOCRLabel/PPOCRLabel.py +++ b/PPOCRLabel/PPOCRLabel.py @@ -1182,7 +1182,6 @@ class MainWindow(QMainWindow): def addZoom(self, increment=10): self.setZoom(self.zoomWidget.value() + increment) - print(self.zoomWidget.value() + increment) self.imageSlider.setValue(self.zoomWidget.value() + increment) # set zoom slider value def zoomRequest(self, delta): @@ -2162,10 +2161,10 @@ def get_main_app(argv=[]): app = QApplication(argv) app.setApplicationName(__appname__) app.setWindowIcon(newIcon("app")) - # Tzutalin 201705+: Accept extra agruments to change predefined class file + # Tzutalin 201705+: Accept extra arguments to change predefined class file arg_parser = argparse.ArgumentParser() arg_parser.add_argument("--lang", type=str, default='en', nargs="?") - arg_parser.add_argument("--gpu", type=str2bool, default=False, nargs="?") + arg_parser.add_argument("--gpu", type=str2bool, default=True, nargs="?") arg_parser.add_argument("--predefined_classes_file", default=os.path.join(os.path.dirname(__file__), "data", "predefined_classes.txt"), nargs="?") -- GitLab