Convert TextRecognitionDataGenerator's result data to Deep-Text-Recognition-Benchmark's input data.
- TextRecognitionDataGenerator: A synthetic data generator for text recognition.
- deep-text-recognition-benchmark: Text recognition (optical character recognition) with deep learning methods.
(venv) $ python3 convert.py \
--input_path ./input \
--output_path ./output
The structure of data folder as below.
- Input: result of TextRecognitionDataGenerator project.
/input
# [gt]_[idx].[ext]
├── abcd_00001.jpg
├── efgh_00002.jpg
├── ijkl_00003.jpg
└── ...
- Output: for use in deep-text-recognition-benchmark project.
/output
├── gt.txt
└── /images
# image_[idx].[ext]
├── image_00001.png
├── image_00002.png
├── image_00003.png
└── ...
- gt.txt
# {filename}\t{label}\n
images/image_00001.png abcd
images/image_00002.png efgh
images/image_00003.png ijkl
...