"The module can recognize the chinese texts in an image. Firstly, it will detect the text box positions based on the differentiable_binarization_chn module. Then it recognizes the chinese texts. ",
"The module can recognize the chinese texts in an image. Firstly, it will detect the text box positions based on the differentiable_binarization_chn module. Then it recognizes the chinese texts. ",
author="paddle-dev",
author="paddle-dev",
author_email="paddle-dev@baidu.com",
author_email="paddle-dev@baidu.com",
type="cv/text_recognition")
type="cv/text_recognition")
classChineseOCRDBRCNN(hub.Module):
classChineseOCRDBCRNN(hub.Module):
def_initialize(self,text_detector_module=None):
def_initialize(self,text_detector_module=None):
"""
"""
initialize with the necessary elements
initialize with the necessary elements
...
@@ -355,8 +355,8 @@ class ChineseOCRDBRCNN(hub.Module):
...
@@ -355,8 +355,8 @@ class ChineseOCRDBRCNN(hub.Module):
Run as a command
Run as a command
"""
"""
self.parser=argparse.ArgumentParser(
self.parser=argparse.ArgumentParser(
description="Run the chinese_ocr_db_rcnn module.",
description="Run the chinese_ocr_db_crnn module.",
prog='hub run chinese_ocr_db_rcnn',
prog='hub run chinese_ocr_db_crnn',
usage='%(prog)s',
usage='%(prog)s',
add_help=True)
add_help=True)
...
@@ -371,7 +371,7 @@ class ChineseOCRDBRCNN(hub.Module):
...
@@ -371,7 +371,7 @@ class ChineseOCRDBRCNN(hub.Module):
self.add_module_input_arg()
self.add_module_input_arg()
args=self.parser.parse_args(argvs)
args=self.parser.parse_args(argvs)
results=self.recognize_texts(
results=self.recognize_text(
paths=[args.input_path],
paths=[args.input_path],
use_gpu=args.use_gpu,
use_gpu=args.use_gpu,
output_dir=args.output_dir,
output_dir=args.output_dir,
...
@@ -407,7 +407,7 @@ class ChineseOCRDBRCNN(hub.Module):
...
@@ -407,7 +407,7 @@ class ChineseOCRDBRCNN(hub.Module):