Skip to content

Commit

Permalink
Update test_sr.py
Browse files Browse the repository at this point in the history
  • Loading branch information
csxmli2016 committed Dec 29, 2023
1 parent c190faa commit 2485d72
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test_sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,14 +320,18 @@ def main(L_path, save_path, manual_label, use_real_ocr, use_new_bbox):
parser.add_argument('-i', '--test_path', type=str, default='./Testsets/LQs')
parser.add_argument('-o', '--save_path', type=str, default=None)
parser.add_argument('-m', '--manual', action='store_true')
parser.add_argument('--real_ocr', action='store_true')
args = parser.parse_args()

'''
We add new real-world ocr model and new robust bbox detection.
Set
'''
use_new_bbox = True
use_real_ocr = True
if args.real_ocr:
use_real_ocr = True
else:
use_real_ocr = False

save_path = args.save_path
if save_path is None:
Expand All @@ -347,8 +351,6 @@ def main(L_path, save_path, manual_label, use_real_ocr, use_new_bbox):
else:
print('{:>28s} : {}'.format('OCR Module', 'using ocr model trained on our synthetic data'))




main(args.test_path, save_path, args.manual, use_real_ocr, use_new_bbox)

Expand Down

0 comments on commit 2485d72

Please sign in to comment.