Yuantao Feng
commited on
Commit
·
a4b564e
1
Parent(s):
7295415
correct default values of model filenames in demo scripts (#11)
Browse files
demo.py
CHANGED
@@ -26,7 +26,7 @@ def str2bool(v):
|
|
26 |
parser = argparse.ArgumentParser(
|
27 |
description="An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition (https://arxiv.org/abs/1507.05717)")
|
28 |
parser.add_argument('--input', '-i', type=str, help='Path to the input image. Omit for using default camera.')
|
29 |
-
parser.add_argument('--model', '-m', type=str, default='
|
30 |
parser.add_argument('--width', type=int, default=736,
|
31 |
help='The width of input image being sent to the text detector.')
|
32 |
parser.add_argument('--height', type=int, default=736,
|
@@ -48,7 +48,7 @@ if __name__ == '__main__':
|
|
48 |
# Instantiate CRNN for text recognition
|
49 |
recognizer = CRNN(modelPath=args.model)
|
50 |
# Instantiate DB for text detection
|
51 |
-
detector = DB(modelPath='../text_detection_db/
|
52 |
inputSize=[args.width, args.height],
|
53 |
binaryThreshold=0.3,
|
54 |
polygonThreshold=0.5,
|
|
|
26 |
parser = argparse.ArgumentParser(
|
27 |
description="An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition (https://arxiv.org/abs/1507.05717)")
|
28 |
parser.add_argument('--input', '-i', type=str, help='Path to the input image. Omit for using default camera.')
|
29 |
+
parser.add_argument('--model', '-m', type=str, default='text_recognition_CRNN_VGG_BiLSTM_CTC_2021sep.onnx', help='Path to the model.')
|
30 |
parser.add_argument('--width', type=int, default=736,
|
31 |
help='The width of input image being sent to the text detector.')
|
32 |
parser.add_argument('--height', type=int, default=736,
|
|
|
48 |
# Instantiate CRNN for text recognition
|
49 |
recognizer = CRNN(modelPath=args.model)
|
50 |
# Instantiate DB for text detection
|
51 |
+
detector = DB(modelPath='../text_detection_db/text_detection_DB_IC15_resnet18_2021sep.onnx',
|
52 |
inputSize=[args.width, args.height],
|
53 |
binaryThreshold=0.3,
|
54 |
polygonThreshold=0.5,
|